openapi: 3.1.0
info:
  title: Fluid Commerce APIs
  description: >-
    The **Fluid Commerce APIs** provides a comprehensive set of APIs designed to
    integrate Fluid's powerful services into your applications seamlessly. This
    bundle offers robust functionality for enhancing messaging solutions,
    streamlining data management, and improving customer interactions. With
    detailed documentation, secure authentication, and flexible integration
    options, the Fluid Public API Bundle is engineered to help you leverage our
    services efficiently and effectively, unlocking new potentials and achieving
    greater connectivity within your systems.
  contact:
    email: support@fluid.app
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: '1.0'
security: []
servers:
  - url: https://{company}.fluid.app
    description: Production server with company subdomain
    variables:
      company:
        default: myco
        description: Company subdomain
  - url: http://fluid.lvh.me:{port}
    description: Local development server
    variables:
      port:
        default: '3000'
        description: The port number for local development
components:
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
paths:
  /api/v2/admins:
    get:
      summary: List all admins
      tags:
        - Admins
      security:
        - bearer_auth: []
      parameters:
        - name: pagination
          in: query
          schema:
            type: object
            properties:
              page:
                type: integer
                exclusiveMinimum: 0
              per_page:
                type: integer
                exclusiveMinimum: 0
                maximum: 100
              search_query:
                type: string
              sorted_by:
                type: string
              active:
                type: boolean
            required: []
      responses:
        '200':
          description: admins found
          content:
            application/json:
              schema:
                type: object
                properties:
                  admins:
                    type: array
                    items:
                      title: UserCompany
                      type: object
                      properties:
                        id:
                          type: integer
                        active:
                          type:
                            - boolean
                            - 'null'
                          default: true
                        external_id:
                          type:
                            - string
                            - 'null'
                        username:
                          type:
                            - string
                            - 'null'
                        first_name:
                          type: string
                        last_name:
                          type: string
                        created_at:
                          type: string
                          format: date-time
                        image_url:
                          type:
                            - string
                            - 'null'
                        share_guid:
                          type: string
                          pattern: \A[a-z0-9\-_]+\z
                          minLength: 2
                        country:
                          type:
                            - object
                            - 'null'
                        language:
                          type:
                            - object
                            - 'null'
                        roles:
                          type:
                            - array
                            - 'null'
                        computed_full_name:
                          type:
                            - string
                            - 'null'
                        computed_email:
                          type:
                            - string
                            - 'null'
                        phone:
                          type:
                            - string
                            - 'null'
                      required:
                        - id
                        - first_name
                        - last_name
                        - created_at
                        - share_guid
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            example: 1
                          total_pages:
                            type: integer
                            example: 10
                          total_count:
                            type: integer
                            example: 100
                          per_page:
                            type: integer
                            example: 10
                required:
                  - admins
                  - meta
    post:
      summary: Create an admin
      tags:
        - Admins
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: admin created
          content:
            application/json:
              schema:
                type: object
                properties:
                  admin:
                    title: UserCompany
                    type: object
                    properties:
                      id:
                        type: integer
                      active:
                        type:
                          - boolean
                          - 'null'
                        default: true
                      external_id:
                        type:
                          - string
                          - 'null'
                      username:
                        type:
                          - string
                          - 'null'
                      first_name:
                        type: string
                      last_name:
                        type: string
                      created_at:
                        type: string
                        format: date-time
                      image_url:
                        type:
                          - string
                          - 'null'
                      share_guid:
                        type: string
                        pattern: \A[a-z0-9\-_]+\z
                        minLength: 2
                      country:
                        type:
                          - object
                          - 'null'
                      language:
                        type:
                          - object
                          - 'null'
                      roles:
                        type:
                          - array
                          - 'null'
                      computed_full_name:
                        type:
                          - string
                          - 'null'
                      computed_email:
                        type:
                          - string
                          - 'null'
                      phone:
                        type:
                          - string
                          - 'null'
                    required:
                      - id
                      - first_name
                      - last_name
                      - created_at
                      - share_guid
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - admin
                  - meta
        '422':
          description: invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                admin:
                  type: object
                  properties:
                    first_name:
                      type: string
                    last_name:
                      type: string
                    email:
                      type: string
                    phone:
                      type: string
                    active:
                      type: boolean
                    external_id:
                      type: string
                    username:
                      type: string
                    roles:
                      type: array
                    admin_roles:
                      type: array
                      items:
                        type: integer
                    language_code:
                      type: string
                  required:
                    - email
              required:
                - admin
  /api/v2/admins/{id}:
    get:
      summary: Retrieve an admin
      tags:
        - Admins
      security:
        - bearer_auth: []
      responses:
        '200':
          description: admin found
          content:
            application/json:
              schema:
                type: object
                properties:
                  admin:
                    title: UserCompany
                    type: object
                    properties:
                      id:
                        type: integer
                      active:
                        type:
                          - boolean
                          - 'null'
                        default: true
                      external_id:
                        type:
                          - string
                          - 'null'
                      username:
                        type:
                          - string
                          - 'null'
                      first_name:
                        type: string
                      last_name:
                        type: string
                      created_at:
                        type: string
                        format: date-time
                      image_url:
                        type:
                          - string
                          - 'null'
                      share_guid:
                        type: string
                        pattern: \A[a-z0-9\-_]+\z
                        minLength: 2
                      country:
                        type:
                          - object
                          - 'null'
                      language:
                        type:
                          - object
                          - 'null'
                      roles:
                        type:
                          - array
                          - 'null'
                      computed_full_name:
                        type:
                          - string
                          - 'null'
                      computed_email:
                        type:
                          - string
                          - 'null'
                      phone:
                        type:
                          - string
                          - 'null'
                    required:
                      - id
                      - first_name
                      - last_name
                      - created_at
                      - share_guid
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - admin
                  - meta
        '404':
          description: admin not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
    patch:
      summary: Update an admin
      tags:
        - Admins
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: admin updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  admin:
                    title: UserCompany
                    type: object
                    properties:
                      id:
                        type: integer
                      active:
                        type:
                          - boolean
                          - 'null'
                        default: true
                      external_id:
                        type:
                          - string
                          - 'null'
                      username:
                        type:
                          - string
                          - 'null'
                      first_name:
                        type: string
                      last_name:
                        type: string
                      created_at:
                        type: string
                        format: date-time
                      image_url:
                        type:
                          - string
                          - 'null'
                      share_guid:
                        type: string
                        pattern: \A[a-z0-9\-_]+\z
                        minLength: 2
                      country:
                        type:
                          - object
                          - 'null'
                      language:
                        type:
                          - object
                          - 'null'
                      roles:
                        type:
                          - array
                          - 'null'
                      computed_full_name:
                        type:
                          - string
                          - 'null'
                      computed_email:
                        type:
                          - string
                          - 'null'
                      phone:
                        type:
                          - string
                          - 'null'
                    required:
                      - id
                      - first_name
                      - last_name
                      - created_at
                      - share_guid
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - admin
                  - meta
        '404':
          description: admin not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                admin:
                  type: object
                  properties:
                    first_name:
                      type: string
                    last_name:
                      type: string
                    email:
                      type: string
                    phone:
                      type: string
                    active:
                      type: boolean
                    external_id:
                      type: string
                    username:
                      type: string
                    roles:
                      type: array
                    admin_roles:
                      type: array
                      items:
                        type: integer
                    language_code:
                      type: string
                  required: []
              required:
                - id
                - admin
    delete:
      summary: Delete an admin
      tags:
        - Admins
      security:
        - bearer_auth: []
      responses:
        '200':
          description: admin deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - id
                  - meta
        '404':
          description: admin not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
  /api/agreements/{id}:
    get:
      summary: Retrieves an agreement
      tags:
        - Agreements
      operationId: getAgreement
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
        - name: language_iso
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  agreement:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 101
                      title:
                        type: string
                        example: Terms and conditions
                      active:
                        type: boolean
                        example: true
                      required_on_checkout:
                        type: boolean
                        example: false
                      company_country_ids:
                        type: array
                        example:
                          - '1'
                          - '2'
                      description:
                        type: string
                        example: This is the description/body of the agreement
                      show_path:
                        type: string
                        example: /agreements/101
                      language_iso:
                        type: string
                        example: en
                      required:
                        type: boolean
                        example: true
                      enrollment_pack_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      created_at:
                        type: string
                        format: date_time
                        example: '2025-06-02T12:34:56Z'
                      updated_at:
                        type: string
                        format: date_time
                        example: '2025-06-02T12:34:56Z'
                      attachments:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            url:
                              type: string
                            filename:
                              type: string
                            content_type:
                              type: string
                            content_size:
                              type: integer
                            kind:
                              type: string
                            metadata:
                              type:
                                - object
                                - 'null'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Agreement not found.
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
    put:
      summary: Updates an agreement
      tags:
        - Agreements
      operationId: updateAgreement
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  agreement:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 101
                      title:
                        type: string
                        example: Terms and conditions
                      active:
                        type: boolean
                        example: true
                      required_on_checkout:
                        type: boolean
                        example: false
                      company_country_ids:
                        type: array
                        example:
                          - '1'
                          - '2'
                      description:
                        type: string
                        example: This is the description/body of the agreement
                      show_path:
                        type: string
                        example: /agreements/101
                      language_iso:
                        type: string
                        example: en
                      required:
                        type: boolean
                        example: true
                      enrollment_pack_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      created_at:
                        type: string
                        format: date_time
                        example: '2025-06-02T12:34:56Z'
                      updated_at:
                        type: string
                        format: date_time
                        example: '2025-06-02T12:34:56Z'
                      attachments:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            url:
                              type: string
                            filename:
                              type: string
                            content_type:
                              type: string
                            content_size:
                              type: integer
                            kind:
                              type: string
                            metadata:
                              type:
                                - object
                                - 'null'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: fail
                  data:
                    type: object
                    properties:
                      error:
                        type: string
                        example: Couldn't find Agreement
                    required:
                      - error
                required:
                  - status
                  - data
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Invalid parameters
                  errors:
                    type: object
                    properties:
                      enrollment_pack_agreements:
                        type: string
                        example: Enrollment Pack not found.
                      agreement:
                        type: object
                        properties:
                          title:
                            type: array
                            items:
                              type: string
                            example:
                              - must be filled
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                    required:
                      - request_id
                      - timestamp
                required:
                  - error_message
                  - errors
                  - meta
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                agreement:
                  type: object
                  properties:
                    title:
                      type: string
                      example: New Agreement
                    description:
                      type: string
                      example: This is a new agreement.
                    enrollment_pack_id:
                      type: integer
                      example: 1
                      description: >-
                        ID of the enrollment pack to associate with this
                        agreement
                    attachments_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          url:
                            type: string
                            example: http://example.com/file.png
                          filename:
                            type: string
                            example: file.png
                          kind:
                            type: string
                            example: image
                          content_type:
                            type: string
                            example: image/png
                          content_size:
                            type: integer
                            example: 1024
                          metadata:
                            type: object
                        required:
                          - url
                          - filename
                  required:
                    - title
                    - description
              required:
                - agreement
    delete:
      summary: Deletes an agreement
      tags:
        - Agreements
      operationId: deleteAgreement
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    example: 101
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Invalid credentials.
                required:
                  - message
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Agreement not found.
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Failed to delete.
                  errors:
                    type: object
                    properties:
                      agreement:
                        type: object
                        properties:
                          base:
                            type: array
                            items:
                              type: string
                            example:
                              - Cannot delete agreement
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
  /api/agreements:
    get:
      summary: Lists agreements
      tags:
        - Agreements
      operationId: listAgreements
      security:
        - bearer_auth: []
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
        - name: language_iso
          in: query
          required: false
          schema:
            type: string
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
        - name: sorted_by
          in: query
          required: false
          example: title_asc
          description: >
            Sort the records by one of the supported attributes:
              - title
              - active
              - required_on_checkout
              - created_at
              - updated_at
            The sort attribute should be followed by one of the order
            directives: '_asc', '_desc'
          schema:
            type: string
        - name: search_query
          in: query
          required: false
          description: Filter agreements with their title
          schema:
            type: string
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  agreements:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 101
                        title:
                          type: string
                          example: Terms and conditions
                        active:
                          type: boolean
                          example: true
                        required_on_checkout:
                          type: boolean
                          example: false
                        company_country_ids:
                          type: array
                          example:
                            - '1'
                            - '2'
                        description:
                          type: string
                          example: This is the description/body of the agreement
                        show_path:
                          type: string
                          example: /agreements/101
                        language_iso:
                          type: string
                          example: en
                        required:
                          type: boolean
                          example: true
                        enrollment_pack_id:
                          type:
                            - integer
                            - 'null'
                          example: 1
                        created_at:
                          type: string
                          format: date_time
                          example: '2025-06-02T12:34:56Z'
                        updated_at:
                          type: string
                          format: date_time
                          example: '2025-06-02T12:34:56Z'
                        attachments:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                              url:
                                type: string
                              filename:
                                type: string
                              content_type:
                                type: string
                              content_size:
                                type: integer
                              kind:
                                type: string
                              metadata:
                                type:
                                  - object
                                  - 'null'
                  meta:
                    oneOf:
                      - type: object
                        properties:
                          request_id:
                            type: string
                          timestamp:
                            type: string
                          pagination:
                            type: object
                            properties:
                              current_page:
                                type: integer
                              total_pages:
                                type: integer
                              total_count:
                                type: integer
                              per_page:
                                type: integer
                        required:
                          - request_id
                          - timestamp
                          - pagination
                      - type: object
                        properties:
                          request_id:
                            type: string
                            example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                          timestamp:
                            type: string
                            example: '2024-12-10T08:04:10Z'
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Invalid credentials.
                required:
                  - message
    post:
      summary: Creates an agreement
      tags:
        - Agreements
      operationId: createAgreement
      description: >-
        Only allows creating agreements in english. Use update api to add
        contents in other languages
      security:
        - bearer_auth: []
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
        - name: language_iso
          in: query
          required: false
          schema:
            type: string
      responses:
        '201':
          description: >-
            creating agreements in a different language defaults to english
            automatically
          content:
            application/json:
              schema:
                type: object
                properties:
                  agreement:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 101
                      title:
                        type: string
                        example: Terms and conditions
                      active:
                        type: boolean
                        example: true
                      required_on_checkout:
                        type: boolean
                        example: false
                      company_country_ids:
                        type: array
                        example:
                          - '1'
                          - '2'
                      description:
                        type: string
                        example: This is the description/body of the agreement
                      show_path:
                        type: string
                        example: /agreements/101
                      language_iso:
                        type: string
                        example: en
                      required:
                        type: boolean
                        example: true
                      enrollment_pack_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      created_at:
                        type: string
                        format: date_time
                        example: '2025-06-02T12:34:56Z'
                      updated_at:
                        type: string
                        format: date_time
                        example: '2025-06-02T12:34:56Z'
                      attachments:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            url:
                              type: string
                            filename:
                              type: string
                            content_type:
                              type: string
                            content_size:
                              type: integer
                            kind:
                              type: string
                            metadata:
                              type:
                                - object
                                - 'null'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: when enrollment pack does not exist
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Invalid parameters.
                  errors:
                    type: object
                    properties:
                      enrollment_pack_agreements:
                        type: string
                        example: Enrollment Pack not found.
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
                  - errors
                  - meta
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                agreement:
                  type: object
                  properties:
                    title:
                      type: string
                      example: New Agreement
                    description:
                      type: string
                      example: This is a new agreement.
                    enrollment_pack_id:
                      type: integer
                      example: 1
                      description: >-
                        ID of the enrollment pack to associate with this
                        agreement
                    attachments_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          url:
                            type: string
                            example: http://example.com/file.png
                          filename:
                            type: string
                            example: file.png
                          kind:
                            type: string
                            example: image
                          content_type:
                            type: string
                            example: image/png
                          content_size:
                            type: integer
                            example: 1024
                          metadata:
                            type: object
                        required:
                          - url
                          - filename
                  required:
                    - title
                    - description
              required:
                - agreement
  /api/agreements/{id}/clone:
    post:
      summary: Clones an agreement
      tags:
        - Agreements
      operationId: cloneAgreement
      security:
        - bearer_auth: []
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  agreement:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 101
                      title:
                        type: string
                        example: Terms and conditions
                      active:
                        type: boolean
                        example: true
                      required_on_checkout:
                        type: boolean
                        example: false
                      company_country_ids:
                        type: array
                        example:
                          - '1'
                          - '2'
                      description:
                        type: string
                        example: This is the description/body of the agreement
                      show_path:
                        type: string
                        example: /agreements/101
                      language_iso:
                        type: string
                        example: en
                      required:
                        type: boolean
                        example: true
                      enrollment_pack_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      created_at:
                        type: string
                        format: date_time
                        example: '2025-06-02T12:34:56Z'
                      updated_at:
                        type: string
                        format: date_time
                        example: '2025-06-02T12:34:56Z'
                      attachments:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            url:
                              type: string
                            filename:
                              type: string
                            content_type:
                              type: string
                            content_size:
                              type: integer
                            kind:
                              type: string
                            metadata:
                              type:
                                - object
                                - 'null'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Agreement not Found
                  errors:
                    type: object
                    example:
                      id:
                        - Error
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Could not Clone
                  errors:
                    type: object
                    example:
                      title:
                        - Exists
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
  /api/agreements/bulk_delete:
    delete:
      summary: Bulk deletes agreements
      tags:
        - Agreements
      operationId: bulkDeleteAgreements
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  agreement_ids:
                    type: array
                    items:
                      type: integer
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                example:
                  agreement_ids:
                    - 1
                    - 2
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Not Found
                  errors:
                    type: object
                    example:
                      agreement_ids:
                        - Not Found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Failed to delete.
                  errors:
                    type: object
                    example:
                      agreement_ids:
                        - Failed to delete.
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                agreement_ids:
                  type: array
                  items:
                    type: integer
              example:
                agreement_ids:
                  - 1
                  - 2
              required:
                - agreement_ids
        required: true
  /api/agreements/bulk_clone:
    post:
      summary: Clones multiple agreement
      tags:
        - Agreements
      operationId: bulkCloneAgreement
      security:
        - bearer_auth: []
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  agreements:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 101
                        title:
                          type: string
                          example: Terms and conditions
                        active:
                          type: boolean
                          example: true
                        required_on_checkout:
                          type: boolean
                          example: false
                        company_country_ids:
                          type: array
                          example:
                            - '1'
                            - '2'
                        description:
                          type: string
                          example: This is the description/body of the agreement
                        show_path:
                          type: string
                          example: /agreements/101
                        language_iso:
                          type: string
                          example: en
                        required:
                          type: boolean
                          example: true
                        enrollment_pack_id:
                          type:
                            - integer
                            - 'null'
                          example: 1
                        created_at:
                          type: string
                          format: date_time
                          example: '2025-06-02T12:34:56Z'
                        updated_at:
                          type: string
                          format: date_time
                          example: '2025-06-02T12:34:56Z'
                        attachments:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                              url:
                                type: string
                              filename:
                                type: string
                              content_type:
                                type: string
                              content_size:
                                type: integer
                              kind:
                                type: string
                              metadata:
                                type:
                                  - object
                                  - 'null'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Could not Clone
                  errors:
                    type: object
                    example:
                      agreement_ids:
                        - Not Found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Could not Clone
                  errors:
                    type: object
                    example:
                      agreement_ids:
                        - Could Not Clone
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                agreement_ids:
                  type: array
                  items:
                    type: integer
              example:
                agreement_ids:
                  - 1
                  - 2
        required: true
  /api/payments/apple_pay_session:
    post:
      summary: Creates an Apple Pay session
      tags:
        - ApplePay
      description: Initialize an Apple Pay session for client-side Apple Pay integration
      operationId: createApplePaySession
      parameters: []
      responses:
        '200':
          description: Apple Pay session created
          content:
            application/json:
              schema:
                type: object
                properties:
                  apple_pay:
                    type: object
                    description: Apple Pay session data
                    example:
                      epochTimestamp: 1742464455114
                      expiresAt: 1742468055114
                      merchantSessionIdentifier: >-
                        SSHB9FDFEBF1A5C40C598D66F4E81C36136_916523AAED1343F5BC5815E12BEE9250AFFDC1A17C46B0DE5A943F0F94927C24
                      nonce: 649819fa
                      merchantIdentifier: >-
                        997088D3D0066273673AB74ADBB9F3B4F0ADAC2531EC26C424930C0BE0BA3924
                      domainName: www.example.com
                      displayName: Example Merchant
                      signature: >-
                        308006092a864886f70d010702a0803080020101310d300b0609608648016503040201308006092a864886f70d0107010000a080308203e43082038ba003020102020859d8a1bcaaf4e3cd300a06082a8648ce3d040302307a312e302c06035504030c254170706c65204170706c69636174696f6e20496e746567726174696f6e204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b3009060355040613025553301e170d3231303432303139333730305a170d3236303431393139333635395a30623128302606035504030c1f6563632d736d702d62726f6b65722d7369676e5f5543342d53414e44424f5831143012060355040b0c0b694f532053797374656d7331133011060355040a0c0a4170706c6520496e632e310b30090603550406130255533059301306072a8648ce3d020106082a8648ce3d030107034200048230fdabc39cf75e202c50d99b4512e637e2a901dd6cb3e0b1cd4b526798f8cf4ebde81a25a8c21e4c33ddce8e2a96c2f6afa1930345c4e87a4426ce951b1295a38202113082020d300c0603551d130101ff04023000301f0603551d2304183016801423f249c44f93e4ef27e6c4f6286c3fa2bbfd2e4b304506082b0601050507010104393037303506082b060105050730018629687474703a2f2f6f6373702e6170706c652e636f6d2f6f63737030342d6170706c65616963613330323082011d0603551d2004820114308201103082010c06092a864886f7636405013081fe3081c306082b060105050702023081b60c81b352656c69616e6365206f6e207468697320636572746966696361746520627920616e7920706172747920617373756d657320616363657074616e6365206f6620746865207468656e206170706c696361626c65207374616e64617264207465726d7320616e6420636f6e646974696f6e73206f66207573652c20636572746966696361746520706f6c69637920616e642063657274696669636174696f6e2070726163746963652073746174656d656e74732e303606082b06010505070201162a687474703a2f2f7777772e6170706c652e636f6d2f6365727469666963617465617574686f726974792f30340603551d1f042d302b3029a027a0258623687474703a2f2f63726c2e6170706c652e636f6d2f6170706c6561696361332e63726c301d0603551d0e041604140224300b9aeeed463197a4a65a299e4271821c45300e0603551d0f0101ff040403020780300f06092a864886f76364061d04020500300a06082a8648ce3d0403020347003044022074a1b324db4249430dd3274c5074c4808d9a1f480e3a85c5c1362566325fbca3022069369053abf50b5a52f9f6004dc58aad6c50a7d608683790e0a73ad01e4ad981308202ee30820275a0030201020208496d2fbf3a98da97300a06082a8648ce3d0403023067311b301906035504030c124170706c6520526f6f74204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b3009060355040613025553301e170d3134303530363233343633305a170d3239303530363233343633305a307a312e302c06035504030c254170706c65204170706c69636174696f6e20496e746567726174696f6e204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b30090603550406130255533059301306072a8648ce3d020106082a8648ce3d03010703420004f017118419d76485d51a5e25810776e880a2efde7bae4de08dfc4b93e13356d5665b35ae22d097760d224e7bba08fd7617ce88cb76bb6670bec8e82984ff5445a381f73081f4304606082b06010505070101043a3038303606082b06010505073001862a687474703a2f2f6f6373702e6170706c652e636f6d2f6f63737030342d6170706c65726f6f7463616733301d0603551d0e0416041423f249c44f93e4ef27e6c4f6286c3fa2bbfd2e4b300f0603551d130101ff040530030101ff301f0603551d23041830168014bbb0dea15833889aa48a99debebdebafdacb24ab30370603551d1f0430302e302ca02aa0288626687474703a2f2f63726c2e6170706c652e636f6d2f6170706c65726f6f74636167332e63726c300e0603551d0f0101ff0404030201063010060a2a864886f7636406020e04020500300a06082a8648ce3d040302036700306402303acf7283511699b186fb35c356ca62bff417edd90f754da28ebef19c815e42b789f898f79b599f98d5410d8f9de9c2fe0230322dd54421b0a305776c5df3383b9067fd177c2c216d964fc6726982126f54f87a7d1b99cb9b0989216106990f09921d00003182018730820183020101308186307a312e302c06035504030c254170706c65204170706c69636174696f6e20496e746567726174696f6e204341202d20473331263024060355040b0c1d4170706c652043657274696669636174696f6e20417574686f7269747931133011060355040a0c0a4170706c6520496e632e310b3009060355040613025553020859d8a1bcaaf4e3cd300b0609608648016503040201a08193301806092a864886f70d010903310b06092a864886f70d010701301c06092a864886f70d010905310f170d3235303332303039353431355a302806092a864886f70d010934311b3019300b0609608648016503040201a10a06082a8648ce3d040302302f06092a864886f70d0109043122042058f90b3d8336b18d344ef98894765a47d2680e8e442c67b816100121b36598a7300a06082a8648ce3d04030204463044022018afc2313938becc90964454c5787ee61769c905721e9f68942f5f7a9b633e9702201dd385fd2c9c8a5ae3a44fdd82948a6a5ad63094af2755c9516824afaba3cf48000000000000
                      operationalAnalyticsIdentifier: >-
                        Example
                        Merchant:997088D3D0066273673AB74ADBB9F3B4F0ADAC2531EC26C424930C0BE0BA3924
                      retries: 0
                      pspId: >-
                        997088D3D0066273673AB74ADBB9F3B4F0ADAC2531EC26C424930C0BE0BA3924
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Company not found
                  errors:
                    type: object
                    example:
                      company:
                        - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: Apple Pay not configured properly
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Apple Pay is not configured properly
                  errors:
                    type: object
                    example:
                      apple_pay:
                        - is not configured properly
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - company_id
                - country_id
                - apple_session_url
              properties:
                company_id:
                  type: integer
                  description: Company ID
                  example: 123
                country_id:
                  type: integer
                  description: Country ID
                  example: 1
                apple_session_url:
                  type: string
                  description: Apple Pay session URL
                  example: >-
                    https://apple-pay-gateway.apple.com/paymentservices/startSession
        description: Session parameters
  /api/payments/apple_pay_authorize:
    post:
      summary: Processes an Apple Pay payment
      tags:
        - ApplePay
      description: Process an Apple Pay payment for a cart
      operationId: processApplePayPayment
      parameters: []
      responses:
        '201':
          description: Payment processed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: Approved
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '404':
          description: Cart not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Cart not found
                  errors:
                    type: object
                    example:
                      cart:
                        - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: Payment processing failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Payment authorization failed
                  errors:
                    type: object
                    example:
                      apple_pay:
                        - Payment authorization failed
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - cart_token
                - apple_pay_payload
              properties:
                cart_token:
                  type: string
                  description: Cart token
                  example: ct_7UUUXZP7QLl1NRZZuHQN3
                apple_pay_payload:
                  type: object
                  description: >-
                    Apple Pay payment payload, which can be derived from Apple
                    Pay payment response;
                    https://developer.apple.com/documentation/apple_pay_on_the_web/applepaypayment
                  required:
                    - token
                  properties:
                    token:
                      type: object
                      required:
                        - paymentData
                      properties:
                        paymentData:
                          type: object
                          required:
                            - data
                            - signature
                            - version
                            - header
                          properties:
                            data:
                              type: string
                              example: >-
                                G4kP5IrX+PZLAZUOPWbve3XXrsqdfMWkRSnRAfxVpXIpOZCQEJ
                            signature:
                              type: string
                              example: >-
                                MIAGCSqGSIb3DQEHAqCAMIACAQExDTALBglghkgBZQMEAgEwgAYJK
                            version:
                              type: string
                              example: EC_v1
                            header:
                              type: object
                              required:
                                - ephemeralPublicKey
                                - publicKeyHash
                                - transactionId
                              properties:
                                publicKeyHash:
                                  type: string
                                  example: ufHTw1HBjGwgkC023My0DcsTyZxXJT0sA2VnmSwe4ss=
                                ephemeralPublicKey:
                                  type: string
                                  example: >-
                                    MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEGQpUf5fW7pvUKQmw+
                                transactionId:
                                  type: string
                                  example: >-
                                    3d688a5c36e35abccdf21ed124fad00426abc4e49b1f0cf95701400717408122
        description: Payment parameters
  /api/public/v2025-06/apple_pay_domain/{hostname}:
    get:
      summary: Retrieves an Apple Pay domain verification file
      tags:
        - ApplePay
      description: Fetches the Apple Pay domain verification file for the given hostname
      operationId: GetApplePayDomainVerificationFile
      parameters:
        - name: hostname
          in: path
          required: true
          description: The hostname for which to retrieve the verification file
          schema:
            type: string
      responses:
        '200':
          description: Apple Pay domain verification file found
          content:
            application/json:
              schema:
                type: object
                properties:
                  domain_verification_file:
                    type: string
                    description: Apple Pay Domain Verification File content
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '404':
          description: Domain not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Domain with the hostname not found
                  errors:
                    type: object
                    properties:
                      hostname:
                        type: array
                        items:
                          type: string
                        example:
                          - with the hostname not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: No Apple Pay payment account
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: >-
                      Hostname is not configured properly with an Apple Pay
                      Payment Account
                  errors:
                    type: object
                    properties:
                      hostname:
                        type: array
                        items:
                          type: string
                        example:
                          - >-
                            is not configured properly with an Apple Pay Payment
                            Account
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
  /api/application_themes:
    get:
      summary: List application themes
      description: Get all application themes with optional filters
      tags:
        - Application Themes
      operationId: listApplicationThemes
      security:
        - bearer_auth: []
      parameters:
        - name: page
          in: query
          schema:
            type: integer
            default: 1
          required: false
          description: Page number for pagination
        - name: per_page
          in: query
          schema:
            type: integer
            default: 10
          required: false
          description: Number of records per page
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  application_themes:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        company_id:
                          type: integer
                          example: 123
                        name:
                          type: string
                          example: Modern Theme
                        description:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type: string
                              example: description
                            body:
                              type: string
                              example: >-
                                This is a sample description for an application
                                theme.
                            record_type:
                              type: string
                              example: ApplicationTheme
                            record_id:
                              type: integer
                              example: 1
                            created_at:
                              type: string
                              format: date_time
                              example: '2023-07-24T10:00:00.000Z'
                            updated_at:
                              type: string
                              format: date_time
                              example: '2023-07-24T10:00:00.000Z'
                            locale:
                              type:
                                - string
                                - 'null'
                              example: null
                          example:
                            id:
                              type: integer
                              example: 1
                            name:
                              type: string
                              example: description
                            body:
                              type: string
                              example: >-
                                This is a sample description for an application
                                theme.
                            record_type:
                              type: string
                              example: ApplicationTheme
                            record_id:
                              type: integer
                              example: 1
                            created_at:
                              type: string
                              format: date_time
                              example: '2023-07-24T10:00:00.000Z'
                            updated_at:
                              type: string
                              format: date_time
                              example: '2023-07-24T10:00:00.000Z'
                            locale:
                              type:
                                - string
                                - 'null'
                              example: null
                        cover_image:
                          type:
                            - string
                            - 'null'
                          example: >-
                            https://ik.imagekit.io/fluid/s3/83yozdmzQ1qLeKn89ffS_unnamed_file
                        status:
                          type: string
                          example: draft
                        variables:
                          type:
                            - string
                            - 'null'
                          example: >-
                            {"primary_color": "#ff0000", "secondary_color":
                            "#00ff00"}
                        custom_stylesheet:
                          type:
                            - string
                            - 'null'
                          example: 'body { background-color: #fff; }'
                        global_stylesheet:
                          type:
                            - string
                            - 'null'
                          example: 'h1 { color: #333; }'
                        created_at:
                          type: string
                          format: date_time
                          example: '2023-07-24T10:00:00.000Z'
                        updated_at:
                          type: string
                          format: date_time
                          example: '2023-07-24T10:00:00.000Z'
                      required:
                        - id
                        - company_id
                        - name
                        - status
                        - created_at
                        - updated_at
                      additionalProperties: true
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                      total_count:
                        type: integer
                        example: 42
                      total_pages:
                        type: integer
                        example: 3
                      current_page:
                        type: integer
                        example: 1
                      per_page:
                        type: integer
                        example: 10
    post:
      summary: Create an application theme
      tags:
        - Application Themes
      operationId: createApplicationTheme
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: created
          content:
            application/json:
              schema:
                type: object
                properties:
                  application_theme:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      company_id:
                        type: integer
                        example: 123
                      name:
                        type: string
                        example: Modern Theme
                      description:
                        type:
                          - object
                          - 'null'
                        example: null
                      cover_image:
                        type:
                          - string
                          - 'null'
                        example: >-
                          https://ik.imagekit.io/fluid/s3/83yozdmzQ1qLeKn89ffS_unnamed_file
                      status:
                        type: string
                        example: draft
                      variables:
                        type:
                          - string
                          - 'null'
                        example: >-
                          {"primary_color": "#ff0000", "secondary_color":
                          "#00ff00"}
                      custom_stylesheet:
                        type:
                          - string
                          - 'null'
                        example: 'body { background-color: #fff; }'
                      global_stylesheet:
                        type:
                          - string
                          - 'null'
                        example: 'h1 { color: #333; }'
                      created_at:
                        type: string
                        format: date_time
                        example: '2023-07-24T10:00:00.000Z'
                      updated_at:
                        type: string
                        format: date_time
                        example: '2023-07-24T10:00:00.000Z'
                      application_theme_templates:
                        type: array
                        items:
                          type: object
                        example: []
                      images:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            url:
                              type: string
                              example: https://example.com/image.jpg
                            position:
                              type: integer
                              example: 1
                        example: []
                    required:
                      - id
                      - company_id
                      - name
                      - status
                      - created_at
                      - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Invalid parameters
                  errors:
                    type: object
                    properties:
                      application_theme:
                        type: object
                        properties:
                          name:
                            type: array
                            items:
                              type: string
                            example:
                              - must be filled
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                application_theme:
                  type: object
                  properties:
                    name:
                      type: string
                      example: Modern Theme
                      description: Name of the application theme
                    description:
                      type: string
                      example: A clean modern theme
                      description: Description of the application theme
                    status:
                      type: string
                      example: draft
                      description: Status of the application theme
                    variables:
                      type: string
                      description: Theme variables in JSON format
                    custom_stylesheet:
                      type: string
                      description: Custom CSS for the theme
                    global_stylesheet:
                      type: string
                      description: Global CSS for the theme
                    cover_image_url:
                      type: string
                      example: https://example.com/image.jpg
                      description: URL for the cover image
                  required:
                    - name
              required:
                - application_theme
  /api/application_themes/{id}:
    get:
      summary: Get an application theme
      tags:
        - Application Themes
      operationId: getApplicationTheme
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Application Theme ID
          schema:
            type: integer
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  application_theme:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      company_id:
                        type: integer
                        example: 123
                      name:
                        type: string
                        example: Modern Theme
                      description:
                        type:
                          - object
                          - 'null'
                        example: null
                      cover_image:
                        type:
                          - string
                          - 'null'
                        example: >-
                          https://ik.imagekit.io/fluid/s3/83yozdmzQ1qLeKn89ffS_unnamed_file
                      status:
                        type: string
                        example: draft
                      variables:
                        type:
                          - string
                          - 'null'
                        example: >-
                          {"primary_color": "#ff0000", "secondary_color":
                          "#00ff00"}
                      custom_stylesheet:
                        type:
                          - string
                          - 'null'
                        example: 'body { background-color: #fff; }'
                      global_stylesheet:
                        type:
                          - string
                          - 'null'
                        example: 'h1 { color: #333; }'
                      created_at:
                        type: string
                        format: date_time
                        example: '2023-07-24T10:00:00.000Z'
                      updated_at:
                        type: string
                        format: date_time
                        example: '2023-07-24T10:00:00.000Z'
                      application_theme_templates:
                        type: array
                        items:
                          type: object
                        example: []
                      images:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            url:
                              type: string
                              example: https://example.com/image.jpg
                            position:
                              type: integer
                              example: 1
                        example: []
                    required:
                      - id
                      - company_id
                      - name
                      - status
                      - created_at
                      - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: ApplicationTheme not found.
                  errors:
                    type: object
                    properties:
                      application_theme:
                        type: object
                        properties:
                          id:
                            type: string
                            example: 'ApplicationTheme not found.. id: 999999'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
                  - errors
                  - meta
    patch:
      summary: Update an application theme
      tags:
        - Application Themes
      operationId: updateApplicationTheme
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Application Theme ID
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  application_theme:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      company_id:
                        type: integer
                        example: 123
                      name:
                        type: string
                        example: Modern Theme
                      description:
                        type:
                          - object
                          - 'null'
                        example: null
                      cover_image:
                        type:
                          - string
                          - 'null'
                        example: >-
                          https://ik.imagekit.io/fluid/s3/83yozdmzQ1qLeKn89ffS_unnamed_file
                      status:
                        type: string
                        example: draft
                      variables:
                        type:
                          - string
                          - 'null'
                        example: >-
                          {"primary_color": "#ff0000", "secondary_color":
                          "#00ff00"}
                      custom_stylesheet:
                        type:
                          - string
                          - 'null'
                        example: 'body { background-color: #fff; }'
                      global_stylesheet:
                        type:
                          - string
                          - 'null'
                        example: 'h1 { color: #333; }'
                      created_at:
                        type: string
                        format: date_time
                        example: '2023-07-24T10:00:00.000Z'
                      updated_at:
                        type: string
                        format: date_time
                        example: '2023-07-24T10:00:00.000Z'
                      application_theme_templates:
                        type: array
                        items:
                          type: object
                        example: []
                      images:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            url:
                              type: string
                              example: https://example.com/image.jpg
                            position:
                              type: integer
                              example: 1
                        example: []
                    required:
                      - id
                      - company_id
                      - name
                      - status
                      - created_at
                      - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: ApplicationTheme not found.
                  errors:
                    type: object
                    properties:
                      application_theme:
                        type: object
                        properties:
                          id:
                            type: string
                            example: 'ApplicationTheme not found.. id: 999999'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
                  - errors
                  - meta
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                application_theme:
                  type: object
                  properties:
                    name:
                      type: string
                      example: Updated Theme Name
                      description: Name of the application theme
                    description:
                      type: string
                      example: Updated description
                      description: Description of the application theme
                    status:
                      type: string
                      example: draft
                      description: Status of the application theme
                    variables:
                      type: string
                      description: Theme variables in JSON format
                    custom_stylesheet:
                      type: string
                      description: Custom CSS for the theme
                    global_stylesheet:
                      type: string
                      description: Global CSS for the theme
                    cover_image_url:
                      type: string
                      example: https://example.com/updated-image.jpg
                      description: URL for the cover image
              required:
                - application_theme
    delete:
      summary: Delete an application theme
      tags:
        - Application Themes
      operationId: deleteApplicationTheme
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Application Theme ID
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Theme was successfully destroyed.
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: ApplicationTheme not found.
                  errors:
                    type: object
                    properties:
                      application_theme:
                        type: object
                        properties:
                          id:
                            type: string
                            example: 'ApplicationTheme not found.. id: 999999'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
                  - errors
                  - meta
        '422':
          description: cannot delete last theme
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Invalid parameters
                  errors:
                    type: object
                    properties:
                      base:
                        type: array
                        items:
                          type: string
                        example:
                          - is missing
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
  /api/application_themes/{id}/clone:
    post:
      summary: Clone an application theme
      tags:
        - Application Themes
      operationId: cloneApplicationTheme
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Application Theme ID to clone
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  application_theme:
                    type: object
                    properties:
                      id:
                        type: integer
                      company_id:
                        type: integer
                      name:
                        type: string
                      description:
                        type: 'null'
                      cover_image:
                        type:
                          - string
                          - 'null'
                      status:
                        type: string
                      variables:
                        type:
                          - string
                          - 'null'
                      custom_stylesheet:
                        type:
                          - string
                          - 'null'
                      global_stylesheet:
                        type:
                          - string
                          - 'null'
                      created_at:
                        type: string
                        format: date_time
                      updated_at:
                        type: string
                        format: date_time
                      application_theme_templates:
                        type: array
                        items:
                          type: object
                      images:
                        type: array
                        items:
                          type: object
                    required:
                      - id
                      - company_id
                      - name
                      - status
                      - created_at
                      - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: ApplicationTheme not found.
                  errors:
                    type: object
                    properties:
                      application_theme:
                        type: object
                        properties:
                          id:
                            type: string
                            example: 'ApplicationTheme not found.. id: 999999'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
                  - errors
                  - meta
  /api/application_themes/active:
    get:
      summary: Get current active application theme
      tags:
        - Application Themes
      operationId: getActiveApplicationTheme
      security:
        - bearer_auth: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  application_theme:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      company_id:
                        type: integer
                        example: 123
                      name:
                        type: string
                        example: Modern Theme
                      description:
                        type:
                          - object
                          - 'null'
                        example: null
                      cover_image:
                        type:
                          - string
                          - 'null'
                        example: >-
                          https://ik.imagekit.io/fluid/s3/83yozdmzQ1qLeKn89ffS_unnamed_file
                      status:
                        type: string
                        example: draft
                      variables:
                        type:
                          - string
                          - 'null'
                        example: >-
                          {"primary_color": "#ff0000", "secondary_color":
                          "#00ff00"}
                      custom_stylesheet:
                        type:
                          - string
                          - 'null'
                        example: 'body { background-color: #fff; }'
                      global_stylesheet:
                        type:
                          - string
                          - 'null'
                        example: 'h1 { color: #333; }'
                      created_at:
                        type: string
                        format: date_time
                        example: '2023-07-24T10:00:00.000Z'
                      updated_at:
                        type: string
                        format: date_time
                        example: '2023-07-24T10:00:00.000Z'
                      application_theme_templates:
                        type: array
                        items:
                          type: object
                        example: []
                      images:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            url:
                              type: string
                              example: https://example.com/image.jpg
                            position:
                              type: integer
                              example: 1
                        example: []
                    required:
                      - id
                      - company_id
                      - name
                      - status
                      - created_at
                      - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: ApplicationTheme not found.
                  errors:
                    type: object
                    properties:
                      application_theme:
                        type: object
                        properties:
                          id:
                            type: string
                            example: 'ApplicationTheme not found.. id: 999999'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
                  - errors
                  - meta
  /api/application_themes/{id}/import:
    post:
      summary: Import an application theme
      tags:
        - Application Themes
      operationId: importApplicationTheme
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Application Theme ID to import
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  application_theme:
                    type: object
                    properties:
                      id:
                        type: integer
                      company_id:
                        type: integer
                      name:
                        type: string
                      description:
                        type: 'null'
                      cover_image:
                        type:
                          - string
                          - 'null'
                      status:
                        type: string
                      variables:
                        type:
                          - string
                          - 'null'
                      custom_stylesheet:
                        type:
                          - string
                          - 'null'
                      global_stylesheet:
                        type:
                          - string
                          - 'null'
                      created_at:
                        type: string
                        format: date_time
                      updated_at:
                        type: string
                        format: date_time
                    required:
                      - id
                      - company_id
                      - name
                      - status
                      - created_at
                      - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: ApplicationTheme not found.
                  errors:
                    type: object
                    properties:
                      application_theme:
                        type: object
                        properties:
                          id:
                            type: string
                            example: 'ApplicationTheme not found.. id: 999999'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
                  - errors
                  - meta
  /api/application_themes/{id}/export:
    get:
      summary: Export an application theme
      tags:
        - Application Themes
      operationId: exportApplicationTheme
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Application Theme ID to export
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    example: https://storage.example.com/theme-export.zip
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: ApplicationTheme not found.
                  errors:
                    type: object
                    properties:
                      application_theme:
                        type: object
                        properties:
                          id:
                            type: string
                            example: 'ApplicationTheme not found.. id: 999999'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
                  - errors
                  - meta
  /api/application_themes/import_zip:
    post:
      summary: Import an application theme from zip file
      tags:
        - Application Themes
      operationId: importApplicationThemeFromZip
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  application_theme:
                    type: object
                    properties:
                      id:
                        type: integer
                      company_id:
                        type: integer
                      name:
                        type: string
                      description:
                        type: 'null'
                      cover_image:
                        type:
                          - string
                          - 'null'
                      status:
                        type: string
                      variables:
                        type:
                          - string
                          - 'null'
                      custom_stylesheet:
                        type:
                          - string
                          - 'null'
                      global_stylesheet:
                        type:
                          - string
                          - 'null'
                      created_at:
                        type: string
                        format: date_time
                      updated_at:
                        type: string
                        format: date_time
                      application_theme_templates:
                        type: array
                        items:
                          type: object
                      images:
                        type: array
                        items:
                          type: object
                    required:
                      - id
                      - company_id
                      - name
                      - status
                      - created_at
                      - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Invalid parameters
                  errors:
                    type: object
                    properties:
                      zip_file_url:
                        type: array
                        items:
                          type: string
                        example:
                          - is missing
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                zip_file_url:
                  type: string
                  example: https://storage.example.com/theme-import.zip
                  description: URL to a zip file containing a theme
              required:
                - zip_file_url
  /api/application_theme_templates:
    get:
      summary: Lists all theme templates
      tags:
        - ApplicationThemeTemplates
      security:
        - bearer_auth: []
      responses:
        '200':
          description: templates found
          content:
            application/json:
              schema:
                type: object
                properties:
                  templates:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        application_theme_id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: Default Theme Template
                        default:
                          type: boolean
                          example: false
                        content:
                          type: string
                          example: <html><body>This is a default template</body></html>
                        stylesheet:
                          type: string
                          example: 'body { background-color: #fff; }'
                        variables:
                          type: object
                          example: {}
                        themeable_type:
                          type: string
                          example: product
                          enum:
                            - product
                            - medium
                            - enrollment_pack
                            - shop_page
                            - navbar
                            - library
                            - page
                            - components
                            - library_navbar
                            - sections
                            - locales
                            - footer
                            - layouts
                            - category_page
                            - collection_page
                            - cart_page
                            - config
                            - home_page
                        status:
                          type: string
                          example: draft
                        url:
                          type:
                            - string
                            - 'null'
                          example: >-
                            https://test.example.com/home?preview=true&theme_template_id=1
                        created_at:
                          type:
                            - string
                            - 'null'
                          format: date-time
                          example: '2025-05-03T04:58:11Z'
                        updated_at:
                          type:
                            - string
                            - 'null'
                          format: date-time
                          example: '2025-05-03T04:58:11Z'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: aec35efe-1cdc-48ac-94e6-616831786625
                      timestamp:
                        type: string
                        format: date-time
                        example: '2025-05-03T04:58:11Z'
    post:
      summary: Creates a theme template
      tags:
        - ApplicationThemeTemplates
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: template created
          content:
            application/json:
              schema:
                type: object
                properties:
                  application_theme_template:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      application_theme_id:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: Default Theme Template
                      default:
                        type: boolean
                        example: false
                      content:
                        type: string
                        example: <html><body>This is a default template</body></html>
                      stylesheet:
                        type: string
                        example: 'body { background-color: #fff; }'
                      variables:
                        type: object
                        example: {}
                      themeable_type:
                        type: string
                        example: product
                        enum:
                          - product
                          - medium
                          - enrollment_pack
                          - shop_page
                          - navbar
                          - library
                          - page
                          - components
                          - library_navbar
                          - sections
                          - locales
                          - footer
                          - layouts
                          - category_page
                          - collection_page
                          - cart_page
                          - config
                          - home_page
                      status:
                        type: string
                        example: draft
                      url:
                        type:
                          - string
                          - 'null'
                        example: >-
                          https://test.example.com/home?preview=true&theme_template_id=1
                      created_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        example: '2025-05-03T04:58:11Z'
                      updated_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        example: '2025-05-03T04:58:11Z'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: aec35efe-1cdc-48ac-94e6-616831786625
                      timestamp:
                        type: string
                        format: date-time
                        example: '2025-05-03T04:58:11Z'
        '422':
          description: invalid request
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                application_theme_template:
                  type: object
                  properties:
                    name:
                      type: string
                    themeable_type:
                      type: string
                      enum:
                        - product
                        - medium
                        - enrollment_pack
                        - shop_page
                        - navbar
                        - library
                        - page
                        - components
                        - library_navbar
                        - sections
                        - locales
                        - footer
                        - layouts
                        - category_page
                        - collection_page
                        - cart_page
                        - config
                        - home_page
                    content:
                      type:
                        - string
                        - 'null'
                    stylesheet:
                      type:
                        - string
                        - 'null'
                    variables:
                      type:
                        - string
                        - 'null'
                  required:
                    - name
                    - themeable_type
                    - content
                    - stylesheet
                    - variables
    parameters:
      - name: application_theme_id
        in: query
        description: ID of the application theme
        required: true
        schema:
          type: string
  /api/application_theme_templates/{id}:
    get:
      summary: Retrieves a theme template
      tags:
        - ApplicationThemeTemplates
      security:
        - bearer_auth: []
      responses:
        '200':
          description: template found
          content:
            application/json:
              schema:
                type: object
                properties:
                  application_theme_template:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      application_theme_id:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: Default Theme Template
                      default:
                        type: boolean
                        example: false
                      content:
                        type: string
                        example: <html><body>This is a default template</body></html>
                      stylesheet:
                        type: string
                        example: 'body { background-color: #fff; }'
                      variables:
                        type: object
                        example: {}
                      themeable_type:
                        type: string
                        example: product
                        enum:
                          - product
                          - medium
                          - enrollment_pack
                          - shop_page
                          - navbar
                          - library
                          - page
                          - components
                          - library_navbar
                          - sections
                          - locales
                          - footer
                          - layouts
                          - category_page
                          - collection_page
                          - cart_page
                          - config
                          - home_page
                      status:
                        type: string
                        example: draft
                      url:
                        type:
                          - string
                          - 'null'
                        example: >-
                          https://test.example.com/home?preview=true&theme_template_id=1
                      created_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        example: '2025-05-03T04:58:11Z'
                      updated_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        example: '2025-05-03T04:58:11Z'
                      versions:
                        type:
                          - array
                          - 'null'
                        items:
                          type: object
                        description: History of page versions
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: aec35efe-1cdc-48ac-94e6-616831786625
                      timestamp:
                        type: string
                        format: date-time
                        example: '2025-05-03T04:58:11Z'
        '404':
          description: template not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: not_found
                  data:
                    type: object
                    properties:
                      error:
                        type: string
    patch:
      summary: Updates a theme template
      tags:
        - ApplicationThemeTemplates
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: template updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  application_theme_template:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      application_theme_id:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: Default Theme Template
                      default:
                        type: boolean
                        example: false
                      content:
                        type: string
                        example: <html><body>This is a default template</body></html>
                      stylesheet:
                        type: string
                        example: 'body { background-color: #fff; }'
                      variables:
                        type: object
                        example: {}
                      themeable_type:
                        type: string
                        example: product
                        enum:
                          - product
                          - medium
                          - enrollment_pack
                          - shop_page
                          - navbar
                          - library
                          - page
                          - components
                          - library_navbar
                          - sections
                          - locales
                          - footer
                          - layouts
                          - category_page
                          - collection_page
                          - cart_page
                          - config
                          - home_page
                      status:
                        type: string
                        example: draft
                      url:
                        type:
                          - string
                          - 'null'
                        example: >-
                          https://test.example.com/home?preview=true&theme_template_id=1
                      created_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        example: '2025-05-03T04:58:11Z'
                      updated_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        example: '2025-05-03T04:58:11Z'
                      versions:
                        type:
                          - array
                          - 'null'
                        items:
                          type: object
                        description: History of page versions
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: aec35efe-1cdc-48ac-94e6-616831786625
                      timestamp:
                        type: string
                        format: date-time
                        example: '2025-05-03T04:58:11Z'
        '422':
          description: invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: aec35efe-1cdc-48ac-94e6-616831786625
                      timestamp:
                        type: string
                        format: date-time
                        example: '2025-05-03T04:58:11Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                application_theme_template:
                  type: object
                  properties:
                    name:
                      type: string
                    content:
                      type: string
                    themeable_type:
                      type: string
                    stylesheet:
                      type: string
                    variables:
                      type: string
                publish:
                  type: boolean
    delete:
      summary: Deletes a theme template
      tags:
        - ApplicationThemeTemplates
      security:
        - bearer_auth: []
      responses:
        '200':
          description: template deleted
    parameters:
      - name: id
        in: path
        description: ID of the theme template
        required: true
        schema:
          type: string
      - name: version
        in: query
        required: false
        description: Version of the theme template to retrieve
        schema:
          type: string
  /api/application_theme_templates/{id}/clone:
    post:
      summary: Clones a theme template
      tags:
        - ApplicationThemeTemplates
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: template cloned
          content:
            application/json:
              schema:
                type: object
                properties:
                  application_theme_template:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      application_theme_id:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: Default Theme Template
                      default:
                        type: boolean
                        example: false
                      content:
                        type: string
                        example: <html><body>This is a default template</body></html>
                      stylesheet:
                        type: string
                        example: 'body { background-color: #fff; }'
                      variables:
                        type: object
                        example: {}
                      themeable_type:
                        type: string
                        example: product
                        enum:
                          - product
                          - medium
                          - enrollment_pack
                          - shop_page
                          - navbar
                          - library
                          - page
                          - components
                          - library_navbar
                          - sections
                          - locales
                          - footer
                          - layouts
                          - category_page
                          - collection_page
                          - cart_page
                          - config
                          - home_page
                      status:
                        type: string
                        example: draft
                      url:
                        type:
                          - string
                          - 'null'
                        example: >-
                          https://test.example.com/home?preview=true&theme_template_id=1
                      created_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        example: '2025-05-03T04:58:11Z'
                      updated_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        example: '2025-05-03T04:58:11Z'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: aec35efe-1cdc-48ac-94e6-616831786625
                      timestamp:
                        type: string
                        format: date-time
                        example: '2025-05-03T04:58:11Z'
    parameters:
      - name: id
        in: path
        description: ID of the theme template to clone
        required: true
        schema:
          type: string
  /api/application_theme_templates/{id}/set_default:
    post:
      summary: Sets a theme template as default
      tags:
        - ApplicationThemeTemplates
      security:
        - bearer_auth: []
      responses:
        '200':
          description: template set as default
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    example: 1
                  application_theme_id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: Default Theme Template
                  default:
                    type: boolean
                    example: false
                  content:
                    type: string
                    example: <html><body>This is a default template</body></html>
                  stylesheet:
                    type: string
                    example: 'body { background-color: #fff; }'
                  variables:
                    type: object
                    example: {}
                  themeable_type:
                    type: string
                    example: product
                    enum:
                      - product
                      - medium
                      - enrollment_pack
                      - shop_page
                      - navbar
                      - library
                      - page
                      - components
                      - library_navbar
                      - sections
                      - locales
                      - footer
                      - layouts
                      - category_page
                      - collection_page
                      - cart_page
                      - config
                      - home_page
                  status:
                    type: string
                    example: draft
                  url:
                    type:
                      - string
                      - 'null'
                    example: >-
                      https://test.example.com/home?preview=true&theme_template_id=1
                  created_at:
                    type:
                      - string
                      - 'null'
                    format: date-time
                    example: '2025-05-03T04:58:11Z'
                  updated_at:
                    type:
                      - string
                      - 'null'
                    format: date-time
                    example: '2025-05-03T04:58:11Z'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: aec35efe-1cdc-48ac-94e6-616831786625
                      timestamp:
                        type: string
                        format: date-time
                        example: '2025-05-03T04:58:11Z'
        '404':
          description: template not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: not_found
                  data:
                    type: object
                    properties:
                      error:
                        type: string
    parameters:
      - name: id
        in: path
        description: ID of the theme template to set as default
        required: true
        schema:
          type: string
  /api/application_theme_templates/{id}/version_diff:
    get:
      summary: Gets version diff information
      tags:
        - ApplicationThemeTemplates
      security:
        - bearer_auth: []
      responses:
        '200':
          description: version diff found
          content:
            application/json:
              schema:
                type: object
                properties:
                  audit:
                    type: object
                    properties:
                      version:
                        type: integer
                      created_at:
                        type: string
                        format: date-time
                      user_id:
                        type:
                          - string
                          - 'null'
                      user_name:
                        type:
                          - string
                          - 'null'
                      changes:
                        type: object
                  application_theme_template:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      application_theme_id:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: Default Theme Template
                      default:
                        type: boolean
                        example: false
                      content:
                        type: string
                        example: <html><body>This is a default template</body></html>
                      stylesheet:
                        type: string
                        example: 'body { background-color: #fff; }'
                      variables:
                        type: object
                        example: {}
                      themeable_type:
                        type: string
                        example: product
                        enum:
                          - product
                          - medium
                          - enrollment_pack
                          - shop_page
                          - navbar
                          - library
                          - page
                          - components
                          - library_navbar
                          - sections
                          - locales
                          - footer
                          - layouts
                          - category_page
                          - collection_page
                          - cart_page
                          - config
                          - home_page
                      status:
                        type: string
                        example: draft
                      url:
                        type:
                          - string
                          - 'null'
                        example: >-
                          https://test.example.com/home?preview=true&theme_template_id=1
                      created_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        example: '2025-05-03T04:58:11Z'
                      updated_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        example: '2025-05-03T04:58:11Z'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: aec35efe-1cdc-48ac-94e6-616831786625
                      timestamp:
                        type: string
                        format: date-time
                        example: '2025-05-03T04:58:11Z'
        '404':
          description: version not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: aec35efe-1cdc-48ac-94e6-616831786625
                      timestamp:
                        type: string
                        format: date-time
                        example: '2025-05-03T04:58:11Z'
    parameters:
      - name: id
        in: path
        description: ID of the theme template
        required: true
        schema:
          type: string
      - name: version
        in: query
        description: Version number to compare with
        schema:
          type: integer
  /api/application_theme_templates/{id}/render_page:
    post:
      summary: Renders a page for a theme template
      tags:
        - ApplicationThemeTemplates
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: template found
          content:
            application/json:
              schema:
                type: object
                properties:
                  liquid_content:
                    type: string
                  html_content:
                    type: string
                  page_stylesheet:
                    type: string
                    description: >-
                      Stylesheet for the rendered page. Includes all the css
                      needed by the page.
                  template_stylesheet:
                    type: string
                    description: Stylesheet for the template itself.
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: aec35efe-1cdc-48ac-94e6-616831786625
                      timestamp:
                        type: string
                        format: date-time
                        example: '2025-05-03T04:58:11Z'
        '404':
          description: template not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: not_found
                  data:
                    type: object
                    properties:
                      error:
                        type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                resources:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: ID of the resource to render
                      type:
                        type: string
                        description: Type of the resource to render
                        enum:
                          - product
                          - medium
                          - enrollment_pack
                          - library
                          - page
                    required:
                      - id
                application_theme_template:
                  type: object
                  properties:
                    content:
                      type: string
                    stylesheet:
                      type: string
                    variables:
                      type: string
    parameters:
      - name: id
        in: path
        description: ID of the theme template
        required: true
        schema:
          type: string
      - name: version
        in: query
        required: false
        description: Version of the theme template to retrieve
        schema:
          type: string
  /api/application_theme_templates/{id}/available_variables:
    get:
      summary: Get available variables for a theme template
      description: Get available variables that can be used in the theme template
      tags:
        - ApplicationThemeTemplates
      operationId: getThemeTemplateAvailableVariablesApi
      security:
        - bearer_auth: []
      responses:
        '200':
          description: available variables found
          content:
            application/json:
              schema:
                type: object
                properties:
                  available_variables:
                    type: object
                    example:
                      company:
                        name: ACME Inc.
                        subdomain: acme
                      template:
                        company_name: ACME Inc.
                        site_url: https://example.com
                    description: Object containing available template variables
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        description: Unique identifier for the request
                      timestamp:
                        type: string
                        description: Time when the request was processed
                    required:
                      - request_id
                      - timestamp
                    description: Metadata about the request and response
                description: Successful response with available variables and metadata
        '404':
          description: template not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Template not found
                    description: Error message
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - Template not found
                        description: List of error messages for the id field
                    description: Detailed error information
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        description: Unique identifier for the request
                      timestamp:
                        type: string
                        description: Time when the request was processed
                    required:
                      - request_id
                      - timestamp
                    description: Metadata about the request and response
                description: Error response when template is not found
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
  /api/application_theme_templates/{id}/publish:
    post:
      summary: Publishes the template
      tags:
        - ApplicationThemeTemplates
      security:
        - bearer_auth: []
      responses:
        '200':
          description: template found
          content:
            application/json:
              schema:
                type: object
                properties:
                  application_theme_template:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      application_theme_id:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: Default Theme Template
                      default:
                        type: boolean
                        example: false
                      content:
                        type: string
                        example: <html><body>This is a default template</body></html>
                      stylesheet:
                        type: string
                        example: 'body { background-color: #fff; }'
                      variables:
                        type: object
                        example: {}
                      themeable_type:
                        type: string
                        example: product
                        enum:
                          - product
                          - medium
                          - enrollment_pack
                          - shop_page
                          - navbar
                          - library
                          - page
                          - components
                          - library_navbar
                          - sections
                          - locales
                          - footer
                          - layouts
                          - category_page
                          - collection_page
                          - cart_page
                          - config
                          - home_page
                      status:
                        type: string
                        example: draft
                      url:
                        type:
                          - string
                          - 'null'
                        example: >-
                          https://test.example.com/home?preview=true&theme_template_id=1
                      created_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        example: '2025-05-03T04:58:11Z'
                      updated_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        example: '2025-05-03T04:58:11Z'
                      versions:
                        type:
                          - array
                          - 'null'
                        items:
                          type: object
                        description: History of page versions
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: aec35efe-1cdc-48ac-94e6-616831786625
                      timestamp:
                        type: string
                        format: date-time
                        example: '2025-05-03T04:58:11Z'
        '404':
          description: template not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: not_found
                  data:
                    type: object
                    properties:
                      error:
                        type: string
    parameters:
      - name: id
        in: path
        description: ID of the theme template
        required: true
        schema:
          type: string
      - name: version
        in: query
        required: false
        description: >-
          Version of the theme template to publish. If not specified, the latest
          version will be published.
        schema:
          type: string
  /api/application_theme_templates/{id}/available_themeables:
    get:
      summary: Returns all available themeables for theme template
      tags:
        - ApplicationThemeTemplates
      security:
        - bearer_auth: []
      responses:
        '200':
          description: returns all themeables
          content:
            application/json:
              schema:
                type: object
                properties:
                  available_themeables:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: ID of the themeable
                        title:
                          type: string
                          description: Title of the themeable
                        image:
                          type:
                            - string
                            - 'null'
                          description: Image URL for the themeable
                        themeable_type:
                          type: string
                          description: Type of the themeable
                        application_theme_template_id:
                          type: integer
                          description: ID of the template that the themeable is assigned to
                    description: List of themeables that use the specified template
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        description: Unique identifier for the request
                      timestamp:
                        type: string
                        description: Time when the request was processed
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            description: Current page number in the pagination
                          total_pages:
                            type: integer
                            description: Total number of pages available
                          total_count:
                            type: integer
                            description: Total number of items across all pages
                          per_page:
                            type: integer
                            description: Number of items per page
                        description: Pagination information for the response
                    description: Metadata about the request and response
        '404':
          description: template not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Template not found
                    description: Error message
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - Template not found
                        description: List of error messages for the id field
                    description: Detailed error information
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        description: Unique identifier for the request
                      timestamp:
                        type: string
                        description: Time when the request was processed
                    required:
                      - request_id
                      - timestamp
                    description: Metadata about the request and response
                description: Error response when template is not found
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: selected
        in: query
        required: false
        description: Filter themeables that are already assigned to this template
        schema:
          type: boolean
  /api/application_theme_templates/{id}/themeables_update:
    put:
      summary: Updates themeable records to be used by the specified template
      tags:
        - ApplicationThemeTemplates
      security:
        - bearer_auth: []
      responses:
        '200':
          description: themeables updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  removed_count:
                    type: integer
                    description: Number of themeables unassigned from this template
                  updated_count:
                    type: integer
                    description: Number of themeables assigned to this template
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: aec35efe-1cdc-48ac-94e6-616831786625
                      timestamp:
                        type: string
                        format: date-time
                        example: '2025-05-03T04:58:11Z'
        '404':
          description: template not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: not_found
                  data:
                    type: object
                    properties:
                      error:
                        type: string
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: query_params
        in: query
        schema:
          type: object
          properties:
            added_ids:
              type: array
              items:
                type: integer
              example:
                - 1
                - 2
            removed_ids:
              type: array
              items:
                type: integer
              example:
                - 3
          required:
            - added_ids
            - removed_ids
  /api/authentication/send_mfa:
    post:
      summary: Send MFA Passcode
      description: Send MFA Passcode via email
      tags:
        - Authentication
      operationId: sendMultiFactorAuthentication
      parameters:
        - name: email
          in: query
          required: true
          description: Email address of the user
          schema:
            type: string
        - name: fluid_shop
          in: query
          required: false
          description: 'Shop name, eg: company.fluid.app'
          schema:
            type: string
      responses:
        '201':
          description: generic success response
          content:
            application/json:
              schema:
                type: object
                properties:
                  multi_factor_authentication:
                    title: MultiFactorAuthentication
                    type: object
                    properties:
                      uuid:
                        type: string
                      authenticated:
                        type: boolean
                      verification_channel:
                        type: string
                      verification_code_expires_at:
                        type: string
                    required:
                      - uuid
                      - verification_channel
                      - authenticated
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - multi_factor_authentication
  /api/authentication/confirm_mfa:
    post:
      summary: Confirm MFA passcode
      description: Confirm MFA Passcode
      tags:
        - Authentication
      operationId: confirmMultiFactorAuthentication
      parameters: []
      responses:
        '200':
          description: MFA code confirmed
          content:
            application/json:
              schema:
                type: object
                properties:
                  authenticated:
                    type: boolean
                    example: true
                  auth_type:
                    type: string
                    example: rep
                  companies:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: John Doe
                        shop_name:
                          type: string
                          example: myco.fluid.app
                        logo_url:
                          type:
                            - string
                            - 'null'
                          example: https://example.com/logo.png
                        jwt:
                          type: string
                          example: eyJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJjdX...
                        primary_domain_hostname:
                          type: string
                          example: myco.fluid.app
                      required:
                        - id
                        - name
                        - shop_name
                        - jwt
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2025-02-03T08:04:10Z'
                required:
                  - authenticated
                  - auth_type
                  - companies
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                uuid:
                  type: string
                  example: drp_p4r9jsl305iduqrsl0ujdth35jhuy2al
                multi_factor_authentication:
                  type: object
                  properties:
                    verification_code:
                      type: string
                      example: '543432'
                  required:
                    - verification_code
              required:
                - uuid
                - multi_factor_authentication
  /api/authentication/me:
    get:
      summary: Fetch user details from JWT
      tags:
        - Authentication
      operationId: userDetailsViaMultiFactorAuthentication
      parameters:
        - name: jwt
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: user details given
          content:
            application/json:
              schema:
                type: object
                properties:
                  user:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      first_name:
                        type:
                          - string
                          - 'null'
                        example: Mike
                      last_name:
                        type:
                          - string
                          - 'null'
                        example: Tingey
                      email:
                        type: string
                        example: mike@example.com
                      avatar_url:
                        type:
                          - string
                          - 'null'
                        example: >-
                          https://d1r16g5m5p3ba7.cloudfront.net/uploads/user/avatar/980190962/avatar.png
                      root_admin:
                        type: boolean
                        example: true
                  user_company:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      company_id:
                        type: integer
                        example: 226157151
                      company_name:
                        type: string
                        example: Fluid
                      roles:
                        type:
                          - array
                          - 'null'
                        example: '["admin", "developer"]'
                      user_type:
                        type:
                          - string
                          - 'null'
                        example: admin
                      logo_url:
                        type:
                          - string
                          - 'null'
                        example: https://cdn.filestackcontent.com/1Rnqia44T2mLcXuFZCTV
                      icon_url:
                        type:
                          - string
                          - 'null'
                        example: https://cdn.filestackcontent.com/1Rnqia44T2mLcXuFZCTV
                      fluid_shop:
                        type:
                          - string
                          - 'null'
                        example: myco.fluid.app
                      company_colors:
                        type:
                          - object
                          - 'null'
                        properties:
                          primary_color:
                            type:
                              - string
                              - 'null'
                            example: 0C7CF6
                          secondary_color:
                            type:
                              - string
                              - 'null'
                            example: 0C7CF6
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 72591788-c981-47d1-8dd5-1cc0e1612815
                      timestamp:
                        type: string
                        format: date-time
                        example: '2025-05-08T06:18:09Z'
        '404':
          description: user not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    properties:
                      user:
                        type: array
                  error_message:
                    type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2025-02-03T08:04:10Z'
  /api/authentication/resend_mfa:
    post:
      summary: Resend code via email
      tags:
        - Authentication
      operationId: resendMultiFactorAuthentication
      parameters:
        - name: uuid
          in: query
          required: true
          description: Current MFA uuid
          schema:
            type: string
      responses:
        '201':
          description: verification code resent
          content:
            application/json:
              schema:
                type: object
                properties:
                  multi_factor_authentication:
                    title: MultiFactorAuthentication
                    type: object
                    properties:
                      uuid:
                        type: string
                      verification_channel:
                        example: test@example.com
                        type: string
                      verification_code_expires_at:
                        example: '2025-02-17T08:00:01Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      authenticated:
                        example: 'false'
                        type: boolean
                        default: false
                    required:
                      - uuid
                      - verification_channel
                      - authenticated
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - multi_factor_authentication
        '422':
          description: resend before 30 seconds
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    properties:
                      multi_factor_authentication:
                        type: array
                  error_message:
                    type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2025-02-03T08:04:10Z'
  /api/authentication/company/{fluid_shop}:
    get:
      summary: Fetch company details from Fluid Shop name
      tags:
        - Authentication
      operationId: companyDetailsViaMultiFactorAuthentication
      parameters:
        - name: fluid_shop
          in: path
          required: true
          description: Fluid shop name
          example: myco
          schema:
            type: string
      responses:
        '200':
          description: company details given
          content:
            application/json:
              schema:
                type: object
                properties:
                  company:
                    type: object
                    properties:
                      name:
                        type: string
                      logo_url:
                        type:
                          - string
                          - 'null'
                        example: https://example.com/logo.png
                      color:
                        type: string
                        example: '#000000'
                      fluid_shop:
                        type: string
                        example: myco.fluid.app
                      primary_domain_hostname:
                        type: string
                        example: myco.com
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2025-02-03T08:04:10Z'
  /api/authentication/company/{company_id}/switch:
    put:
      summary: Switch company
      tags:
        - Authentication
      security:
        - bearer_auth: []
      operationId: switchCompany
      parameters:
        - name: company_id
          in: path
          required: true
          description: Company id
          example: '980190965'
          schema:
            type: integer
      responses:
        '200':
          description: New company details with jwt given
          content:
            application/json:
              schema:
                type: object
                properties:
                  company:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: fluid
                      fluid_shop:
                        type: string
                        example: myco.fluid.app
                      logo_url:
                        type:
                          - string
                          - 'null'
                        example: https://example.com/logo.png
                      jwt:
                        type: string
                        example: eyJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJjdX...
                    required:
                      - id
                      - name
                      - fluid_shop
                      - logo_url
                      - jwt
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2025-02-03T08:04:10Z'
                required:
                  - company
                  - meta
        '404':
          description: Company not found or not associated with current user
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    properties:
                      company:
                        type: array
                  error_message:
                    type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2025-02-03T08:04:10Z'
  /api/user_companies/customer_token_exchange:
    put:
      summary: Exchange user company token for customer JWT
      tags:
        - Authentication
      description: Exchange user_company_token for customer JWT
      parameters: []
      responses:
        '200':
          description: Exchange successful with valid user_company_token and email
          content:
            application/json:
              schema:
                type: object
                properties:
                  jwt:
                    type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - jwt
                  - meta
        '401':
          description: Invalid user company token
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unauthorized
                  errors:
                    type: object
                    properties:
                      token:
                        type: array
                        items:
                          type: string
                        example:
                          - is invalid
                    required:
                      - token
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - error_message
                  - errors
                  - meta
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                user_company_token:
                  type: string
                  minLength: 1
              required:
                - user_company_token
  /api/user_companies/jwt_exchange:
    put:
      summary: Exchange JWT for user company token
      tags:
        - Authentication
      description: Exchange JWT for user_company_token
      parameters: []
      responses:
        '200':
          description: Exchange successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  user_company_token:
                    type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - user_company_token
                  - meta
        '401':
          description: Invalid JWT token
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unauthorized
                  errors:
                    type: object
                    properties:
                      jwt:
                        type: array
                        items:
                          type: string
                        example:
                          - is invalid
                    required:
                      - jwt
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - error_message
                  - errors
                  - meta
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                jwt:
                  type: string
                  minLength: 1
              required:
                - jwt
  /api/user_companies/jwt_refresh:
    put:
      summary: Refresh JWT token
      tags:
        - Authentication
      description: Refresh an existing JWT token to extend its validity
      parameters: []
      responses:
        '200':
          description: JWT refresh successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  jwt:
                    type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - jwt
                  - meta
        '401':
          description: Invalid JWT token
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unauthorized
                  errors:
                    type: object
                    properties:
                      jwt:
                        type: array
                        items:
                          type: string
                        example:
                          - is invalid
                    required:
                      - jwt
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - error_message
                  - errors
                  - meta
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                jwt:
                  type: string
                  minLength: 1
              required:
                - jwt
  /api/user_companies/token_exchange:
    put:
      summary: Exchange user company token for JWT
      tags:
        - Authentication
      description: Exchange user_company_token for JWT
      parameters: []
      responses:
        '200':
          description: Exchange successful with user_company_token input
          content:
            application/json:
              schema:
                type: object
                properties:
                  jwt:
                    type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - jwt
                  - meta
        '401':
          description: Invalid user company token
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unauthorized
                  errors:
                    type: object
                    properties:
                      user_company_token:
                        type: array
                        items:
                          type: string
                        example:
                          - is invalid
                    required:
                      - user_company_token
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - error_message
                  - errors
                  - meta
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                user_company_token:
                  type: string
                  minLength: 1
              required:
                - user_company_token
  /api/callback/definitions:
    get:
      summary: returns a list of callback definitions
      tags:
        - Callback Definitions
      security:
        - bearer_auth: []
      responses:
        '200':
          description: returns a list of callback definitions
          content:
            application/json:
              schema:
                type: object
                properties:
                  definitions:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        description:
                          type: string
                        example_response:
                          type: object
                        request_schema:
                          type: object
                        response_schema:
                          type: object
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
  /api/callback/registrations:
    get:
      summary: List all registered callbacks
      tags:
        - Callback Registrations
      operationId: indexCallbackRegistrations
      security:
        - bearer_auth: []
      parameters:
        - name: filters
          in: query
          schema:
            type: object
            properties:
              page:
                type: integer
                exclusiveMinimum: 0
              per_page:
                type: integer
                exclusiveMinimum: 0
                maximum: 100
              company_id:
                type: integer
                not:
                  type: 'null'
              definition_name:
                type: string
                minLength: 1
              active:
                type: boolean
                not:
                  type: 'null'
            required: []
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  callback_registrations:
                    type: array
                    items:
                      title: Callback::Registration
                      type: object
                      properties:
                        uuid:
                          example: cbr_wmo5nhb52xniux5pddignpwui1mgox1a
                          type: string
                        company_id:
                          example: 1
                          type:
                            - integer
                            - 'null'
                        company_name:
                          example: Acme
                          type: string
                        definition_name:
                          example: test_callback_system
                          type: string
                        url:
                          example: https://example.com/callback
                          type: string
                        timeout_in_seconds:
                          example: 10
                          type: integer
                          minimum: 1
                          maximum: 20
                        verification_token:
                          example: cvt_fJwDMNVRvmstQY0EcztaBL2zivN5vnmP
                          type:
                            - string
                            - 'null'
                        active:
                          example: true
                          type:
                            - boolean
                            - 'null'
                          default: true
                        created_at:
                          example: '2021-01-01T00:00:00Z'
                          type: string
                          format: date-time
                      required:
                        - uuid
                        - company_name
                        - definition_name
                        - url
                        - timeout_in_seconds
                        - created_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            example: 1
                          total_pages:
                            type: integer
                            example: 10
                          total_count:
                            type: integer
                            example: 100
                          per_page:
                            type: integer
                            example: 10
    post:
      summary: Create a new registered callback
      tags:
        - Callback Registrations
      operationId: createCallbackRegistration
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: created
          content:
            application/json:
              schema:
                type: object
                properties:
                  callback_registration:
                    title: Callback::Registration
                    type: object
                    properties:
                      uuid:
                        type: string
                      definition_name:
                        example: test_callback_system
                        type: string
                      url:
                        example: https://example.com/callback
                        type: string
                        pattern: \Ahttps://
                      timeout_in_seconds:
                        example: 10
                        type: integer
                        minimum: 1
                        maximum: 20
                      active:
                        example: true
                        type:
                          - boolean
                          - 'null'
                        default: true
                      verification_token:
                        example: cvt_1DbieBewYJ0VkIqQzsD1iWtnSrp6nPXTa
                        type:
                          - string
                          - 'null'
                      created_at:
                        example: '2021-01-01T00:00:00Z'
                        type: string
                        format: date-time
                    required:
                      - uuid
                      - definition_name
                      - url
                      - timeout_in_seconds
                      - created_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: unprocessable entity
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                callback_registration:
                  type: object
                  properties:
                    definition_name:
                      type: string
                    url:
                      type: string
                    timeout_in_seconds:
                      type: integer
                    active:
                      type: boolean
                      not:
                        type: 'null'
                  required:
                    - definition_name
                    - url
                    - timeout_in_seconds
              required:
                - callback_registration
  /api/callback/registrations/{uuid}:
    get:
      summary: Show a registered callback
      tags:
        - Callback Registrations
      operationId: showCallbackRegistration
      security:
        - bearer_auth: []
      parameters:
        - name: uuid
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  callback_registration:
                    title: Callback::Registration
                    type: object
                    properties:
                      uuid:
                        example: cbr_wmo5nhb52xniux5pddignpwui1mgox1a
                        type: string
                      company_id:
                        example: 1
                        type:
                          - integer
                          - 'null'
                      company_name:
                        example: Acme
                        type: string
                      definition_name:
                        example: test_callback_system
                        type: string
                      url:
                        example: https://example.com/callback
                        type: string
                      timeout_in_seconds:
                        example: 10
                        type: integer
                        minimum: 1
                        maximum: 20
                      verification_token:
                        example: cvt_fJwDMNVRvmstQY0EcztaBL2zivN5vnmP
                        type:
                          - string
                          - 'null'
                      active:
                        example: true
                        type:
                          - boolean
                          - 'null'
                        default: true
                      created_at:
                        example: '2021-01-01T00:00:00Z'
                        type: string
                        format: date-time
                    required:
                      - uuid
                      - company_name
                      - definition_name
                      - url
                      - timeout_in_seconds
                      - created_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '404':
          description: not found
    put:
      summary: Update a registered callback
      tags:
        - Callback Registrations
      operationId: updateCallbackRegistration
      security:
        - bearer_auth: []
      parameters:
        - name: uuid
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  callback_registration:
                    title: Callback::Registration
                    type: object
                    properties:
                      uuid:
                        example: cbr_wmo5nhb52xniux5pddignpwui1mgox1a
                        type: string
                      definition_name:
                        example: test_callback_system
                        type: string
                      url:
                        example: https://example.com/callback
                        type: string
                        pattern: \Ahttps://
                      timeout_in_seconds:
                        example: 10
                        type: integer
                        minimum: 1
                        maximum: 20
                      active:
                        example: true
                        type:
                          - boolean
                          - 'null'
                        default: true
                      updated_at:
                        example: '2021-01-01T00:00:00Z'
                        type: string
                        format: date-time
                    required:
                      - uuid
                      - definition_name
                      - url
                      - timeout_in_seconds
                      - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '404':
          description: not found
        '422':
          description: unprocessable entity
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                uuid:
                  type: string
                  minLength: 1
                callback_registration:
                  type: object
                  properties:
                    definition_name:
                      type: string
                      minLength: 1
                    url:
                      type: string
                      minLength: 1
                    timeout_in_seconds:
                      type: integer
                      not:
                        type: 'null'
                    active:
                      type: boolean
                      not:
                        type: 'null'
                  required: []
              required:
                - uuid
                - callback_registration
    delete:
      summary: Delete a registered callback
      tags:
        - Callback Registrations
      operationId: destroyCallbackRegistration
      security:
        - bearer_auth: []
      parameters:
        - name: uuid
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: deleted
        '404':
          description: not found
  /api/carts:
    post:
      summary: Creates a cart
      tags:
        - Carts
      description: >-
        Create a cart. Items, attribution, immutable_items,
        order_confirmation_url,
                  and enrollment_pack_id are optional.
      operationId: createCart
      parameters:
        - name: Cookie
          in: header
          required: false
          description: Session cookie (_fluid_session)
          schema:
            type: string
      responses:
        '200':
          description: cart created with enrollment_pack_id
          content:
            application/json:
              schema:
                type: object
                properties:
                  cart:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123
                      state:
                        type: string
                        example: start
                      processed:
                        type: boolean
                        example: false
                        description: >-
                          Determines if a cart payment has been processed or
                          not.
                      valid_for_checkout:
                        type: boolean
                        example: true
                      buyer_rep_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      currency_symbol:
                        type: string
                        example: $
                      currency_code:
                        type: string
                        example: USD
                      shipping_total_for_display:
                        type: string
                        example: Free
                      phone:
                        type:
                          - string
                          - 'null'
                        example: '4035551212'
                      payment_method_auto_assignable:
                        type: boolean
                        example: true
                        description: >-
                          Determines if a payment method can be auto-assigned to
                          the cart.
                      attribution:
                        oneOf:
                          - type: object
                            oneOf:
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  share_guid:
                                    type: string
                                    example: james-bond007
                                required:
                                  - id
                                  - share_guid
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  email:
                                    type: string
                                    example: james.bond@gmail.com
                                required:
                                  - id
                                  - email
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  username:
                                    type: string
                                    example: jaamball234
                                required:
                                  - id
                                  - username
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  fluid_rep_id:
                                    type: integer
                                    example: 23493
                                required:
                                  - id
                                  - fluid_rep_id
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  external_id:
                                    type:
                                      - string
                                      - 'null'
                                    example: w3sdf92
                                required:
                                  - id
                          - type: 'null'
                        default:
                          id: 456
                          share_guid: james-bond007
                      agreements:
                        type: array
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                              example: 1
                            required:
                              type: boolean
                              example: true
                            title:
                              type: string
                              example: Terms and Conditions
                            show_path:
                              type: string
                              example: /terms
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                      amount_total:
                        type: string
                        example: '121.65'
                      amount_total_in_currency:
                        type: string
                        example: $121.65 (USD)
                      sub_total:
                        type: string
                        example: '100.00'
                      sub_total_in_currency:
                        type: string
                        example: $100.00 (USD)
                      tax_total:
                        type: string
                        example: '20.00'
                      tax_total_in_currency:
                        type: string
                        example: $20.00 (USD)
                      shipping_total:
                        type: string
                        example: '1.65'
                      shipping_total_in_currency:
                        type: string
                        example: $1.65 (USD)
                      discount_total:
                        type: string
                        example: '2.99'
                      discount_total_in_currency:
                        type: string
                        example: $2.99 (USD)
                      transaction_fee:
                        type:
                          - number
                          - string
                        example: '1.90'
                      transaction_fee_in_currency:
                        type: string
                        example: $1.90 (USD)
                      cv_total:
                        type: integer
                        example: 10
                      qv_total:
                        type: integer
                        example: 15
                      company:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          primary_domain_hostname:
                            type:
                              - string
                              - 'null'
                            example: fluid.com
                          subdomain:
                            type:
                              - string
                              - 'null'
                            example: myco
                          logo_url:
                            type:
                              - string
                              - 'null'
                            example: https://example.com/logo.png
                          fluid_shop:
                            type:
                              - string
                              - 'null'
                            example: https://fluid-sample-shop.fluid.com
                          collect_phone:
                            type: boolean
                            example: true
                          require_phone:
                            type: boolean
                            example: false
                          require_billing_zip:
                            type: boolean
                            example: false
                          checkout_primary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                          checkout_primary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                      payment_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          cart_type:
                            type: string
                            example: credit_card
                          last_four:
                            type: string
                            example: '1234'
                          exp_month:
                            type: integer
                            example: 12
                          exp_year:
                            type: integer
                            example: 2025
                          logo_url:
                            type: string
                            example: https://example.com/image.svg
                      email:
                        type:
                          - string
                          - 'null'
                        example: user@example.com
                      enrollment_fee:
                        type:
                          - number
                          - string
                        example: '10.45'
                      enrollment_fee_in_currency:
                        type: string
                        example: $10.45
                      discount_code:
                        type:
                          - string
                          - 'null'
                        example: DISCOUNT10
                      language_iso:
                        type:
                          - string
                          - 'null'
                        example: en
                      cart_token:
                        type: string
                        example: abc123
                      immutable_items:
                        type: boolean
                        example: false
                      digital_only:
                        type: boolean
                        example: false
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 101
                            price:
                              type: string
                              example: '43.41'
                            price_in_currency:
                              type: string
                              example: $43.41
                            tax:
                              type: string
                              example: '2.99'
                            tax_in_currency:
                              type: string
                              example: $2.99
                            cv:
                              type: integer
                              example: 5
                            qv:
                              type: integer
                              example: 7
                            discount_amount:
                              type: string
                              example: '10'
                            discount_amount_in_currency:
                              type: string
                              example: $10.00
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            display_to_customer:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            product_title:
                              type:
                                - string
                                - 'null'
                              example: Sample Product
                            quantity:
                              type: integer
                              example: 3
                            subscription:
                              type: boolean
                              example: true
                            enrollment:
                              type: boolean
                              example: false
                            allow_subscription:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_plan_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_plans:
                              oneOf:
                                - type: array
                                  items:
                                    title: Commerce::SubscriptionPlan
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      name:
                                        example: Test Subscription Plan
                                        type: string
                                      billing_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      billing_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      shipping_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      shipping_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      trial_period:
                                        example: 1
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      trial_period_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type:
                                          - string
                                          - 'null'
                                      split_volume:
                                        example: true
                                        type: boolean
                                        default: false
                                      max_quantity:
                                        example: 100
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      company_default:
                                        example: false
                                        type:
                                          - boolean
                                          - 'null'
                                        default: false
                                      products_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      subscribers_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      price:
                                        type: string
                                      price_in_currency:
                                        type: string
                                      subscription_start:
                                        type: string
                                      subscribe_and_save:
                                        type: string
                                      subscribe_and_save_in_currency:
                                        type: string
                                      subscribe_and_save_for_display:
                                        type: string
                                    required:
                                      - id
                                      - name
                                      - billing_interval
                                      - billing_interval_unit
                                      - shipping_interval
                                      - shipping_interval_unit
                                      - split_volume
                                      - price
                                      - price_in_currency
                                      - subscription_start
                                      - subscribe_and_save
                                      - subscribe_and_save_in_currency
                                      - subscribe_and_save_for_display
                                - type: 'null'
                            subscription_only:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_interval:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_interval_unit:
                              type:
                                - string
                                - 'null'
                              example: month
                            subscription_price:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 10.5
                            subscription_price_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $10.50
                            subscription_start:
                              type:
                                - string
                                - 'null'
                              example: '2025-02-12'
                            subscribe_and_save:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 2.99
                            subscribe_and_save_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $2.99
                            subscribe_and_save_for_display:
                              type:
                                - string
                                - 'null'
                              example: Subscribe and save $2.99
                            title:
                              type:
                                - string
                                - 'null'
                              example: Surcharge
                            product:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type: string
                                      example: Sample Product
                                    cv:
                                      type: integer
                                      example: 10
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/product.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/product.png
                                    price:
                                      type: string
                                      example: '29.99'
                                    price_in_currency:
                                      type: string
                                      example: $29.99
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    tax:
                                      type: string
                                      example: '2.99'
                                    tax_in_currency:
                                      type: string
                                      example: $2.99
                                - type: 'null'
                            variant:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: Sample Variant
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/sample.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/sample.png
                                    primary_image:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/primary.png
                                    price:
                                      type:
                                        - string
                                        - 'null'
                                      example: '34.44'
                                    price_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $34.44
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    options:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          title:
                                            type: string
                                            example: Size
                                          value:
                                            type: string
                                            example: XL
                                - type: 'null'
                            errors:
                              oneOf:
                                - type: 'null'
                                - type: array
                                  items:
                                    type: object
                                    example:
                                      country:
                                        - >-
                                          This product is not available for this
                                          country. Please change your country
                      ship_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      bill_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      shipping_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type: string
                            example: Standard Shipping
                      available_shipping_methods:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            title:
                              type: string
                              example: Standard Shipping
                            price:
                              type:
                                - number
                                - string
                              example: 5.99
                            price_label:
                              type: string
                              example: $5.99
                            delivery_time_estimate:
                              type: string
                              example: 3-5 business days
                      available_payment_methods:
                        type: array
                        items:
                          oneOf:
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - credit_card
                                name:
                                  type: string
                                  example: Credit Card
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                                apple_pay:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method supports
                                    ApplePay or not 
                                bogus_gateway:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is a Bogus
                                    instance or not.
                                tokenize_path:
                                  type:
                                    - string
                                    - 'null'
                                  description: Path to tokenize, if applicable.
                                token_provider:
                                  type: string
                                  enum:
                                    - spreedly
                                    - vgs
                                  description: >-
                                    Determines if payment tokenization is via
                                    spreedly or VGS
                                apple_pay_merchant_identifier:
                                  type:
                                    - string
                                    - 'null'
                                  example: merchant.mycompany.com
                                  description: >-
                                    If ApplePay is supported, returns the
                                    merchant identifier registered with Apple,
                                    else returns nil
                                supported_brands:
                                  type: array
                                  items:
                                    type: string
                                  example:
                                    - visa
                                    - master
                                    - american_express
                                    - discover
                              required:
                                - id
                                - type
                                - name
                                - supported_brands
                                - test
                                - sandbox
                                - apple_pay
                                - apple_pay_merchant_identifier
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - klarna
                                name:
                                  type: string
                                  example: Klarna
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                      country:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          iso:
                            type: string
                            example: US
                          name:
                            type: string
                            example: United States
                          province_required:
                            type: boolean
                            example: false
                      type:
                        type: string
                        enum:
                          - regular
                          - enrollment
                        example: regular
                      enrollment_pack_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      enrollment_pack:
                        type:
                          - object
                          - 'null'
                        properties:
                          enrollment_pack_id:
                            type: integer
                            example: 1
                          additional_volume:
                            type:
                              - integer
                              - 'null'
                            example: 10
                          description:
                            type:
                              - object
                              - 'null'
                              - string
                            properties:
                              id:
                                type: integer
                                example: 111
                              name:
                                type: string
                                example: description
                              body:
                                type: string
                                example: >-
                                  <div>Try the latest and greatest of our sugar
                                  zip packs. Guaranteed to make you skinner and
                                  cure cancer.</div>
                              record_type:
                                type: string
                                example: EnrollmentPack
                              record_id:
                                type: integer
                                example: 1
                              created_at:
                                type: string
                                format: date_time
                                example: '2025-01-16T04:22:43.809Z'
                              updated_at:
                                type: string
                                format: date_time
                                example: '2025-01-22T10:23:52.941Z'
                              locale:
                                type: string
                                example: en
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: 10
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.00
                          images:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 2
                                relateable_type:
                                  type: string
                                  example: EnrollmentPack
                                relateable_id:
                                  type: integer
                                  example: 1
                                image_url:
                                  type: string
                                  example: >-
                                    https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                image_path:
                                  type: string
                                  example: jITWaU14QGe0y5AFgY7P_00179.svg
                                position:
                                  type: integer
                                  example: 1
                                shopify_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                                created_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                updated_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                external_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 625
                                allow_subscription:
                                  type: boolean
                                  example: true
                                cv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                cv_in_currency:
                                  type: string
                                  example: $0.00
                                enrollment:
                                  type: boolean
                                  example: true
                                enrollment_pack_id:
                                  type: integer
                                  example: 1
                                price:
                                  type: string
                                  example: '11.13'
                                price_in_currency:
                                  type: string
                                  example: $11.13
                                product_title:
                                  type: string
                                  example: Zip Pack Sample Pack (30)
                                quantity:
                                  type: integer
                                  example: 1
                                qv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                qv_in_currency:
                                  type: string
                                  example: $0.00
                                subscribe_and_save:
                                  type:
                                    - string
                                    - 'null'
                                  example: '-1988.87'
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $-1,988.87
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $-1,988.87
                                subscription:
                                  type: boolean
                                  example: false
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_only:
                                  type: boolean
                                  example: false
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_price:
                                  type: string
                                  example: '2000.0'
                                subscription_price_in_currency:
                                  type: string
                                  example: $2,000.00
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                  example: '2025-02-28'
                                tax:
                                  type: string
                                  example: '0.0'
                                tax_in_currency:
                                  type: string
                                  example: $0.00
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: null
                                display_to_customer:
                                  type: boolean
                                  example: false
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          price:
                            type:
                              - string
                              - integer
                            example: 11.13
                          price_in_currency:
                            type: string
                            example: $11.13
                          subscription_price:
                            type:
                              - string
                              - integer
                            example: 2000
                          subscription_price_in_currency:
                            type: string
                            example: $2,000.00
                          title:
                            type: string
                            example: enroll product
                          token:
                            type: string
                            example: NxL22AqLRRisfyF9LqxxWRak
                      recurring:
                        oneOf:
                          - type: array
                            items:
                              type: object
                              properties:
                                subtotal:
                                  type: string
                                  example: '10.0'
                                subtotal_in_currency:
                                  type: string
                                  example: $10.0
                                interval:
                                  type: integer
                                  example: 1
                                interval_unit:
                                  type: string
                                  example: month
                                subtotal_for_display:
                                  type: string
                                  example: $10.00 every 1 month
                                start_date:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-05-27'
                          - type: 'null'
                        default:
                          - subtotal: '10.0'
                            subtotal_in_currency: $10.0
                            interval: 1
                            interval_unit: month
                            subtotal_for_display: $10.00 every 1 month
                            start_date: '2025-05-27'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      checkout_url:
                        type: string
                        example: https://checkout.fluid.com/checkout?jwt=abc123
                      shop_url:
                        type: string
                        example: https://myco.fluid.app
        '400':
          description: variant not available in country
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: bad request
                  errors:
                    type: string
                    example: Commerce::CartsService::VariantNotFoundError
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                country_code:
                  type: string
                  description: ISO 2-letter country code
                  example: US
                visitor_token:
                  type: string
                  description: >-
                    Visitor token. DEPRECATED: Will be removed in a future
                    version; please use `session_uuid` instead
                  example: vt_2a3v3f9s8xRCN
                session_uuid:
                  type: string
                  description: Session UUID
                  example: 0195ff0f-9a6c-70e1-9037-f42bfd23b5fb
                items:
                  type: array
                  items:
                    type: object
                    properties:
                      variant_id:
                        type: integer
                        description: The ID of the variant to add to the cart
                        example: 90
                      quantity:
                        type: integer
                        description: The quantity of the variant to add to the cart
                        example: 2
                      display_to_customer:
                        type: boolean
                        description: Whether the item should be displayed to the customer
                        example: true
                        default: true
                immutable_items:
                  type: boolean
                  description: Whether the cart is immutable
                  example: true
                  default: false
                fluid_shop:
                  type: string
                  description: The domain of your Fluid shop (excluding the scheme)
                  example: myco.fluid.app
                attribution:
                  type: object
                  oneOf:
                    - properties:
                        share_guid:
                          type: string
                          example: james-bond007
                      required:
                        - share_guid
                    - properties:
                        email:
                          type: string
                          format: email
                          example: user@example.com
                      required:
                        - email
                    - properties:
                        external_id:
                          type:
                            - string
                            - 'null'
                          example: ext_12345
                    - properties:
                        username:
                          type: string
                          example: username123
                      required:
                        - username
                    - properties:
                        fluid_rep_id:
                          type: string
                          example: '1234567890'
                      required:
                        - fluid_rep_id
                  default:
                    id: 456
                    share_guid: james-bond007
                order_confirmation_url:
                  type: string
                  description: >-
                    The URL of a custom Order Confirmation Page to send
                    customers to after the order is approved.
                  example: >-
                    https://myco.fluid.app/pages/order-confirmation?token={order_token}
              required:
                - country_code
                - fluid_shop
        description: Cart params
  /api/carts/{cart_token}/address:
    post:
      summary: Updates cart address
      tags:
        - Carts
      operationId: upsertCartAddress
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: address updated with address id
          content:
            application/json:
              schema:
                type: object
                properties:
                  cart:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123
                      state:
                        type: string
                        example: start
                      processed:
                        type: boolean
                        example: false
                        description: >-
                          Determines if a cart payment has been processed or
                          not.
                      valid_for_checkout:
                        type: boolean
                        example: true
                      buyer_rep_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      currency_symbol:
                        type: string
                        example: $
                      currency_code:
                        type: string
                        example: USD
                      shipping_total_for_display:
                        type: string
                        example: Free
                      phone:
                        type:
                          - string
                          - 'null'
                        example: '4035551212'
                      payment_method_auto_assignable:
                        type: boolean
                        example: true
                        description: >-
                          Determines if a payment method can be auto-assigned to
                          the cart.
                      attribution:
                        oneOf:
                          - type: object
                            oneOf:
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  share_guid:
                                    type: string
                                    example: james-bond007
                                required:
                                  - id
                                  - share_guid
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  email:
                                    type: string
                                    example: james.bond@gmail.com
                                required:
                                  - id
                                  - email
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  username:
                                    type: string
                                    example: jaamball234
                                required:
                                  - id
                                  - username
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  fluid_rep_id:
                                    type: integer
                                    example: 23493
                                required:
                                  - id
                                  - fluid_rep_id
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  external_id:
                                    type:
                                      - string
                                      - 'null'
                                    example: w3sdf92
                                required:
                                  - id
                          - type: 'null'
                        default:
                          id: 456
                          share_guid: james-bond007
                      agreements:
                        type: array
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                              example: 1
                            required:
                              type: boolean
                              example: true
                            title:
                              type: string
                              example: Terms and Conditions
                            show_path:
                              type: string
                              example: /terms
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                      amount_total:
                        type: string
                        example: '121.65'
                      amount_total_in_currency:
                        type: string
                        example: $121.65 (USD)
                      sub_total:
                        type: string
                        example: '100.00'
                      sub_total_in_currency:
                        type: string
                        example: $100.00 (USD)
                      tax_total:
                        type: string
                        example: '20.00'
                      tax_total_in_currency:
                        type: string
                        example: $20.00 (USD)
                      shipping_total:
                        type: string
                        example: '1.65'
                      shipping_total_in_currency:
                        type: string
                        example: $1.65 (USD)
                      discount_total:
                        type: string
                        example: '2.99'
                      discount_total_in_currency:
                        type: string
                        example: $2.99 (USD)
                      transaction_fee:
                        type:
                          - number
                          - string
                        example: '1.90'
                      transaction_fee_in_currency:
                        type: string
                        example: $1.90 (USD)
                      cv_total:
                        type: integer
                        example: 10
                      qv_total:
                        type: integer
                        example: 15
                      company:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          primary_domain_hostname:
                            type:
                              - string
                              - 'null'
                            example: fluid.com
                          subdomain:
                            type:
                              - string
                              - 'null'
                            example: myco
                          logo_url:
                            type:
                              - string
                              - 'null'
                            example: https://example.com/logo.png
                          fluid_shop:
                            type:
                              - string
                              - 'null'
                            example: https://fluid-sample-shop.fluid.com
                          collect_phone:
                            type: boolean
                            example: true
                          require_phone:
                            type: boolean
                            example: false
                          require_billing_zip:
                            type: boolean
                            example: false
                          checkout_primary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                          checkout_primary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                      payment_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          cart_type:
                            type: string
                            example: credit_card
                          last_four:
                            type: string
                            example: '1234'
                          exp_month:
                            type: integer
                            example: 12
                          exp_year:
                            type: integer
                            example: 2025
                          logo_url:
                            type: string
                            example: https://example.com/image.svg
                      email:
                        type:
                          - string
                          - 'null'
                        example: user@example.com
                      enrollment_fee:
                        type:
                          - number
                          - string
                        example: '10.45'
                      enrollment_fee_in_currency:
                        type: string
                        example: $10.45
                      discount_code:
                        type:
                          - string
                          - 'null'
                        example: DISCOUNT10
                      language_iso:
                        type:
                          - string
                          - 'null'
                        example: en
                      cart_token:
                        type: string
                        example: abc123
                      immutable_items:
                        type: boolean
                        example: false
                      digital_only:
                        type: boolean
                        example: false
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 101
                            price:
                              type: string
                              example: '43.41'
                            price_in_currency:
                              type: string
                              example: $43.41
                            tax:
                              type: string
                              example: '2.99'
                            tax_in_currency:
                              type: string
                              example: $2.99
                            cv:
                              type: integer
                              example: 5
                            qv:
                              type: integer
                              example: 7
                            discount_amount:
                              type: string
                              example: '10'
                            discount_amount_in_currency:
                              type: string
                              example: $10.00
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            display_to_customer:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            product_title:
                              type:
                                - string
                                - 'null'
                              example: Sample Product
                            quantity:
                              type: integer
                              example: 3
                            subscription:
                              type: boolean
                              example: true
                            enrollment:
                              type: boolean
                              example: false
                            allow_subscription:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_plan_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_plans:
                              oneOf:
                                - type: array
                                  items:
                                    title: Commerce::SubscriptionPlan
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      name:
                                        example: Test Subscription Plan
                                        type: string
                                      billing_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      billing_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      shipping_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      shipping_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      trial_period:
                                        example: 1
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      trial_period_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type:
                                          - string
                                          - 'null'
                                      split_volume:
                                        example: true
                                        type: boolean
                                        default: false
                                      max_quantity:
                                        example: 100
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      company_default:
                                        example: false
                                        type:
                                          - boolean
                                          - 'null'
                                        default: false
                                      products_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      subscribers_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      price:
                                        type: string
                                      price_in_currency:
                                        type: string
                                      subscription_start:
                                        type: string
                                      subscribe_and_save:
                                        type: string
                                      subscribe_and_save_in_currency:
                                        type: string
                                      subscribe_and_save_for_display:
                                        type: string
                                    required:
                                      - id
                                      - name
                                      - billing_interval
                                      - billing_interval_unit
                                      - shipping_interval
                                      - shipping_interval_unit
                                      - split_volume
                                      - price
                                      - price_in_currency
                                      - subscription_start
                                      - subscribe_and_save
                                      - subscribe_and_save_in_currency
                                      - subscribe_and_save_for_display
                                - type: 'null'
                            subscription_only:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_interval:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_interval_unit:
                              type:
                                - string
                                - 'null'
                              example: month
                            subscription_price:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 10.5
                            subscription_price_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $10.50
                            subscription_start:
                              type:
                                - string
                                - 'null'
                              example: '2025-02-12'
                            subscribe_and_save:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 2.99
                            subscribe_and_save_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $2.99
                            subscribe_and_save_for_display:
                              type:
                                - string
                                - 'null'
                              example: Subscribe and save $2.99
                            title:
                              type:
                                - string
                                - 'null'
                              example: Surcharge
                            product:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type: string
                                      example: Sample Product
                                    cv:
                                      type: integer
                                      example: 10
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/product.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/product.png
                                    price:
                                      type: string
                                      example: '29.99'
                                    price_in_currency:
                                      type: string
                                      example: $29.99
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    tax:
                                      type: string
                                      example: '2.99'
                                    tax_in_currency:
                                      type: string
                                      example: $2.99
                                - type: 'null'
                            variant:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: Sample Variant
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/sample.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/sample.png
                                    primary_image:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/primary.png
                                    price:
                                      type:
                                        - string
                                        - 'null'
                                      example: '34.44'
                                    price_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $34.44
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    options:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          title:
                                            type: string
                                            example: Size
                                          value:
                                            type: string
                                            example: XL
                                - type: 'null'
                            errors:
                              oneOf:
                                - type: 'null'
                                - type: array
                                  items:
                                    type: object
                                    example:
                                      country:
                                        - >-
                                          This product is not available for this
                                          country. Please change your country
                      ship_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      bill_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      shipping_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type: string
                            example: Standard Shipping
                      available_shipping_methods:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            title:
                              type: string
                              example: Standard Shipping
                            price:
                              type:
                                - number
                                - string
                              example: 5.99
                            price_label:
                              type: string
                              example: $5.99
                            delivery_time_estimate:
                              type: string
                              example: 3-5 business days
                      available_payment_methods:
                        type: array
                        items:
                          oneOf:
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - credit_card
                                name:
                                  type: string
                                  example: Credit Card
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                                apple_pay:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method supports
                                    ApplePay or not 
                                bogus_gateway:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is a Bogus
                                    instance or not.
                                tokenize_path:
                                  type:
                                    - string
                                    - 'null'
                                  description: Path to tokenize, if applicable.
                                token_provider:
                                  type: string
                                  enum:
                                    - spreedly
                                    - vgs
                                  description: >-
                                    Determines if payment tokenization is via
                                    spreedly or VGS
                                apple_pay_merchant_identifier:
                                  type:
                                    - string
                                    - 'null'
                                  example: merchant.mycompany.com
                                  description: >-
                                    If ApplePay is supported, returns the
                                    merchant identifier registered with Apple,
                                    else returns nil
                                supported_brands:
                                  type: array
                                  items:
                                    type: string
                                  example:
                                    - visa
                                    - master
                                    - american_express
                                    - discover
                              required:
                                - id
                                - type
                                - name
                                - supported_brands
                                - test
                                - sandbox
                                - apple_pay
                                - apple_pay_merchant_identifier
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - klarna
                                name:
                                  type: string
                                  example: Klarna
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                      country:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          iso:
                            type: string
                            example: US
                          name:
                            type: string
                            example: United States
                          province_required:
                            type: boolean
                            example: false
                      type:
                        type: string
                        enum:
                          - regular
                          - enrollment
                        example: regular
                      enrollment_pack_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      enrollment_pack:
                        type:
                          - object
                          - 'null'
                        properties:
                          enrollment_pack_id:
                            type: integer
                            example: 1
                          additional_volume:
                            type:
                              - integer
                              - 'null'
                            example: 10
                          description:
                            type:
                              - object
                              - 'null'
                              - string
                            properties:
                              id:
                                type: integer
                                example: 111
                              name:
                                type: string
                                example: description
                              body:
                                type: string
                                example: >-
                                  <div>Try the latest and greatest of our sugar
                                  zip packs. Guaranteed to make you skinner and
                                  cure cancer.</div>
                              record_type:
                                type: string
                                example: EnrollmentPack
                              record_id:
                                type: integer
                                example: 1
                              created_at:
                                type: string
                                format: date_time
                                example: '2025-01-16T04:22:43.809Z'
                              updated_at:
                                type: string
                                format: date_time
                                example: '2025-01-22T10:23:52.941Z'
                              locale:
                                type: string
                                example: en
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: 10
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.00
                          images:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 2
                                relateable_type:
                                  type: string
                                  example: EnrollmentPack
                                relateable_id:
                                  type: integer
                                  example: 1
                                image_url:
                                  type: string
                                  example: >-
                                    https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                image_path:
                                  type: string
                                  example: jITWaU14QGe0y5AFgY7P_00179.svg
                                position:
                                  type: integer
                                  example: 1
                                shopify_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                                created_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                updated_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                external_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 625
                                allow_subscription:
                                  type: boolean
                                  example: true
                                cv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                cv_in_currency:
                                  type: string
                                  example: $0.00
                                enrollment:
                                  type: boolean
                                  example: true
                                enrollment_pack_id:
                                  type: integer
                                  example: 1
                                price:
                                  type: string
                                  example: '11.13'
                                price_in_currency:
                                  type: string
                                  example: $11.13
                                product_title:
                                  type: string
                                  example: Zip Pack Sample Pack (30)
                                quantity:
                                  type: integer
                                  example: 1
                                qv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                qv_in_currency:
                                  type: string
                                  example: $0.00
                                subscribe_and_save:
                                  type:
                                    - string
                                    - 'null'
                                  example: '-1988.87'
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $-1,988.87
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $-1,988.87
                                subscription:
                                  type: boolean
                                  example: false
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_only:
                                  type: boolean
                                  example: false
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_price:
                                  type: string
                                  example: '2000.0'
                                subscription_price_in_currency:
                                  type: string
                                  example: $2,000.00
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                  example: '2025-02-28'
                                tax:
                                  type: string
                                  example: '0.0'
                                tax_in_currency:
                                  type: string
                                  example: $0.00
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: null
                                display_to_customer:
                                  type: boolean
                                  example: false
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          price:
                            type:
                              - string
                              - integer
                            example: 11.13
                          price_in_currency:
                            type: string
                            example: $11.13
                          subscription_price:
                            type:
                              - string
                              - integer
                            example: 2000
                          subscription_price_in_currency:
                            type: string
                            example: $2,000.00
                          title:
                            type: string
                            example: enroll product
                          token:
                            type: string
                            example: NxL22AqLRRisfyF9LqxxWRak
                      recurring:
                        oneOf:
                          - type: array
                            items:
                              type: object
                              properties:
                                subtotal:
                                  type: string
                                  example: '10.0'
                                subtotal_in_currency:
                                  type: string
                                  example: $10.0
                                interval:
                                  type: integer
                                  example: 1
                                interval_unit:
                                  type: string
                                  example: month
                                subtotal_for_display:
                                  type: string
                                  example: $10.00 every 1 month
                                start_date:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-05-27'
                          - type: 'null'
                        default:
                          - subtotal: '10.0'
                            subtotal_in_currency: $10.0
                            interval: 1
                            interval_unit: month
                            subtotal_for_display: $10.00 every 1 month
                            start_date: '2025-05-27'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      checkout_url:
                        type: string
                        example: https://checkout.fluid.com/checkout?jwt=abc123
                      shop_url:
                        type: string
                        example: https://myco.fluid.app
        '410':
          description: cart is in authorized enrollment state
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Cart is in authorized state and cannot be modified
                  errors:
                    type: object
                    example:
                      cart:
                        - is in authorized state and cannot be modified
                  meta:
                    type: object
                    properties:
                      shop_url:
                        type: string
                        example: https://example.myshopify.com
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      cart:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 123
                          state:
                            type: string
                            example: start
                          processed:
                            type: boolean
                            example: false
                            description: >-
                              Determines if a cart payment has been processed or
                              not.
                          valid_for_checkout:
                            type: boolean
                            example: true
                          buyer_rep_id:
                            type:
                              - integer
                              - 'null'
                            example: 1
                          currency_symbol:
                            type: string
                            example: $
                          currency_code:
                            type: string
                            example: USD
                          shipping_total_for_display:
                            type: string
                            example: Free
                          phone:
                            type:
                              - string
                              - 'null'
                            example: '4035551212'
                          payment_method_auto_assignable:
                            type: boolean
                            example: true
                            description: >-
                              Determines if a payment method can be
                              auto-assigned to the cart.
                          attribution:
                            oneOf:
                              - type: object
                                oneOf:
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      share_guid:
                                        type: string
                                        example: james-bond007
                                    required:
                                      - id
                                      - share_guid
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      email:
                                        type: string
                                        example: james.bond@gmail.com
                                    required:
                                      - id
                                      - email
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      username:
                                        type: string
                                        example: jaamball234
                                    required:
                                      - id
                                      - username
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      fluid_rep_id:
                                        type: integer
                                        example: 23493
                                    required:
                                      - id
                                      - fluid_rep_id
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      external_id:
                                        type:
                                          - string
                                          - 'null'
                                        example: w3sdf92
                                    required:
                                      - id
                              - type: 'null'
                            default:
                              id: 456
                              share_guid: james-bond007
                          agreements:
                            type: array
                            items:
                              type:
                                - object
                                - 'null'
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                required:
                                  type: boolean
                                  example: true
                                title:
                                  type: string
                                  example: Terms and Conditions
                                show_path:
                                  type: string
                                  example: /terms
                                enrollment_pack_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                          amount_total:
                            type: string
                            example: '121.65'
                          amount_total_in_currency:
                            type: string
                            example: $121.65 (USD)
                          sub_total:
                            type: string
                            example: '100.00'
                          sub_total_in_currency:
                            type: string
                            example: $100.00 (USD)
                          tax_total:
                            type: string
                            example: '20.00'
                          tax_total_in_currency:
                            type: string
                            example: $20.00 (USD)
                          shipping_total:
                            type: string
                            example: '1.65'
                          shipping_total_in_currency:
                            type: string
                            example: $1.65 (USD)
                          discount_total:
                            type: string
                            example: '2.99'
                          discount_total_in_currency:
                            type: string
                            example: $2.99 (USD)
                          transaction_fee:
                            type:
                              - number
                              - string
                            example: '1.90'
                          transaction_fee_in_currency:
                            type: string
                            example: $1.90 (USD)
                          cv_total:
                            type: integer
                            example: 10
                          qv_total:
                            type: integer
                            example: 15
                          company:
                            type: object
                            properties:
                              id:
                                type: integer
                              name:
                                type: string
                              primary_domain_hostname:
                                type:
                                  - string
                                  - 'null'
                                example: fluid.com
                              subdomain:
                                type:
                                  - string
                                  - 'null'
                                example: myco
                              logo_url:
                                type:
                                  - string
                                  - 'null'
                                example: https://example.com/logo.png
                              fluid_shop:
                                type:
                                  - string
                                  - 'null'
                                example: https://fluid-sample-shop.fluid.com
                              collect_phone:
                                type: boolean
                                example: true
                              require_phone:
                                type: boolean
                                example: false
                              require_billing_zip:
                                type: boolean
                                example: false
                              checkout_primary_button_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#000000'
                              checkout_primary_text_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#FFFFFF'
                              checkout_secondary_button_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#FFFFFF'
                              checkout_secondary_text_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#000000'
                          payment_method:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              cart_type:
                                type: string
                                example: credit_card
                              last_four:
                                type: string
                                example: '1234'
                              exp_month:
                                type: integer
                                example: 12
                              exp_year:
                                type: integer
                                example: 2025
                              logo_url:
                                type: string
                                example: https://example.com/image.svg
                          email:
                            type:
                              - string
                              - 'null'
                            example: user@example.com
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: '10.45'
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.45
                          discount_code:
                            type:
                              - string
                              - 'null'
                            example: DISCOUNT10
                          language_iso:
                            type:
                              - string
                              - 'null'
                            example: en
                          cart_token:
                            type: string
                            example: abc123
                          immutable_items:
                            type: boolean
                            example: false
                          digital_only:
                            type: boolean
                            example: false
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 101
                                price:
                                  type: string
                                  example: '43.41'
                                price_in_currency:
                                  type: string
                                  example: $43.41
                                tax:
                                  type: string
                                  example: '2.99'
                                tax_in_currency:
                                  type: string
                                  example: $2.99
                                cv:
                                  type: integer
                                  example: 5
                                qv:
                                  type: integer
                                  example: 7
                                discount_amount:
                                  type: string
                                  example: '10'
                                discount_amount_in_currency:
                                  type: string
                                  example: $10.00
                                enrollment_pack_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                display_to_customer:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                product_title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Sample Product
                                quantity:
                                  type: integer
                                  example: 3
                                subscription:
                                  type: boolean
                                  example: true
                                enrollment:
                                  type: boolean
                                  example: false
                                allow_subscription:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_only:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_price:
                                  type:
                                    - number
                                    - string
                                    - 'null'
                                  example: 10.5
                                subscription_price_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $10.50
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-02-12'
                                subscribe_and_save:
                                  type:
                                    - number
                                    - string
                                    - 'null'
                                  example: 2.99
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $2.99
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $2.99
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Surcharge
                                product:
                                  oneOf:
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 1
                                        title:
                                          type: string
                                          example: Sample Product
                                        cv:
                                          type: integer
                                          example: 10
                                        image_path:
                                          type:
                                            - string
                                            - 'null'
                                          example: /images/product.png
                                        image_url:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/product.png
                                        price:
                                          type: string
                                          example: '29.99'
                                        price_in_currency:
                                          type: string
                                          example: $29.99
                                        sku:
                                          type:
                                            - string
                                            - 'null'
                                          example: SKU12345
                                        tax:
                                          type: string
                                          example: '2.99'
                                        tax_in_currency:
                                          type: string
                                          example: $2.99
                                    - type: 'null'
                                variant:
                                  oneOf:
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 1
                                        title:
                                          type:
                                            - string
                                            - 'null'
                                          example: Sample Variant
                                        image_path:
                                          type:
                                            - string
                                            - 'null'
                                          example: /images/sample.png
                                        image_url:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/sample.png
                                        primary_image:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/primary.png
                                        price:
                                          type:
                                            - string
                                            - 'null'
                                          example: '34.44'
                                        price_in_currency:
                                          type:
                                            - string
                                            - 'null'
                                          example: $34.44
                                        sku:
                                          type:
                                            - string
                                            - 'null'
                                          example: SKU12345
                                        options:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              title:
                                                type: string
                                                example: Size
                                              value:
                                                type: string
                                                example: XL
                                    - type: 'null'
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          ship_to:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          bill_to:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          shipping_method:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type: string
                                example: Standard Shipping
                          available_shipping_methods:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type: string
                                  example: Standard Shipping
                                price:
                                  type:
                                    - number
                                    - string
                                  example: 5.99
                                price_label:
                                  type: string
                                  example: $5.99
                                delivery_time_estimate:
                                  type: string
                                  example: 3-5 business days
                          available_payment_methods:
                            type: array
                            items:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1337
                                    type:
                                      type: string
                                      enum:
                                        - credit_card
                                    name:
                                      type: string
                                      example: Credit Card
                                    test:
                                      type: boolean
                                      example: true
                                      description: >-
                                        Determines if payment method is test
                                        instance or not. By default, set to
                                        `true`
                                    sandbox:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is sandbox
                                        instance or not. By default, set to
                                        `false`
                                    apple_pay:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method supports
                                        ApplePay or not 
                                    bogus_gateway:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is a Bogus
                                        instance or not.
                                    tokenize_path:
                                      type:
                                        - string
                                        - 'null'
                                      description: Path to tokenize, if applicable.
                                    token_provider:
                                      type: string
                                      enum:
                                        - spreedly
                                        - vgs
                                      description: >-
                                        Determines if payment tokenization is
                                        via spreedly or VGS
                                    apple_pay_merchant_identifier:
                                      type:
                                        - string
                                        - 'null'
                                      example: merchant.mycompany.com
                                      description: >-
                                        If ApplePay is supported, returns the
                                        merchant identifier registered with
                                        Apple, else returns nil
                                    supported_brands:
                                      type: array
                                      items:
                                        type: string
                                      example:
                                        - visa
                                        - master
                                        - american_express
                                        - discover
                                  required:
                                    - id
                                    - type
                                    - name
                                    - supported_brands
                                    - test
                                    - sandbox
                                    - apple_pay
                                    - apple_pay_merchant_identifier
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1337
                                    type:
                                      type: string
                                      enum:
                                        - klarna
                                    name:
                                      type: string
                                      example: Klarna
                                    test:
                                      type: boolean
                                      example: true
                                      description: >-
                                        Determines if payment method is test
                                        instance or not. By default, set to
                                        `true`
                                    sandbox:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is sandbox
                                        instance or not. By default, set to
                                        `false`
                          country:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              iso:
                                type: string
                                example: US
                              name:
                                type: string
                                example: United States
                              province_required:
                                type: boolean
                                example: false
                          type:
                            type: string
                            enum:
                              - regular
                              - enrollment
                            example: regular
                          enrollment_pack_id:
                            type:
                              - integer
                              - 'null'
                            example: 1
                          enrollment_pack:
                            type:
                              - object
                              - 'null'
                            properties:
                              enrollment_pack_id:
                                type: integer
                                example: 1
                              additional_volume:
                                type:
                                  - integer
                                  - 'null'
                                example: 10
                              description:
                                type:
                                  - object
                                  - 'null'
                                  - string
                                properties:
                                  id:
                                    type: integer
                                    example: 111
                                  name:
                                    type: string
                                    example: description
                                  body:
                                    type: string
                                    example: >-
                                      <div>Try the latest and greatest of our
                                      sugar zip packs. Guaranteed to make you
                                      skinner and cure cancer.</div>
                                  record_type:
                                    type: string
                                    example: EnrollmentPack
                                  record_id:
                                    type: integer
                                    example: 1
                                  created_at:
                                    type: string
                                    format: date_time
                                    example: '2025-01-16T04:22:43.809Z'
                                  updated_at:
                                    type: string
                                    format: date_time
                                    example: '2025-01-22T10:23:52.941Z'
                                  locale:
                                    type: string
                                    example: en
                              enrollment_fee:
                                type:
                                  - number
                                  - string
                                example: 10
                              enrollment_fee_in_currency:
                                type: string
                                example: $10.00
                              images:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 2
                                    relateable_type:
                                      type: string
                                      example: EnrollmentPack
                                    relateable_id:
                                      type: integer
                                      example: 1
                                    image_url:
                                      type: string
                                      example: >-
                                        https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                    image_path:
                                      type: string
                                      example: jITWaU14QGe0y5AFgY7P_00179.svg
                                    position:
                                      type: integer
                                      example: 1
                                    shopify_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: null
                                    created_at:
                                      type: string
                                      format: date_time
                                      example: '2025-01-16T04:22:44.870Z'
                                    updated_at:
                                      type: string
                                      format: date_time
                                      example: '2025-01-16T04:22:44.870Z'
                                    external_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: null
                              items:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 625
                                    allow_subscription:
                                      type: boolean
                                      example: true
                                    cv:
                                      type:
                                        - number
                                        - string
                                      example: 0
                                    cv_in_currency:
                                      type: string
                                      example: $0.00
                                    enrollment:
                                      type: boolean
                                      example: true
                                    enrollment_pack_id:
                                      type: integer
                                      example: 1
                                    price:
                                      type: string
                                      example: '11.13'
                                    price_in_currency:
                                      type: string
                                      example: $11.13
                                    product_title:
                                      type: string
                                      example: Zip Pack Sample Pack (30)
                                    quantity:
                                      type: integer
                                      example: 1
                                    qv:
                                      type:
                                        - number
                                        - string
                                      example: 0
                                    qv_in_currency:
                                      type: string
                                      example: $0.00
                                    subscribe_and_save:
                                      type:
                                        - string
                                        - 'null'
                                      example: '-1988.87'
                                    subscribe_and_save_for_display:
                                      type:
                                        - string
                                        - 'null'
                                      example: Subscribe and save $-1,988.87
                                    subscribe_and_save_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $-1,988.87
                                    subscription:
                                      type: boolean
                                      example: false
                                    subscription_interval:
                                      type:
                                        - integer
                                        - 'null'
                                      example: 1
                                    subscription_interval_unit:
                                      type:
                                        - string
                                        - 'null'
                                      example: month
                                    subscription_only:
                                      type: boolean
                                      example: false
                                    subscription_plan_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: 1
                                    subscription_plans:
                                      oneOf:
                                        - type: array
                                          items:
                                            title: Commerce::SubscriptionPlan
                                            type: object
                                            properties:
                                              id:
                                                type: integer
                                              name:
                                                example: Test Subscription Plan
                                                type: string
                                              billing_interval:
                                                example: 1
                                                type: integer
                                                default: 1
                                                minimum: 1
                                              billing_interval_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type: string
                                                default: month
                                              shipping_interval:
                                                example: 1
                                                type: integer
                                                default: 1
                                                minimum: 1
                                              shipping_interval_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type: string
                                                default: month
                                              trial_period:
                                                example: 1
                                                type:
                                                  - integer
                                                  - 'null'
                                                minimum: 1
                                              trial_period_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type:
                                                  - string
                                                  - 'null'
                                              split_volume:
                                                example: true
                                                type: boolean
                                                default: false
                                              max_quantity:
                                                example: 100
                                                type:
                                                  - integer
                                                  - 'null'
                                                minimum: 1
                                              company_default:
                                                example: false
                                                type:
                                                  - boolean
                                                  - 'null'
                                                default: false
                                              products_count:
                                                example: 10
                                                type:
                                                  - integer
                                                  - 'null'
                                              subscribers_count:
                                                example: 10
                                                type:
                                                  - integer
                                                  - 'null'
                                              price:
                                                type: string
                                              price_in_currency:
                                                type: string
                                              subscription_start:
                                                type: string
                                              subscribe_and_save:
                                                type: string
                                              subscribe_and_save_in_currency:
                                                type: string
                                              subscribe_and_save_for_display:
                                                type: string
                                            required:
                                              - id
                                              - name
                                              - billing_interval
                                              - billing_interval_unit
                                              - shipping_interval
                                              - shipping_interval_unit
                                              - split_volume
                                              - price
                                              - price_in_currency
                                              - subscription_start
                                              - subscribe_and_save
                                              - subscribe_and_save_in_currency
                                              - subscribe_and_save_for_display
                                        - type: 'null'
                                    subscription_price:
                                      type: string
                                      example: '2000.0'
                                    subscription_price_in_currency:
                                      type: string
                                      example: $2,000.00
                                    subscription_start:
                                      type:
                                        - string
                                        - 'null'
                                      format: date
                                      example: '2025-02-28'
                                    tax:
                                      type: string
                                      example: '0.0'
                                    tax_in_currency:
                                      type: string
                                      example: $0.00
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: null
                                    display_to_customer:
                                      type: boolean
                                      example: false
                                    errors:
                                      oneOf:
                                        - type: 'null'
                                        - type: array
                                          items:
                                            type: object
                                            example:
                                              country:
                                                - >-
                                                  This product is not available for this
                                                  country. Please change your country
                              price:
                                type:
                                  - string
                                  - integer
                                example: 11.13
                              price_in_currency:
                                type: string
                                example: $11.13
                              subscription_price:
                                type:
                                  - string
                                  - integer
                                example: 2000
                              subscription_price_in_currency:
                                type: string
                                example: $2,000.00
                              title:
                                type: string
                                example: enroll product
                              token:
                                type: string
                                example: NxL22AqLRRisfyF9LqxxWRak
                          recurring:
                            oneOf:
                              - type: array
                                items:
                                  type: object
                                  properties:
                                    subtotal:
                                      type: string
                                      example: '10.0'
                                    subtotal_in_currency:
                                      type: string
                                      example: $10.0
                                    interval:
                                      type: integer
                                      example: 1
                                    interval_unit:
                                      type: string
                                      example: month
                                    subtotal_for_display:
                                      type: string
                                      example: $10.00 every 1 month
                                    start_date:
                                      type:
                                        - string
                                        - 'null'
                                      example: '2025-05-27'
                              - type: 'null'
                            default:
                              - subtotal: '10.0'
                                subtotal_in_currency: $10.0
                                interval: 1
                                interval_unit: month
                                subtotal_for_display: $10.00 every 1 month
                                start_date: '2025-05-27'
                required:
                  - error_message
                  - errors
                  - meta
        '422':
          description: invalid address type
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid address type
      requestBody:
        content:
          application/json:
            schema:
              type:
                - object
                - 'null'
              properties:
                type:
                  type: string
                  enum:
                    - ship_to
                    - bill_to
                  example: bill_to
                jwt:
                  type:
                    - string
                    - 'null'
                  example: eyJhbGciO1NiJ9.eyJhdXcyNjN9.AZ-4PAgFwVyGp
                address_id:
                  type:
                    - integer
                    - 'null'
                  example: 456
                address:
                  type:
                    - object
                    - 'null'
                  properties:
                    id:
                      type:
                        - integer
                        - 'null'
                      example: 456
                    first_name:
                      type: string
                      example: John
                    last_name:
                      type: string
                      example: Doe
                    address1:
                      type: string
                      example: 123 Main St
                    city:
                      type: string
                      example: Anytown
                    state:
                      type: string
                      example: CA
                    postal_code:
                      type: string
                      example: '12345'
                    country_code:
                      type: string
                      example: US
  /api/carts/{cart_token}:
    get:
      summary: Retrieves a cart
      tags:
        - Carts
      operationId: getCart
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
        - name: payment_methods_includes
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: cart found
          content:
            application/json:
              schema:
                type: object
                properties:
                  cart:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123
                      state:
                        type: string
                        example: start
                      processed:
                        type: boolean
                        example: false
                        description: >-
                          Determines if a cart payment has been processed or
                          not.
                      valid_for_checkout:
                        type: boolean
                        example: true
                      buyer_rep_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      currency_symbol:
                        type: string
                        example: $
                      currency_code:
                        type: string
                        example: USD
                      shipping_total_for_display:
                        type: string
                        example: Free
                      phone:
                        type:
                          - string
                          - 'null'
                        example: '4035551212'
                      payment_method_auto_assignable:
                        type: boolean
                        example: true
                        description: >-
                          Determines if a payment method can be auto-assigned to
                          the cart.
                      attribution:
                        oneOf:
                          - type: object
                            oneOf:
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  share_guid:
                                    type: string
                                    example: james-bond007
                                required:
                                  - id
                                  - share_guid
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  email:
                                    type: string
                                    example: james.bond@gmail.com
                                required:
                                  - id
                                  - email
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  username:
                                    type: string
                                    example: jaamball234
                                required:
                                  - id
                                  - username
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  fluid_rep_id:
                                    type: integer
                                    example: 23493
                                required:
                                  - id
                                  - fluid_rep_id
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  external_id:
                                    type:
                                      - string
                                      - 'null'
                                    example: w3sdf92
                                required:
                                  - id
                          - type: 'null'
                        default:
                          id: 456
                          share_guid: james-bond007
                      agreements:
                        type: array
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                              example: 1
                            required:
                              type: boolean
                              example: true
                            title:
                              type: string
                              example: Terms and Conditions
                            show_path:
                              type: string
                              example: /terms
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                      amount_total:
                        type: string
                        example: '121.65'
                      amount_total_in_currency:
                        type: string
                        example: $121.65 (USD)
                      sub_total:
                        type: string
                        example: '100.00'
                      sub_total_in_currency:
                        type: string
                        example: $100.00 (USD)
                      tax_total:
                        type: string
                        example: '20.00'
                      tax_total_in_currency:
                        type: string
                        example: $20.00 (USD)
                      shipping_total:
                        type: string
                        example: '1.65'
                      shipping_total_in_currency:
                        type: string
                        example: $1.65 (USD)
                      discount_total:
                        type: string
                        example: '2.99'
                      discount_total_in_currency:
                        type: string
                        example: $2.99 (USD)
                      transaction_fee:
                        type:
                          - number
                          - string
                        example: '1.90'
                      transaction_fee_in_currency:
                        type: string
                        example: $1.90 (USD)
                      cv_total:
                        type: integer
                        example: 10
                      qv_total:
                        type: integer
                        example: 15
                      company:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          primary_domain_hostname:
                            type:
                              - string
                              - 'null'
                            example: fluid.com
                          subdomain:
                            type:
                              - string
                              - 'null'
                            example: myco
                          logo_url:
                            type:
                              - string
                              - 'null'
                            example: https://example.com/logo.png
                          fluid_shop:
                            type:
                              - string
                              - 'null'
                            example: https://fluid-sample-shop.fluid.com
                          collect_phone:
                            type: boolean
                            example: true
                          require_phone:
                            type: boolean
                            example: false
                          require_billing_zip:
                            type: boolean
                            example: false
                          checkout_primary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                          checkout_primary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                      payment_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          cart_type:
                            type: string
                            example: credit_card
                          last_four:
                            type: string
                            example: '1234'
                          exp_month:
                            type: integer
                            example: 12
                          exp_year:
                            type: integer
                            example: 2025
                          logo_url:
                            type: string
                            example: https://example.com/image.svg
                      email:
                        type:
                          - string
                          - 'null'
                        example: user@example.com
                      enrollment_fee:
                        type:
                          - number
                          - string
                        example: '10.45'
                      enrollment_fee_in_currency:
                        type: string
                        example: $10.45
                      discount_code:
                        type:
                          - string
                          - 'null'
                        example: DISCOUNT10
                      language_iso:
                        type:
                          - string
                          - 'null'
                        example: en
                      cart_token:
                        type: string
                        example: abc123
                      immutable_items:
                        type: boolean
                        example: false
                      digital_only:
                        type: boolean
                        example: false
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 101
                            price:
                              type: string
                              example: '43.41'
                            price_in_currency:
                              type: string
                              example: $43.41
                            tax:
                              type: string
                              example: '2.99'
                            tax_in_currency:
                              type: string
                              example: $2.99
                            cv:
                              type: integer
                              example: 5
                            qv:
                              type: integer
                              example: 7
                            discount_amount:
                              type: string
                              example: '10'
                            discount_amount_in_currency:
                              type: string
                              example: $10.00
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            display_to_customer:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            product_title:
                              type:
                                - string
                                - 'null'
                              example: Sample Product
                            quantity:
                              type: integer
                              example: 3
                            subscription:
                              type: boolean
                              example: true
                            enrollment:
                              type: boolean
                              example: false
                            allow_subscription:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_plan_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_plans:
                              oneOf:
                                - type: array
                                  items:
                                    title: Commerce::SubscriptionPlan
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      name:
                                        example: Test Subscription Plan
                                        type: string
                                      billing_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      billing_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      shipping_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      shipping_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      trial_period:
                                        example: 1
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      trial_period_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type:
                                          - string
                                          - 'null'
                                      split_volume:
                                        example: true
                                        type: boolean
                                        default: false
                                      max_quantity:
                                        example: 100
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      company_default:
                                        example: false
                                        type:
                                          - boolean
                                          - 'null'
                                        default: false
                                      products_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      subscribers_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      price:
                                        type: string
                                      price_in_currency:
                                        type: string
                                      subscription_start:
                                        type: string
                                      subscribe_and_save:
                                        type: string
                                      subscribe_and_save_in_currency:
                                        type: string
                                      subscribe_and_save_for_display:
                                        type: string
                                    required:
                                      - id
                                      - name
                                      - billing_interval
                                      - billing_interval_unit
                                      - shipping_interval
                                      - shipping_interval_unit
                                      - split_volume
                                      - price
                                      - price_in_currency
                                      - subscription_start
                                      - subscribe_and_save
                                      - subscribe_and_save_in_currency
                                      - subscribe_and_save_for_display
                                - type: 'null'
                            subscription_only:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_interval:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_interval_unit:
                              type:
                                - string
                                - 'null'
                              example: month
                            subscription_price:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 10.5
                            subscription_price_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $10.50
                            subscription_start:
                              type:
                                - string
                                - 'null'
                              example: '2025-02-12'
                            subscribe_and_save:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 2.99
                            subscribe_and_save_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $2.99
                            subscribe_and_save_for_display:
                              type:
                                - string
                                - 'null'
                              example: Subscribe and save $2.99
                            title:
                              type:
                                - string
                                - 'null'
                              example: Surcharge
                            product:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type: string
                                      example: Sample Product
                                    cv:
                                      type: integer
                                      example: 10
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/product.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/product.png
                                    price:
                                      type: string
                                      example: '29.99'
                                    price_in_currency:
                                      type: string
                                      example: $29.99
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    tax:
                                      type: string
                                      example: '2.99'
                                    tax_in_currency:
                                      type: string
                                      example: $2.99
                                - type: 'null'
                            variant:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: Sample Variant
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/sample.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/sample.png
                                    primary_image:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/primary.png
                                    price:
                                      type:
                                        - string
                                        - 'null'
                                      example: '34.44'
                                    price_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $34.44
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    options:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          title:
                                            type: string
                                            example: Size
                                          value:
                                            type: string
                                            example: XL
                                - type: 'null'
                            errors:
                              oneOf:
                                - type: 'null'
                                - type: array
                                  items:
                                    type: object
                                    example:
                                      country:
                                        - >-
                                          This product is not available for this
                                          country. Please change your country
                      ship_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      bill_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      shipping_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type: string
                            example: Standard Shipping
                      available_shipping_methods:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            title:
                              type: string
                              example: Standard Shipping
                            price:
                              type:
                                - number
                                - string
                              example: 5.99
                            price_label:
                              type: string
                              example: $5.99
                            delivery_time_estimate:
                              type: string
                              example: 3-5 business days
                      available_payment_methods:
                        type: array
                        items:
                          oneOf:
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - credit_card
                                name:
                                  type: string
                                  example: Credit Card
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                                apple_pay:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method supports
                                    ApplePay or not 
                                bogus_gateway:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is a Bogus
                                    instance or not.
                                tokenize_path:
                                  type:
                                    - string
                                    - 'null'
                                  description: Path to tokenize, if applicable.
                                token_provider:
                                  type: string
                                  enum:
                                    - spreedly
                                    - vgs
                                  description: >-
                                    Determines if payment tokenization is via
                                    spreedly or VGS
                                apple_pay_merchant_identifier:
                                  type:
                                    - string
                                    - 'null'
                                  example: merchant.mycompany.com
                                  description: >-
                                    If ApplePay is supported, returns the
                                    merchant identifier registered with Apple,
                                    else returns nil
                                supported_brands:
                                  type: array
                                  items:
                                    type: string
                                  example:
                                    - visa
                                    - master
                                    - american_express
                                    - discover
                              required:
                                - id
                                - type
                                - name
                                - supported_brands
                                - test
                                - sandbox
                                - apple_pay
                                - apple_pay_merchant_identifier
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - klarna
                                name:
                                  type: string
                                  example: Klarna
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                      country:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          iso:
                            type: string
                            example: US
                          name:
                            type: string
                            example: United States
                          province_required:
                            type: boolean
                            example: false
                      type:
                        type: string
                        enum:
                          - regular
                          - enrollment
                        example: regular
                      enrollment_pack_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      enrollment_pack:
                        type:
                          - object
                          - 'null'
                        properties:
                          enrollment_pack_id:
                            type: integer
                            example: 1
                          additional_volume:
                            type:
                              - integer
                              - 'null'
                            example: 10
                          description:
                            type:
                              - object
                              - 'null'
                              - string
                            properties:
                              id:
                                type: integer
                                example: 111
                              name:
                                type: string
                                example: description
                              body:
                                type: string
                                example: >-
                                  <div>Try the latest and greatest of our sugar
                                  zip packs. Guaranteed to make you skinner and
                                  cure cancer.</div>
                              record_type:
                                type: string
                                example: EnrollmentPack
                              record_id:
                                type: integer
                                example: 1
                              created_at:
                                type: string
                                format: date_time
                                example: '2025-01-16T04:22:43.809Z'
                              updated_at:
                                type: string
                                format: date_time
                                example: '2025-01-22T10:23:52.941Z'
                              locale:
                                type: string
                                example: en
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: 10
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.00
                          images:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 2
                                relateable_type:
                                  type: string
                                  example: EnrollmentPack
                                relateable_id:
                                  type: integer
                                  example: 1
                                image_url:
                                  type: string
                                  example: >-
                                    https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                image_path:
                                  type: string
                                  example: jITWaU14QGe0y5AFgY7P_00179.svg
                                position:
                                  type: integer
                                  example: 1
                                shopify_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                                created_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                updated_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                external_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 625
                                allow_subscription:
                                  type: boolean
                                  example: true
                                cv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                cv_in_currency:
                                  type: string
                                  example: $0.00
                                enrollment:
                                  type: boolean
                                  example: true
                                enrollment_pack_id:
                                  type: integer
                                  example: 1
                                price:
                                  type: string
                                  example: '11.13'
                                price_in_currency:
                                  type: string
                                  example: $11.13
                                product_title:
                                  type: string
                                  example: Zip Pack Sample Pack (30)
                                quantity:
                                  type: integer
                                  example: 1
                                qv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                qv_in_currency:
                                  type: string
                                  example: $0.00
                                subscribe_and_save:
                                  type:
                                    - string
                                    - 'null'
                                  example: '-1988.87'
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $-1,988.87
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $-1,988.87
                                subscription:
                                  type: boolean
                                  example: false
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_only:
                                  type: boolean
                                  example: false
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_price:
                                  type: string
                                  example: '2000.0'
                                subscription_price_in_currency:
                                  type: string
                                  example: $2,000.00
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                  example: '2025-02-28'
                                tax:
                                  type: string
                                  example: '0.0'
                                tax_in_currency:
                                  type: string
                                  example: $0.00
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: null
                                display_to_customer:
                                  type: boolean
                                  example: false
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          price:
                            type:
                              - string
                              - integer
                            example: 11.13
                          price_in_currency:
                            type: string
                            example: $11.13
                          subscription_price:
                            type:
                              - string
                              - integer
                            example: 2000
                          subscription_price_in_currency:
                            type: string
                            example: $2,000.00
                          title:
                            type: string
                            example: enroll product
                          token:
                            type: string
                            example: NxL22AqLRRisfyF9LqxxWRak
                      recurring:
                        oneOf:
                          - type: array
                            items:
                              type: object
                              properties:
                                subtotal:
                                  type: string
                                  example: '10.0'
                                subtotal_in_currency:
                                  type: string
                                  example: $10.0
                                interval:
                                  type: integer
                                  example: 1
                                interval_unit:
                                  type: string
                                  example: month
                                subtotal_for_display:
                                  type: string
                                  example: $10.00 every 1 month
                                start_date:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-05-27'
                          - type: 'null'
                        default:
                          - subtotal: '10.0'
                            subtotal_in_currency: $10.0
                            interval: 1
                            interval_unit: month
                            subtotal_for_display: $10.00 every 1 month
                            start_date: '2025-05-27'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      checkout_url:
                        type: string
                        example: https://checkout.fluid.com/checkout?jwt=abc123
                      shop_url:
                        type: string
                        example: https://myco.fluid.app
        '404':
          description: cart not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                      example:
                        - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '410':
          description: cart is processed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Cart is processed and can't be modified
                  errors:
                    type: object
                    example:
                      cart:
                        - is processed and can't be modified
                  meta:
                    type: object
                    properties:
                      shop_url:
                        type: string
                        example: https://example.myshopify.com
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      cart:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 123
                          state:
                            type: string
                            example: start
                          processed:
                            type: boolean
                            example: false
                            description: >-
                              Determines if a cart payment has been processed or
                              not.
                          valid_for_checkout:
                            type: boolean
                            example: true
                          buyer_rep_id:
                            type:
                              - integer
                              - 'null'
                            example: 1
                          currency_symbol:
                            type: string
                            example: $
                          currency_code:
                            type: string
                            example: USD
                          shipping_total_for_display:
                            type: string
                            example: Free
                          phone:
                            type:
                              - string
                              - 'null'
                            example: '4035551212'
                          payment_method_auto_assignable:
                            type: boolean
                            example: true
                            description: >-
                              Determines if a payment method can be
                              auto-assigned to the cart.
                          attribution:
                            oneOf:
                              - type: object
                                oneOf:
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      share_guid:
                                        type: string
                                        example: james-bond007
                                    required:
                                      - id
                                      - share_guid
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      email:
                                        type: string
                                        example: james.bond@gmail.com
                                    required:
                                      - id
                                      - email
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      username:
                                        type: string
                                        example: jaamball234
                                    required:
                                      - id
                                      - username
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      fluid_rep_id:
                                        type: integer
                                        example: 23493
                                    required:
                                      - id
                                      - fluid_rep_id
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      external_id:
                                        type:
                                          - string
                                          - 'null'
                                        example: w3sdf92
                                    required:
                                      - id
                              - type: 'null'
                            default:
                              id: 456
                              share_guid: james-bond007
                          agreements:
                            type: array
                            items:
                              type:
                                - object
                                - 'null'
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                required:
                                  type: boolean
                                  example: true
                                title:
                                  type: string
                                  example: Terms and Conditions
                                show_path:
                                  type: string
                                  example: /terms
                                enrollment_pack_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                          amount_total:
                            type: string
                            example: '121.65'
                          amount_total_in_currency:
                            type: string
                            example: $121.65 (USD)
                          sub_total:
                            type: string
                            example: '100.00'
                          sub_total_in_currency:
                            type: string
                            example: $100.00 (USD)
                          tax_total:
                            type: string
                            example: '20.00'
                          tax_total_in_currency:
                            type: string
                            example: $20.00 (USD)
                          shipping_total:
                            type: string
                            example: '1.65'
                          shipping_total_in_currency:
                            type: string
                            example: $1.65 (USD)
                          discount_total:
                            type: string
                            example: '2.99'
                          discount_total_in_currency:
                            type: string
                            example: $2.99 (USD)
                          transaction_fee:
                            type:
                              - number
                              - string
                            example: '1.90'
                          transaction_fee_in_currency:
                            type: string
                            example: $1.90 (USD)
                          cv_total:
                            type: integer
                            example: 10
                          qv_total:
                            type: integer
                            example: 15
                          company:
                            type: object
                            properties:
                              id:
                                type: integer
                              name:
                                type: string
                              primary_domain_hostname:
                                type:
                                  - string
                                  - 'null'
                                example: fluid.com
                              subdomain:
                                type:
                                  - string
                                  - 'null'
                                example: myco
                              logo_url:
                                type:
                                  - string
                                  - 'null'
                                example: https://example.com/logo.png
                              fluid_shop:
                                type:
                                  - string
                                  - 'null'
                                example: https://fluid-sample-shop.fluid.com
                              collect_phone:
                                type: boolean
                                example: true
                              require_phone:
                                type: boolean
                                example: false
                              require_billing_zip:
                                type: boolean
                                example: false
                              checkout_primary_button_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#000000'
                              checkout_primary_text_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#FFFFFF'
                              checkout_secondary_button_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#FFFFFF'
                              checkout_secondary_text_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#000000'
                          payment_method:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              cart_type:
                                type: string
                                example: credit_card
                              last_four:
                                type: string
                                example: '1234'
                              exp_month:
                                type: integer
                                example: 12
                              exp_year:
                                type: integer
                                example: 2025
                              logo_url:
                                type: string
                                example: https://example.com/image.svg
                          email:
                            type:
                              - string
                              - 'null'
                            example: user@example.com
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: '10.45'
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.45
                          discount_code:
                            type:
                              - string
                              - 'null'
                            example: DISCOUNT10
                          language_iso:
                            type:
                              - string
                              - 'null'
                            example: en
                          cart_token:
                            type: string
                            example: abc123
                          immutable_items:
                            type: boolean
                            example: false
                          digital_only:
                            type: boolean
                            example: false
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 101
                                price:
                                  type: string
                                  example: '43.41'
                                price_in_currency:
                                  type: string
                                  example: $43.41
                                tax:
                                  type: string
                                  example: '2.99'
                                tax_in_currency:
                                  type: string
                                  example: $2.99
                                cv:
                                  type: integer
                                  example: 5
                                qv:
                                  type: integer
                                  example: 7
                                discount_amount:
                                  type: string
                                  example: '10'
                                discount_amount_in_currency:
                                  type: string
                                  example: $10.00
                                enrollment_pack_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                display_to_customer:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                product_title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Sample Product
                                quantity:
                                  type: integer
                                  example: 3
                                subscription:
                                  type: boolean
                                  example: true
                                enrollment:
                                  type: boolean
                                  example: false
                                allow_subscription:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_only:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_price:
                                  type:
                                    - number
                                    - string
                                    - 'null'
                                  example: 10.5
                                subscription_price_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $10.50
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-02-12'
                                subscribe_and_save:
                                  type:
                                    - number
                                    - string
                                    - 'null'
                                  example: 2.99
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $2.99
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $2.99
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Surcharge
                                product:
                                  oneOf:
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 1
                                        title:
                                          type: string
                                          example: Sample Product
                                        cv:
                                          type: integer
                                          example: 10
                                        image_path:
                                          type:
                                            - string
                                            - 'null'
                                          example: /images/product.png
                                        image_url:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/product.png
                                        price:
                                          type: string
                                          example: '29.99'
                                        price_in_currency:
                                          type: string
                                          example: $29.99
                                        sku:
                                          type:
                                            - string
                                            - 'null'
                                          example: SKU12345
                                        tax:
                                          type: string
                                          example: '2.99'
                                        tax_in_currency:
                                          type: string
                                          example: $2.99
                                    - type: 'null'
                                variant:
                                  oneOf:
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 1
                                        title:
                                          type:
                                            - string
                                            - 'null'
                                          example: Sample Variant
                                        image_path:
                                          type:
                                            - string
                                            - 'null'
                                          example: /images/sample.png
                                        image_url:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/sample.png
                                        primary_image:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/primary.png
                                        price:
                                          type:
                                            - string
                                            - 'null'
                                          example: '34.44'
                                        price_in_currency:
                                          type:
                                            - string
                                            - 'null'
                                          example: $34.44
                                        sku:
                                          type:
                                            - string
                                            - 'null'
                                          example: SKU12345
                                        options:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              title:
                                                type: string
                                                example: Size
                                              value:
                                                type: string
                                                example: XL
                                    - type: 'null'
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          ship_to:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          bill_to:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          shipping_method:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type: string
                                example: Standard Shipping
                          available_shipping_methods:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type: string
                                  example: Standard Shipping
                                price:
                                  type:
                                    - number
                                    - string
                                  example: 5.99
                                price_label:
                                  type: string
                                  example: $5.99
                                delivery_time_estimate:
                                  type: string
                                  example: 3-5 business days
                          available_payment_methods:
                            type: array
                            items:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1337
                                    type:
                                      type: string
                                      enum:
                                        - credit_card
                                    name:
                                      type: string
                                      example: Credit Card
                                    test:
                                      type: boolean
                                      example: true
                                      description: >-
                                        Determines if payment method is test
                                        instance or not. By default, set to
                                        `true`
                                    sandbox:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is sandbox
                                        instance or not. By default, set to
                                        `false`
                                    apple_pay:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method supports
                                        ApplePay or not 
                                    bogus_gateway:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is a Bogus
                                        instance or not.
                                    tokenize_path:
                                      type:
                                        - string
                                        - 'null'
                                      description: Path to tokenize, if applicable.
                                    token_provider:
                                      type: string
                                      enum:
                                        - spreedly
                                        - vgs
                                      description: >-
                                        Determines if payment tokenization is
                                        via spreedly or VGS
                                    apple_pay_merchant_identifier:
                                      type:
                                        - string
                                        - 'null'
                                      example: merchant.mycompany.com
                                      description: >-
                                        If ApplePay is supported, returns the
                                        merchant identifier registered with
                                        Apple, else returns nil
                                    supported_brands:
                                      type: array
                                      items:
                                        type: string
                                      example:
                                        - visa
                                        - master
                                        - american_express
                                        - discover
                                  required:
                                    - id
                                    - type
                                    - name
                                    - supported_brands
                                    - test
                                    - sandbox
                                    - apple_pay
                                    - apple_pay_merchant_identifier
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1337
                                    type:
                                      type: string
                                      enum:
                                        - klarna
                                    name:
                                      type: string
                                      example: Klarna
                                    test:
                                      type: boolean
                                      example: true
                                      description: >-
                                        Determines if payment method is test
                                        instance or not. By default, set to
                                        `true`
                                    sandbox:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is sandbox
                                        instance or not. By default, set to
                                        `false`
                          country:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              iso:
                                type: string
                                example: US
                              name:
                                type: string
                                example: United States
                              province_required:
                                type: boolean
                                example: false
                          type:
                            type: string
                            enum:
                              - regular
                              - enrollment
                            example: regular
                          enrollment_pack_id:
                            type:
                              - integer
                              - 'null'
                            example: 1
                          enrollment_pack:
                            type:
                              - object
                              - 'null'
                            properties:
                              enrollment_pack_id:
                                type: integer
                                example: 1
                              additional_volume:
                                type:
                                  - integer
                                  - 'null'
                                example: 10
                              description:
                                type:
                                  - object
                                  - 'null'
                                  - string
                                properties:
                                  id:
                                    type: integer
                                    example: 111
                                  name:
                                    type: string
                                    example: description
                                  body:
                                    type: string
                                    example: >-
                                      <div>Try the latest and greatest of our
                                      sugar zip packs. Guaranteed to make you
                                      skinner and cure cancer.</div>
                                  record_type:
                                    type: string
                                    example: EnrollmentPack
                                  record_id:
                                    type: integer
                                    example: 1
                                  created_at:
                                    type: string
                                    format: date_time
                                    example: '2025-01-16T04:22:43.809Z'
                                  updated_at:
                                    type: string
                                    format: date_time
                                    example: '2025-01-22T10:23:52.941Z'
                                  locale:
                                    type: string
                                    example: en
                              enrollment_fee:
                                type:
                                  - number
                                  - string
                                example: 10
                              enrollment_fee_in_currency:
                                type: string
                                example: $10.00
                              images:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 2
                                    relateable_type:
                                      type: string
                                      example: EnrollmentPack
                                    relateable_id:
                                      type: integer
                                      example: 1
                                    image_url:
                                      type: string
                                      example: >-
                                        https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                    image_path:
                                      type: string
                                      example: jITWaU14QGe0y5AFgY7P_00179.svg
                                    position:
                                      type: integer
                                      example: 1
                                    shopify_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: null
                                    created_at:
                                      type: string
                                      format: date_time
                                      example: '2025-01-16T04:22:44.870Z'
                                    updated_at:
                                      type: string
                                      format: date_time
                                      example: '2025-01-16T04:22:44.870Z'
                                    external_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: null
                              items:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 625
                                    allow_subscription:
                                      type: boolean
                                      example: true
                                    cv:
                                      type:
                                        - number
                                        - string
                                      example: 0
                                    cv_in_currency:
                                      type: string
                                      example: $0.00
                                    enrollment:
                                      type: boolean
                                      example: true
                                    enrollment_pack_id:
                                      type: integer
                                      example: 1
                                    price:
                                      type: string
                                      example: '11.13'
                                    price_in_currency:
                                      type: string
                                      example: $11.13
                                    product_title:
                                      type: string
                                      example: Zip Pack Sample Pack (30)
                                    quantity:
                                      type: integer
                                      example: 1
                                    qv:
                                      type:
                                        - number
                                        - string
                                      example: 0
                                    qv_in_currency:
                                      type: string
                                      example: $0.00
                                    subscribe_and_save:
                                      type:
                                        - string
                                        - 'null'
                                      example: '-1988.87'
                                    subscribe_and_save_for_display:
                                      type:
                                        - string
                                        - 'null'
                                      example: Subscribe and save $-1,988.87
                                    subscribe_and_save_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $-1,988.87
                                    subscription:
                                      type: boolean
                                      example: false
                                    subscription_interval:
                                      type:
                                        - integer
                                        - 'null'
                                      example: 1
                                    subscription_interval_unit:
                                      type:
                                        - string
                                        - 'null'
                                      example: month
                                    subscription_only:
                                      type: boolean
                                      example: false
                                    subscription_plan_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: 1
                                    subscription_plans:
                                      oneOf:
                                        - type: array
                                          items:
                                            title: Commerce::SubscriptionPlan
                                            type: object
                                            properties:
                                              id:
                                                type: integer
                                              name:
                                                example: Test Subscription Plan
                                                type: string
                                              billing_interval:
                                                example: 1
                                                type: integer
                                                default: 1
                                                minimum: 1
                                              billing_interval_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type: string
                                                default: month
                                              shipping_interval:
                                                example: 1
                                                type: integer
                                                default: 1
                                                minimum: 1
                                              shipping_interval_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type: string
                                                default: month
                                              trial_period:
                                                example: 1
                                                type:
                                                  - integer
                                                  - 'null'
                                                minimum: 1
                                              trial_period_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type:
                                                  - string
                                                  - 'null'
                                              split_volume:
                                                example: true
                                                type: boolean
                                                default: false
                                              max_quantity:
                                                example: 100
                                                type:
                                                  - integer
                                                  - 'null'
                                                minimum: 1
                                              company_default:
                                                example: false
                                                type:
                                                  - boolean
                                                  - 'null'
                                                default: false
                                              products_count:
                                                example: 10
                                                type:
                                                  - integer
                                                  - 'null'
                                              subscribers_count:
                                                example: 10
                                                type:
                                                  - integer
                                                  - 'null'
                                              price:
                                                type: string
                                              price_in_currency:
                                                type: string
                                              subscription_start:
                                                type: string
                                              subscribe_and_save:
                                                type: string
                                              subscribe_and_save_in_currency:
                                                type: string
                                              subscribe_and_save_for_display:
                                                type: string
                                            required:
                                              - id
                                              - name
                                              - billing_interval
                                              - billing_interval_unit
                                              - shipping_interval
                                              - shipping_interval_unit
                                              - split_volume
                                              - price
                                              - price_in_currency
                                              - subscription_start
                                              - subscribe_and_save
                                              - subscribe_and_save_in_currency
                                              - subscribe_and_save_for_display
                                        - type: 'null'
                                    subscription_price:
                                      type: string
                                      example: '2000.0'
                                    subscription_price_in_currency:
                                      type: string
                                      example: $2,000.00
                                    subscription_start:
                                      type:
                                        - string
                                        - 'null'
                                      format: date
                                      example: '2025-02-28'
                                    tax:
                                      type: string
                                      example: '0.0'
                                    tax_in_currency:
                                      type: string
                                      example: $0.00
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: null
                                    display_to_customer:
                                      type: boolean
                                      example: false
                                    errors:
                                      oneOf:
                                        - type: 'null'
                                        - type: array
                                          items:
                                            type: object
                                            example:
                                              country:
                                                - >-
                                                  This product is not available for this
                                                  country. Please change your country
                              price:
                                type:
                                  - string
                                  - integer
                                example: 11.13
                              price_in_currency:
                                type: string
                                example: $11.13
                              subscription_price:
                                type:
                                  - string
                                  - integer
                                example: 2000
                              subscription_price_in_currency:
                                type: string
                                example: $2,000.00
                              title:
                                type: string
                                example: enroll product
                              token:
                                type: string
                                example: NxL22AqLRRisfyF9LqxxWRak
                          recurring:
                            oneOf:
                              - type: array
                                items:
                                  type: object
                                  properties:
                                    subtotal:
                                      type: string
                                      example: '10.0'
                                    subtotal_in_currency:
                                      type: string
                                      example: $10.0
                                    interval:
                                      type: integer
                                      example: 1
                                    interval_unit:
                                      type: string
                                      example: month
                                    subtotal_for_display:
                                      type: string
                                      example: $10.00 every 1 month
                                    start_date:
                                      type:
                                        - string
                                        - 'null'
                                      example: '2025-05-27'
                              - type: 'null'
                            default:
                              - subtotal: '10.0'
                                subtotal_in_currency: $10.0
                                interval: 1
                                interval_unit: month
                                subtotal_for_display: $10.00 every 1 month
                                start_date: '2025-05-27'
    patch:
      summary: Updates a cart
      tags:
        - Carts
      operationId: updateCart
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: cart updated with phone number validation
          content:
            application/json:
              schema:
                type: object
                properties:
                  cart:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123
                      state:
                        type: string
                        example: start
                      processed:
                        type: boolean
                        example: false
                        description: >-
                          Determines if a cart payment has been processed or
                          not.
                      valid_for_checkout:
                        type: boolean
                        example: true
                      buyer_rep_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      currency_symbol:
                        type: string
                        example: $
                      currency_code:
                        type: string
                        example: USD
                      shipping_total_for_display:
                        type: string
                        example: Free
                      phone:
                        type:
                          - string
                          - 'null'
                        example: '4035551212'
                      payment_method_auto_assignable:
                        type: boolean
                        example: true
                        description: >-
                          Determines if a payment method can be auto-assigned to
                          the cart.
                      attribution:
                        oneOf:
                          - type: object
                            oneOf:
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  share_guid:
                                    type: string
                                    example: james-bond007
                                required:
                                  - id
                                  - share_guid
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  email:
                                    type: string
                                    example: james.bond@gmail.com
                                required:
                                  - id
                                  - email
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  username:
                                    type: string
                                    example: jaamball234
                                required:
                                  - id
                                  - username
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  fluid_rep_id:
                                    type: integer
                                    example: 23493
                                required:
                                  - id
                                  - fluid_rep_id
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  external_id:
                                    type:
                                      - string
                                      - 'null'
                                    example: w3sdf92
                                required:
                                  - id
                          - type: 'null'
                        default:
                          id: 456
                          share_guid: james-bond007
                      agreements:
                        type: array
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                              example: 1
                            required:
                              type: boolean
                              example: true
                            title:
                              type: string
                              example: Terms and Conditions
                            show_path:
                              type: string
                              example: /terms
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                      amount_total:
                        type: string
                        example: '121.65'
                      amount_total_in_currency:
                        type: string
                        example: $121.65 (USD)
                      sub_total:
                        type: string
                        example: '100.00'
                      sub_total_in_currency:
                        type: string
                        example: $100.00 (USD)
                      tax_total:
                        type: string
                        example: '20.00'
                      tax_total_in_currency:
                        type: string
                        example: $20.00 (USD)
                      shipping_total:
                        type: string
                        example: '1.65'
                      shipping_total_in_currency:
                        type: string
                        example: $1.65 (USD)
                      discount_total:
                        type: string
                        example: '2.99'
                      discount_total_in_currency:
                        type: string
                        example: $2.99 (USD)
                      transaction_fee:
                        type:
                          - number
                          - string
                        example: '1.90'
                      transaction_fee_in_currency:
                        type: string
                        example: $1.90 (USD)
                      cv_total:
                        type: integer
                        example: 10
                      qv_total:
                        type: integer
                        example: 15
                      company:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          primary_domain_hostname:
                            type:
                              - string
                              - 'null'
                            example: fluid.com
                          subdomain:
                            type:
                              - string
                              - 'null'
                            example: myco
                          logo_url:
                            type:
                              - string
                              - 'null'
                            example: https://example.com/logo.png
                          fluid_shop:
                            type:
                              - string
                              - 'null'
                            example: https://fluid-sample-shop.fluid.com
                          collect_phone:
                            type: boolean
                            example: true
                          require_phone:
                            type: boolean
                            example: false
                          require_billing_zip:
                            type: boolean
                            example: false
                          checkout_primary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                          checkout_primary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                      payment_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          cart_type:
                            type: string
                            example: credit_card
                          last_four:
                            type: string
                            example: '1234'
                          exp_month:
                            type: integer
                            example: 12
                          exp_year:
                            type: integer
                            example: 2025
                          logo_url:
                            type: string
                            example: https://example.com/image.svg
                      email:
                        type:
                          - string
                          - 'null'
                        example: user@example.com
                      enrollment_fee:
                        type:
                          - number
                          - string
                        example: '10.45'
                      enrollment_fee_in_currency:
                        type: string
                        example: $10.45
                      discount_code:
                        type:
                          - string
                          - 'null'
                        example: DISCOUNT10
                      language_iso:
                        type:
                          - string
                          - 'null'
                        example: en
                      cart_token:
                        type: string
                        example: abc123
                      immutable_items:
                        type: boolean
                        example: false
                      digital_only:
                        type: boolean
                        example: false
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 101
                            price:
                              type: string
                              example: '43.41'
                            price_in_currency:
                              type: string
                              example: $43.41
                            tax:
                              type: string
                              example: '2.99'
                            tax_in_currency:
                              type: string
                              example: $2.99
                            cv:
                              type: integer
                              example: 5
                            qv:
                              type: integer
                              example: 7
                            discount_amount:
                              type: string
                              example: '10'
                            discount_amount_in_currency:
                              type: string
                              example: $10.00
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            display_to_customer:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            product_title:
                              type:
                                - string
                                - 'null'
                              example: Sample Product
                            quantity:
                              type: integer
                              example: 3
                            subscription:
                              type: boolean
                              example: true
                            enrollment:
                              type: boolean
                              example: false
                            allow_subscription:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_plan_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_plans:
                              oneOf:
                                - type: array
                                  items:
                                    title: Commerce::SubscriptionPlan
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      name:
                                        example: Test Subscription Plan
                                        type: string
                                      billing_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      billing_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      shipping_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      shipping_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      trial_period:
                                        example: 1
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      trial_period_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type:
                                          - string
                                          - 'null'
                                      split_volume:
                                        example: true
                                        type: boolean
                                        default: false
                                      max_quantity:
                                        example: 100
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      company_default:
                                        example: false
                                        type:
                                          - boolean
                                          - 'null'
                                        default: false
                                      products_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      subscribers_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      price:
                                        type: string
                                      price_in_currency:
                                        type: string
                                      subscription_start:
                                        type: string
                                      subscribe_and_save:
                                        type: string
                                      subscribe_and_save_in_currency:
                                        type: string
                                      subscribe_and_save_for_display:
                                        type: string
                                    required:
                                      - id
                                      - name
                                      - billing_interval
                                      - billing_interval_unit
                                      - shipping_interval
                                      - shipping_interval_unit
                                      - split_volume
                                      - price
                                      - price_in_currency
                                      - subscription_start
                                      - subscribe_and_save
                                      - subscribe_and_save_in_currency
                                      - subscribe_and_save_for_display
                                - type: 'null'
                            subscription_only:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_interval:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_interval_unit:
                              type:
                                - string
                                - 'null'
                              example: month
                            subscription_price:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 10.5
                            subscription_price_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $10.50
                            subscription_start:
                              type:
                                - string
                                - 'null'
                              example: '2025-02-12'
                            subscribe_and_save:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 2.99
                            subscribe_and_save_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $2.99
                            subscribe_and_save_for_display:
                              type:
                                - string
                                - 'null'
                              example: Subscribe and save $2.99
                            title:
                              type:
                                - string
                                - 'null'
                              example: Surcharge
                            product:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type: string
                                      example: Sample Product
                                    cv:
                                      type: integer
                                      example: 10
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/product.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/product.png
                                    price:
                                      type: string
                                      example: '29.99'
                                    price_in_currency:
                                      type: string
                                      example: $29.99
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    tax:
                                      type: string
                                      example: '2.99'
                                    tax_in_currency:
                                      type: string
                                      example: $2.99
                                - type: 'null'
                            variant:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: Sample Variant
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/sample.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/sample.png
                                    primary_image:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/primary.png
                                    price:
                                      type:
                                        - string
                                        - 'null'
                                      example: '34.44'
                                    price_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $34.44
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    options:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          title:
                                            type: string
                                            example: Size
                                          value:
                                            type: string
                                            example: XL
                                - type: 'null'
                            errors:
                              oneOf:
                                - type: 'null'
                                - type: array
                                  items:
                                    type: object
                                    example:
                                      country:
                                        - >-
                                          This product is not available for this
                                          country. Please change your country
                      ship_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      bill_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      shipping_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type: string
                            example: Standard Shipping
                      available_shipping_methods:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            title:
                              type: string
                              example: Standard Shipping
                            price:
                              type:
                                - number
                                - string
                              example: 5.99
                            price_label:
                              type: string
                              example: $5.99
                            delivery_time_estimate:
                              type: string
                              example: 3-5 business days
                      available_payment_methods:
                        type: array
                        items:
                          oneOf:
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - credit_card
                                name:
                                  type: string
                                  example: Credit Card
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                                apple_pay:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method supports
                                    ApplePay or not 
                                bogus_gateway:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is a Bogus
                                    instance or not.
                                tokenize_path:
                                  type:
                                    - string
                                    - 'null'
                                  description: Path to tokenize, if applicable.
                                token_provider:
                                  type: string
                                  enum:
                                    - spreedly
                                    - vgs
                                  description: >-
                                    Determines if payment tokenization is via
                                    spreedly or VGS
                                apple_pay_merchant_identifier:
                                  type:
                                    - string
                                    - 'null'
                                  example: merchant.mycompany.com
                                  description: >-
                                    If ApplePay is supported, returns the
                                    merchant identifier registered with Apple,
                                    else returns nil
                                supported_brands:
                                  type: array
                                  items:
                                    type: string
                                  example:
                                    - visa
                                    - master
                                    - american_express
                                    - discover
                              required:
                                - id
                                - type
                                - name
                                - supported_brands
                                - test
                                - sandbox
                                - apple_pay
                                - apple_pay_merchant_identifier
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - klarna
                                name:
                                  type: string
                                  example: Klarna
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                      country:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          iso:
                            type: string
                            example: US
                          name:
                            type: string
                            example: United States
                          province_required:
                            type: boolean
                            example: false
                      type:
                        type: string
                        enum:
                          - regular
                          - enrollment
                        example: regular
                      enrollment_pack_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      enrollment_pack:
                        type:
                          - object
                          - 'null'
                        properties:
                          enrollment_pack_id:
                            type: integer
                            example: 1
                          additional_volume:
                            type:
                              - integer
                              - 'null'
                            example: 10
                          description:
                            type:
                              - object
                              - 'null'
                              - string
                            properties:
                              id:
                                type: integer
                                example: 111
                              name:
                                type: string
                                example: description
                              body:
                                type: string
                                example: >-
                                  <div>Try the latest and greatest of our sugar
                                  zip packs. Guaranteed to make you skinner and
                                  cure cancer.</div>
                              record_type:
                                type: string
                                example: EnrollmentPack
                              record_id:
                                type: integer
                                example: 1
                              created_at:
                                type: string
                                format: date_time
                                example: '2025-01-16T04:22:43.809Z'
                              updated_at:
                                type: string
                                format: date_time
                                example: '2025-01-22T10:23:52.941Z'
                              locale:
                                type: string
                                example: en
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: 10
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.00
                          images:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 2
                                relateable_type:
                                  type: string
                                  example: EnrollmentPack
                                relateable_id:
                                  type: integer
                                  example: 1
                                image_url:
                                  type: string
                                  example: >-
                                    https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                image_path:
                                  type: string
                                  example: jITWaU14QGe0y5AFgY7P_00179.svg
                                position:
                                  type: integer
                                  example: 1
                                shopify_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                                created_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                updated_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                external_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 625
                                allow_subscription:
                                  type: boolean
                                  example: true
                                cv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                cv_in_currency:
                                  type: string
                                  example: $0.00
                                enrollment:
                                  type: boolean
                                  example: true
                                enrollment_pack_id:
                                  type: integer
                                  example: 1
                                price:
                                  type: string
                                  example: '11.13'
                                price_in_currency:
                                  type: string
                                  example: $11.13
                                product_title:
                                  type: string
                                  example: Zip Pack Sample Pack (30)
                                quantity:
                                  type: integer
                                  example: 1
                                qv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                qv_in_currency:
                                  type: string
                                  example: $0.00
                                subscribe_and_save:
                                  type:
                                    - string
                                    - 'null'
                                  example: '-1988.87'
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $-1,988.87
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $-1,988.87
                                subscription:
                                  type: boolean
                                  example: false
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_only:
                                  type: boolean
                                  example: false
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_price:
                                  type: string
                                  example: '2000.0'
                                subscription_price_in_currency:
                                  type: string
                                  example: $2,000.00
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                  example: '2025-02-28'
                                tax:
                                  type: string
                                  example: '0.0'
                                tax_in_currency:
                                  type: string
                                  example: $0.00
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: null
                                display_to_customer:
                                  type: boolean
                                  example: false
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          price:
                            type:
                              - string
                              - integer
                            example: 11.13
                          price_in_currency:
                            type: string
                            example: $11.13
                          subscription_price:
                            type:
                              - string
                              - integer
                            example: 2000
                          subscription_price_in_currency:
                            type: string
                            example: $2,000.00
                          title:
                            type: string
                            example: enroll product
                          token:
                            type: string
                            example: NxL22AqLRRisfyF9LqxxWRak
                      recurring:
                        oneOf:
                          - type: array
                            items:
                              type: object
                              properties:
                                subtotal:
                                  type: string
                                  example: '10.0'
                                subtotal_in_currency:
                                  type: string
                                  example: $10.0
                                interval:
                                  type: integer
                                  example: 1
                                interval_unit:
                                  type: string
                                  example: month
                                subtotal_for_display:
                                  type: string
                                  example: $10.00 every 1 month
                                start_date:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-05-27'
                          - type: 'null'
                        default:
                          - subtotal: '10.0'
                            subtotal_in_currency: $10.0
                            interval: 1
                            interval_unit: month
                            subtotal_for_display: $10.00 every 1 month
                            start_date: '2025-05-27'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      checkout_url:
                        type: string
                        example: https://checkout.fluid.com/checkout?jwt=abc123
                      shop_url:
                        type: string
                        example: https://myco.fluid.app
        '404':
          description: cart not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                      example:
                        - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '410':
          description: cart is in authorized enrollment state
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Cart is in authorized state and cannot be modified
                  errors:
                    type: object
                    example:
                      cart:
                        - is in authorized state and cannot be modified
                  meta:
                    type: object
                    properties:
                      shop_url:
                        type: string
                        example: https://example.myshopify.com
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      cart:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 123
                          state:
                            type: string
                            example: start
                          processed:
                            type: boolean
                            example: false
                            description: >-
                              Determines if a cart payment has been processed or
                              not.
                          valid_for_checkout:
                            type: boolean
                            example: true
                          buyer_rep_id:
                            type:
                              - integer
                              - 'null'
                            example: 1
                          currency_symbol:
                            type: string
                            example: $
                          currency_code:
                            type: string
                            example: USD
                          shipping_total_for_display:
                            type: string
                            example: Free
                          phone:
                            type:
                              - string
                              - 'null'
                            example: '4035551212'
                          payment_method_auto_assignable:
                            type: boolean
                            example: true
                            description: >-
                              Determines if a payment method can be
                              auto-assigned to the cart.
                          attribution:
                            oneOf:
                              - type: object
                                oneOf:
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      share_guid:
                                        type: string
                                        example: james-bond007
                                    required:
                                      - id
                                      - share_guid
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      email:
                                        type: string
                                        example: james.bond@gmail.com
                                    required:
                                      - id
                                      - email
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      username:
                                        type: string
                                        example: jaamball234
                                    required:
                                      - id
                                      - username
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      fluid_rep_id:
                                        type: integer
                                        example: 23493
                                    required:
                                      - id
                                      - fluid_rep_id
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      external_id:
                                        type:
                                          - string
                                          - 'null'
                                        example: w3sdf92
                                    required:
                                      - id
                              - type: 'null'
                            default:
                              id: 456
                              share_guid: james-bond007
                          agreements:
                            type: array
                            items:
                              type:
                                - object
                                - 'null'
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                required:
                                  type: boolean
                                  example: true
                                title:
                                  type: string
                                  example: Terms and Conditions
                                show_path:
                                  type: string
                                  example: /terms
                                enrollment_pack_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                          amount_total:
                            type: string
                            example: '121.65'
                          amount_total_in_currency:
                            type: string
                            example: $121.65 (USD)
                          sub_total:
                            type: string
                            example: '100.00'
                          sub_total_in_currency:
                            type: string
                            example: $100.00 (USD)
                          tax_total:
                            type: string
                            example: '20.00'
                          tax_total_in_currency:
                            type: string
                            example: $20.00 (USD)
                          shipping_total:
                            type: string
                            example: '1.65'
                          shipping_total_in_currency:
                            type: string
                            example: $1.65 (USD)
                          discount_total:
                            type: string
                            example: '2.99'
                          discount_total_in_currency:
                            type: string
                            example: $2.99 (USD)
                          transaction_fee:
                            type:
                              - number
                              - string
                            example: '1.90'
                          transaction_fee_in_currency:
                            type: string
                            example: $1.90 (USD)
                          cv_total:
                            type: integer
                            example: 10
                          qv_total:
                            type: integer
                            example: 15
                          company:
                            type: object
                            properties:
                              id:
                                type: integer
                              name:
                                type: string
                              primary_domain_hostname:
                                type:
                                  - string
                                  - 'null'
                                example: fluid.com
                              subdomain:
                                type:
                                  - string
                                  - 'null'
                                example: myco
                              logo_url:
                                type:
                                  - string
                                  - 'null'
                                example: https://example.com/logo.png
                              fluid_shop:
                                type:
                                  - string
                                  - 'null'
                                example: https://fluid-sample-shop.fluid.com
                              collect_phone:
                                type: boolean
                                example: true
                              require_phone:
                                type: boolean
                                example: false
                              require_billing_zip:
                                type: boolean
                                example: false
                              checkout_primary_button_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#000000'
                              checkout_primary_text_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#FFFFFF'
                              checkout_secondary_button_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#FFFFFF'
                              checkout_secondary_text_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#000000'
                          payment_method:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              cart_type:
                                type: string
                                example: credit_card
                              last_four:
                                type: string
                                example: '1234'
                              exp_month:
                                type: integer
                                example: 12
                              exp_year:
                                type: integer
                                example: 2025
                              logo_url:
                                type: string
                                example: https://example.com/image.svg
                          email:
                            type:
                              - string
                              - 'null'
                            example: user@example.com
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: '10.45'
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.45
                          discount_code:
                            type:
                              - string
                              - 'null'
                            example: DISCOUNT10
                          language_iso:
                            type:
                              - string
                              - 'null'
                            example: en
                          cart_token:
                            type: string
                            example: abc123
                          immutable_items:
                            type: boolean
                            example: false
                          digital_only:
                            type: boolean
                            example: false
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 101
                                price:
                                  type: string
                                  example: '43.41'
                                price_in_currency:
                                  type: string
                                  example: $43.41
                                tax:
                                  type: string
                                  example: '2.99'
                                tax_in_currency:
                                  type: string
                                  example: $2.99
                                cv:
                                  type: integer
                                  example: 5
                                qv:
                                  type: integer
                                  example: 7
                                discount_amount:
                                  type: string
                                  example: '10'
                                discount_amount_in_currency:
                                  type: string
                                  example: $10.00
                                enrollment_pack_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                display_to_customer:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                product_title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Sample Product
                                quantity:
                                  type: integer
                                  example: 3
                                subscription:
                                  type: boolean
                                  example: true
                                enrollment:
                                  type: boolean
                                  example: false
                                allow_subscription:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_only:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_price:
                                  type:
                                    - number
                                    - string
                                    - 'null'
                                  example: 10.5
                                subscription_price_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $10.50
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-02-12'
                                subscribe_and_save:
                                  type:
                                    - number
                                    - string
                                    - 'null'
                                  example: 2.99
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $2.99
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $2.99
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Surcharge
                                product:
                                  oneOf:
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 1
                                        title:
                                          type: string
                                          example: Sample Product
                                        cv:
                                          type: integer
                                          example: 10
                                        image_path:
                                          type:
                                            - string
                                            - 'null'
                                          example: /images/product.png
                                        image_url:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/product.png
                                        price:
                                          type: string
                                          example: '29.99'
                                        price_in_currency:
                                          type: string
                                          example: $29.99
                                        sku:
                                          type:
                                            - string
                                            - 'null'
                                          example: SKU12345
                                        tax:
                                          type: string
                                          example: '2.99'
                                        tax_in_currency:
                                          type: string
                                          example: $2.99
                                    - type: 'null'
                                variant:
                                  oneOf:
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 1
                                        title:
                                          type:
                                            - string
                                            - 'null'
                                          example: Sample Variant
                                        image_path:
                                          type:
                                            - string
                                            - 'null'
                                          example: /images/sample.png
                                        image_url:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/sample.png
                                        primary_image:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/primary.png
                                        price:
                                          type:
                                            - string
                                            - 'null'
                                          example: '34.44'
                                        price_in_currency:
                                          type:
                                            - string
                                            - 'null'
                                          example: $34.44
                                        sku:
                                          type:
                                            - string
                                            - 'null'
                                          example: SKU12345
                                        options:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              title:
                                                type: string
                                                example: Size
                                              value:
                                                type: string
                                                example: XL
                                    - type: 'null'
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          ship_to:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          bill_to:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          shipping_method:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type: string
                                example: Standard Shipping
                          available_shipping_methods:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type: string
                                  example: Standard Shipping
                                price:
                                  type:
                                    - number
                                    - string
                                  example: 5.99
                                price_label:
                                  type: string
                                  example: $5.99
                                delivery_time_estimate:
                                  type: string
                                  example: 3-5 business days
                          available_payment_methods:
                            type: array
                            items:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1337
                                    type:
                                      type: string
                                      enum:
                                        - credit_card
                                    name:
                                      type: string
                                      example: Credit Card
                                    test:
                                      type: boolean
                                      example: true
                                      description: >-
                                        Determines if payment method is test
                                        instance or not. By default, set to
                                        `true`
                                    sandbox:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is sandbox
                                        instance or not. By default, set to
                                        `false`
                                    apple_pay:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method supports
                                        ApplePay or not 
                                    bogus_gateway:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is a Bogus
                                        instance or not.
                                    tokenize_path:
                                      type:
                                        - string
                                        - 'null'
                                      description: Path to tokenize, if applicable.
                                    token_provider:
                                      type: string
                                      enum:
                                        - spreedly
                                        - vgs
                                      description: >-
                                        Determines if payment tokenization is
                                        via spreedly or VGS
                                    apple_pay_merchant_identifier:
                                      type:
                                        - string
                                        - 'null'
                                      example: merchant.mycompany.com
                                      description: >-
                                        If ApplePay is supported, returns the
                                        merchant identifier registered with
                                        Apple, else returns nil
                                    supported_brands:
                                      type: array
                                      items:
                                        type: string
                                      example:
                                        - visa
                                        - master
                                        - american_express
                                        - discover
                                  required:
                                    - id
                                    - type
                                    - name
                                    - supported_brands
                                    - test
                                    - sandbox
                                    - apple_pay
                                    - apple_pay_merchant_identifier
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1337
                                    type:
                                      type: string
                                      enum:
                                        - klarna
                                    name:
                                      type: string
                                      example: Klarna
                                    test:
                                      type: boolean
                                      example: true
                                      description: >-
                                        Determines if payment method is test
                                        instance or not. By default, set to
                                        `true`
                                    sandbox:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is sandbox
                                        instance or not. By default, set to
                                        `false`
                          country:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              iso:
                                type: string
                                example: US
                              name:
                                type: string
                                example: United States
                              province_required:
                                type: boolean
                                example: false
                          type:
                            type: string
                            enum:
                              - regular
                              - enrollment
                            example: regular
                          enrollment_pack_id:
                            type:
                              - integer
                              - 'null'
                            example: 1
                          enrollment_pack:
                            type:
                              - object
                              - 'null'
                            properties:
                              enrollment_pack_id:
                                type: integer
                                example: 1
                              additional_volume:
                                type:
                                  - integer
                                  - 'null'
                                example: 10
                              description:
                                type:
                                  - object
                                  - 'null'
                                  - string
                                properties:
                                  id:
                                    type: integer
                                    example: 111
                                  name:
                                    type: string
                                    example: description
                                  body:
                                    type: string
                                    example: >-
                                      <div>Try the latest and greatest of our
                                      sugar zip packs. Guaranteed to make you
                                      skinner and cure cancer.</div>
                                  record_type:
                                    type: string
                                    example: EnrollmentPack
                                  record_id:
                                    type: integer
                                    example: 1
                                  created_at:
                                    type: string
                                    format: date_time
                                    example: '2025-01-16T04:22:43.809Z'
                                  updated_at:
                                    type: string
                                    format: date_time
                                    example: '2025-01-22T10:23:52.941Z'
                                  locale:
                                    type: string
                                    example: en
                              enrollment_fee:
                                type:
                                  - number
                                  - string
                                example: 10
                              enrollment_fee_in_currency:
                                type: string
                                example: $10.00
                              images:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 2
                                    relateable_type:
                                      type: string
                                      example: EnrollmentPack
                                    relateable_id:
                                      type: integer
                                      example: 1
                                    image_url:
                                      type: string
                                      example: >-
                                        https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                    image_path:
                                      type: string
                                      example: jITWaU14QGe0y5AFgY7P_00179.svg
                                    position:
                                      type: integer
                                      example: 1
                                    shopify_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: null
                                    created_at:
                                      type: string
                                      format: date_time
                                      example: '2025-01-16T04:22:44.870Z'
                                    updated_at:
                                      type: string
                                      format: date_time
                                      example: '2025-01-16T04:22:44.870Z'
                                    external_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: null
                              items:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 625
                                    allow_subscription:
                                      type: boolean
                                      example: true
                                    cv:
                                      type:
                                        - number
                                        - string
                                      example: 0
                                    cv_in_currency:
                                      type: string
                                      example: $0.00
                                    enrollment:
                                      type: boolean
                                      example: true
                                    enrollment_pack_id:
                                      type: integer
                                      example: 1
                                    price:
                                      type: string
                                      example: '11.13'
                                    price_in_currency:
                                      type: string
                                      example: $11.13
                                    product_title:
                                      type: string
                                      example: Zip Pack Sample Pack (30)
                                    quantity:
                                      type: integer
                                      example: 1
                                    qv:
                                      type:
                                        - number
                                        - string
                                      example: 0
                                    qv_in_currency:
                                      type: string
                                      example: $0.00
                                    subscribe_and_save:
                                      type:
                                        - string
                                        - 'null'
                                      example: '-1988.87'
                                    subscribe_and_save_for_display:
                                      type:
                                        - string
                                        - 'null'
                                      example: Subscribe and save $-1,988.87
                                    subscribe_and_save_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $-1,988.87
                                    subscription:
                                      type: boolean
                                      example: false
                                    subscription_interval:
                                      type:
                                        - integer
                                        - 'null'
                                      example: 1
                                    subscription_interval_unit:
                                      type:
                                        - string
                                        - 'null'
                                      example: month
                                    subscription_only:
                                      type: boolean
                                      example: false
                                    subscription_plan_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: 1
                                    subscription_plans:
                                      oneOf:
                                        - type: array
                                          items:
                                            title: Commerce::SubscriptionPlan
                                            type: object
                                            properties:
                                              id:
                                                type: integer
                                              name:
                                                example: Test Subscription Plan
                                                type: string
                                              billing_interval:
                                                example: 1
                                                type: integer
                                                default: 1
                                                minimum: 1
                                              billing_interval_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type: string
                                                default: month
                                              shipping_interval:
                                                example: 1
                                                type: integer
                                                default: 1
                                                minimum: 1
                                              shipping_interval_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type: string
                                                default: month
                                              trial_period:
                                                example: 1
                                                type:
                                                  - integer
                                                  - 'null'
                                                minimum: 1
                                              trial_period_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type:
                                                  - string
                                                  - 'null'
                                              split_volume:
                                                example: true
                                                type: boolean
                                                default: false
                                              max_quantity:
                                                example: 100
                                                type:
                                                  - integer
                                                  - 'null'
                                                minimum: 1
                                              company_default:
                                                example: false
                                                type:
                                                  - boolean
                                                  - 'null'
                                                default: false
                                              products_count:
                                                example: 10
                                                type:
                                                  - integer
                                                  - 'null'
                                              subscribers_count:
                                                example: 10
                                                type:
                                                  - integer
                                                  - 'null'
                                              price:
                                                type: string
                                              price_in_currency:
                                                type: string
                                              subscription_start:
                                                type: string
                                              subscribe_and_save:
                                                type: string
                                              subscribe_and_save_in_currency:
                                                type: string
                                              subscribe_and_save_for_display:
                                                type: string
                                            required:
                                              - id
                                              - name
                                              - billing_interval
                                              - billing_interval_unit
                                              - shipping_interval
                                              - shipping_interval_unit
                                              - split_volume
                                              - price
                                              - price_in_currency
                                              - subscription_start
                                              - subscribe_and_save
                                              - subscribe_and_save_in_currency
                                              - subscribe_and_save_for_display
                                        - type: 'null'
                                    subscription_price:
                                      type: string
                                      example: '2000.0'
                                    subscription_price_in_currency:
                                      type: string
                                      example: $2,000.00
                                    subscription_start:
                                      type:
                                        - string
                                        - 'null'
                                      format: date
                                      example: '2025-02-28'
                                    tax:
                                      type: string
                                      example: '0.0'
                                    tax_in_currency:
                                      type: string
                                      example: $0.00
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: null
                                    display_to_customer:
                                      type: boolean
                                      example: false
                                    errors:
                                      oneOf:
                                        - type: 'null'
                                        - type: array
                                          items:
                                            type: object
                                            example:
                                              country:
                                                - >-
                                                  This product is not available for this
                                                  country. Please change your country
                              price:
                                type:
                                  - string
                                  - integer
                                example: 11.13
                              price_in_currency:
                                type: string
                                example: $11.13
                              subscription_price:
                                type:
                                  - string
                                  - integer
                                example: 2000
                              subscription_price_in_currency:
                                type: string
                                example: $2,000.00
                              title:
                                type: string
                                example: enroll product
                              token:
                                type: string
                                example: NxL22AqLRRisfyF9LqxxWRak
                          recurring:
                            oneOf:
                              - type: array
                                items:
                                  type: object
                                  properties:
                                    subtotal:
                                      type: string
                                      example: '10.0'
                                    subtotal_in_currency:
                                      type: string
                                      example: $10.0
                                    interval:
                                      type: integer
                                      example: 1
                                    interval_unit:
                                      type: string
                                      example: month
                                    subtotal_for_display:
                                      type: string
                                      example: $10.00 every 1 month
                                    start_date:
                                      type:
                                        - string
                                        - 'null'
                                      example: '2025-05-27'
                              - type: 'null'
                            default:
                              - subtotal: '10.0'
                                subtotal_in_currency: $10.0
                                interval: 1
                                interval_unit: month
                                subtotal_for_display: $10.00 every 1 month
                                start_date: '2025-05-27'
                required:
                  - error_message
                  - errors
                  - meta
        '422':
          description: Phone number is not valid
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    properties:
                      phone:
                        type: array
                        items:
                          type: string
                          example: is not valid
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  format: email
                phone:
                  type: string
                  example: '4035551212'
  /api/carts/{cart_token}/discount:
    post:
      summary: Applies a discount to the cart
      tags:
        - Carts
      operationId: applyDiscount
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
      responses:
        '404':
          description: discount code not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                      example:
                        - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '410':
          description: cart is in authorized enrollment state
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Cart is in authorized state and cannot be modified
                  errors:
                    type: object
                    example:
                      cart:
                        - is in authorized state and cannot be modified
                  meta:
                    type: object
                    properties:
                      shop_url:
                        type: string
                        example: https://example.myshopify.com
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      cart:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 123
                          state:
                            type: string
                            example: start
                          processed:
                            type: boolean
                            example: false
                            description: >-
                              Determines if a cart payment has been processed or
                              not.
                          valid_for_checkout:
                            type: boolean
                            example: true
                          buyer_rep_id:
                            type:
                              - integer
                              - 'null'
                            example: 1
                          currency_symbol:
                            type: string
                            example: $
                          currency_code:
                            type: string
                            example: USD
                          shipping_total_for_display:
                            type: string
                            example: Free
                          phone:
                            type:
                              - string
                              - 'null'
                            example: '4035551212'
                          payment_method_auto_assignable:
                            type: boolean
                            example: true
                            description: >-
                              Determines if a payment method can be
                              auto-assigned to the cart.
                          attribution:
                            oneOf:
                              - type: object
                                oneOf:
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      share_guid:
                                        type: string
                                        example: james-bond007
                                    required:
                                      - id
                                      - share_guid
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      email:
                                        type: string
                                        example: james.bond@gmail.com
                                    required:
                                      - id
                                      - email
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      username:
                                        type: string
                                        example: jaamball234
                                    required:
                                      - id
                                      - username
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      fluid_rep_id:
                                        type: integer
                                        example: 23493
                                    required:
                                      - id
                                      - fluid_rep_id
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      external_id:
                                        type:
                                          - string
                                          - 'null'
                                        example: w3sdf92
                                    required:
                                      - id
                              - type: 'null'
                            default:
                              id: 456
                              share_guid: james-bond007
                          agreements:
                            type: array
                            items:
                              type:
                                - object
                                - 'null'
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                required:
                                  type: boolean
                                  example: true
                                title:
                                  type: string
                                  example: Terms and Conditions
                                show_path:
                                  type: string
                                  example: /terms
                                enrollment_pack_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                          amount_total:
                            type: string
                            example: '121.65'
                          amount_total_in_currency:
                            type: string
                            example: $121.65 (USD)
                          sub_total:
                            type: string
                            example: '100.00'
                          sub_total_in_currency:
                            type: string
                            example: $100.00 (USD)
                          tax_total:
                            type: string
                            example: '20.00'
                          tax_total_in_currency:
                            type: string
                            example: $20.00 (USD)
                          shipping_total:
                            type: string
                            example: '1.65'
                          shipping_total_in_currency:
                            type: string
                            example: $1.65 (USD)
                          discount_total:
                            type: string
                            example: '2.99'
                          discount_total_in_currency:
                            type: string
                            example: $2.99 (USD)
                          transaction_fee:
                            type:
                              - number
                              - string
                            example: '1.90'
                          transaction_fee_in_currency:
                            type: string
                            example: $1.90 (USD)
                          cv_total:
                            type: integer
                            example: 10
                          qv_total:
                            type: integer
                            example: 15
                          company:
                            type: object
                            properties:
                              id:
                                type: integer
                              name:
                                type: string
                              primary_domain_hostname:
                                type:
                                  - string
                                  - 'null'
                                example: fluid.com
                              subdomain:
                                type:
                                  - string
                                  - 'null'
                                example: myco
                              logo_url:
                                type:
                                  - string
                                  - 'null'
                                example: https://example.com/logo.png
                              fluid_shop:
                                type:
                                  - string
                                  - 'null'
                                example: https://fluid-sample-shop.fluid.com
                              collect_phone:
                                type: boolean
                                example: true
                              require_phone:
                                type: boolean
                                example: false
                              require_billing_zip:
                                type: boolean
                                example: false
                              checkout_primary_button_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#000000'
                              checkout_primary_text_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#FFFFFF'
                              checkout_secondary_button_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#FFFFFF'
                              checkout_secondary_text_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#000000'
                          payment_method:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              cart_type:
                                type: string
                                example: credit_card
                              last_four:
                                type: string
                                example: '1234'
                              exp_month:
                                type: integer
                                example: 12
                              exp_year:
                                type: integer
                                example: 2025
                              logo_url:
                                type: string
                                example: https://example.com/image.svg
                          email:
                            type:
                              - string
                              - 'null'
                            example: user@example.com
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: '10.45'
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.45
                          discount_code:
                            type:
                              - string
                              - 'null'
                            example: DISCOUNT10
                          language_iso:
                            type:
                              - string
                              - 'null'
                            example: en
                          cart_token:
                            type: string
                            example: abc123
                          immutable_items:
                            type: boolean
                            example: false
                          digital_only:
                            type: boolean
                            example: false
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 101
                                price:
                                  type: string
                                  example: '43.41'
                                price_in_currency:
                                  type: string
                                  example: $43.41
                                tax:
                                  type: string
                                  example: '2.99'
                                tax_in_currency:
                                  type: string
                                  example: $2.99
                                cv:
                                  type: integer
                                  example: 5
                                qv:
                                  type: integer
                                  example: 7
                                discount_amount:
                                  type: string
                                  example: '10'
                                discount_amount_in_currency:
                                  type: string
                                  example: $10.00
                                enrollment_pack_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                display_to_customer:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                product_title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Sample Product
                                quantity:
                                  type: integer
                                  example: 3
                                subscription:
                                  type: boolean
                                  example: true
                                enrollment:
                                  type: boolean
                                  example: false
                                allow_subscription:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_only:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_price:
                                  type:
                                    - number
                                    - string
                                    - 'null'
                                  example: 10.5
                                subscription_price_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $10.50
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-02-12'
                                subscribe_and_save:
                                  type:
                                    - number
                                    - string
                                    - 'null'
                                  example: 2.99
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $2.99
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $2.99
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Surcharge
                                product:
                                  oneOf:
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 1
                                        title:
                                          type: string
                                          example: Sample Product
                                        cv:
                                          type: integer
                                          example: 10
                                        image_path:
                                          type:
                                            - string
                                            - 'null'
                                          example: /images/product.png
                                        image_url:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/product.png
                                        price:
                                          type: string
                                          example: '29.99'
                                        price_in_currency:
                                          type: string
                                          example: $29.99
                                        sku:
                                          type:
                                            - string
                                            - 'null'
                                          example: SKU12345
                                        tax:
                                          type: string
                                          example: '2.99'
                                        tax_in_currency:
                                          type: string
                                          example: $2.99
                                    - type: 'null'
                                variant:
                                  oneOf:
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 1
                                        title:
                                          type:
                                            - string
                                            - 'null'
                                          example: Sample Variant
                                        image_path:
                                          type:
                                            - string
                                            - 'null'
                                          example: /images/sample.png
                                        image_url:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/sample.png
                                        primary_image:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/primary.png
                                        price:
                                          type:
                                            - string
                                            - 'null'
                                          example: '34.44'
                                        price_in_currency:
                                          type:
                                            - string
                                            - 'null'
                                          example: $34.44
                                        sku:
                                          type:
                                            - string
                                            - 'null'
                                          example: SKU12345
                                        options:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              title:
                                                type: string
                                                example: Size
                                              value:
                                                type: string
                                                example: XL
                                    - type: 'null'
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          ship_to:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          bill_to:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          shipping_method:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type: string
                                example: Standard Shipping
                          available_shipping_methods:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type: string
                                  example: Standard Shipping
                                price:
                                  type:
                                    - number
                                    - string
                                  example: 5.99
                                price_label:
                                  type: string
                                  example: $5.99
                                delivery_time_estimate:
                                  type: string
                                  example: 3-5 business days
                          available_payment_methods:
                            type: array
                            items:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1337
                                    type:
                                      type: string
                                      enum:
                                        - credit_card
                                    name:
                                      type: string
                                      example: Credit Card
                                    test:
                                      type: boolean
                                      example: true
                                      description: >-
                                        Determines if payment method is test
                                        instance or not. By default, set to
                                        `true`
                                    sandbox:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is sandbox
                                        instance or not. By default, set to
                                        `false`
                                    apple_pay:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method supports
                                        ApplePay or not 
                                    bogus_gateway:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is a Bogus
                                        instance or not.
                                    tokenize_path:
                                      type:
                                        - string
                                        - 'null'
                                      description: Path to tokenize, if applicable.
                                    token_provider:
                                      type: string
                                      enum:
                                        - spreedly
                                        - vgs
                                      description: >-
                                        Determines if payment tokenization is
                                        via spreedly or VGS
                                    apple_pay_merchant_identifier:
                                      type:
                                        - string
                                        - 'null'
                                      example: merchant.mycompany.com
                                      description: >-
                                        If ApplePay is supported, returns the
                                        merchant identifier registered with
                                        Apple, else returns nil
                                    supported_brands:
                                      type: array
                                      items:
                                        type: string
                                      example:
                                        - visa
                                        - master
                                        - american_express
                                        - discover
                                  required:
                                    - id
                                    - type
                                    - name
                                    - supported_brands
                                    - test
                                    - sandbox
                                    - apple_pay
                                    - apple_pay_merchant_identifier
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1337
                                    type:
                                      type: string
                                      enum:
                                        - klarna
                                    name:
                                      type: string
                                      example: Klarna
                                    test:
                                      type: boolean
                                      example: true
                                      description: >-
                                        Determines if payment method is test
                                        instance or not. By default, set to
                                        `true`
                                    sandbox:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is sandbox
                                        instance or not. By default, set to
                                        `false`
                          country:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              iso:
                                type: string
                                example: US
                              name:
                                type: string
                                example: United States
                              province_required:
                                type: boolean
                                example: false
                          type:
                            type: string
                            enum:
                              - regular
                              - enrollment
                            example: regular
                          enrollment_pack_id:
                            type:
                              - integer
                              - 'null'
                            example: 1
                          enrollment_pack:
                            type:
                              - object
                              - 'null'
                            properties:
                              enrollment_pack_id:
                                type: integer
                                example: 1
                              additional_volume:
                                type:
                                  - integer
                                  - 'null'
                                example: 10
                              description:
                                type:
                                  - object
                                  - 'null'
                                  - string
                                properties:
                                  id:
                                    type: integer
                                    example: 111
                                  name:
                                    type: string
                                    example: description
                                  body:
                                    type: string
                                    example: >-
                                      <div>Try the latest and greatest of our
                                      sugar zip packs. Guaranteed to make you
                                      skinner and cure cancer.</div>
                                  record_type:
                                    type: string
                                    example: EnrollmentPack
                                  record_id:
                                    type: integer
                                    example: 1
                                  created_at:
                                    type: string
                                    format: date_time
                                    example: '2025-01-16T04:22:43.809Z'
                                  updated_at:
                                    type: string
                                    format: date_time
                                    example: '2025-01-22T10:23:52.941Z'
                                  locale:
                                    type: string
                                    example: en
                              enrollment_fee:
                                type:
                                  - number
                                  - string
                                example: 10
                              enrollment_fee_in_currency:
                                type: string
                                example: $10.00
                              images:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 2
                                    relateable_type:
                                      type: string
                                      example: EnrollmentPack
                                    relateable_id:
                                      type: integer
                                      example: 1
                                    image_url:
                                      type: string
                                      example: >-
                                        https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                    image_path:
                                      type: string
                                      example: jITWaU14QGe0y5AFgY7P_00179.svg
                                    position:
                                      type: integer
                                      example: 1
                                    shopify_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: null
                                    created_at:
                                      type: string
                                      format: date_time
                                      example: '2025-01-16T04:22:44.870Z'
                                    updated_at:
                                      type: string
                                      format: date_time
                                      example: '2025-01-16T04:22:44.870Z'
                                    external_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: null
                              items:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 625
                                    allow_subscription:
                                      type: boolean
                                      example: true
                                    cv:
                                      type:
                                        - number
                                        - string
                                      example: 0
                                    cv_in_currency:
                                      type: string
                                      example: $0.00
                                    enrollment:
                                      type: boolean
                                      example: true
                                    enrollment_pack_id:
                                      type: integer
                                      example: 1
                                    price:
                                      type: string
                                      example: '11.13'
                                    price_in_currency:
                                      type: string
                                      example: $11.13
                                    product_title:
                                      type: string
                                      example: Zip Pack Sample Pack (30)
                                    quantity:
                                      type: integer
                                      example: 1
                                    qv:
                                      type:
                                        - number
                                        - string
                                      example: 0
                                    qv_in_currency:
                                      type: string
                                      example: $0.00
                                    subscribe_and_save:
                                      type:
                                        - string
                                        - 'null'
                                      example: '-1988.87'
                                    subscribe_and_save_for_display:
                                      type:
                                        - string
                                        - 'null'
                                      example: Subscribe and save $-1,988.87
                                    subscribe_and_save_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $-1,988.87
                                    subscription:
                                      type: boolean
                                      example: false
                                    subscription_interval:
                                      type:
                                        - integer
                                        - 'null'
                                      example: 1
                                    subscription_interval_unit:
                                      type:
                                        - string
                                        - 'null'
                                      example: month
                                    subscription_only:
                                      type: boolean
                                      example: false
                                    subscription_plan_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: 1
                                    subscription_plans:
                                      oneOf:
                                        - type: array
                                          items:
                                            title: Commerce::SubscriptionPlan
                                            type: object
                                            properties:
                                              id:
                                                type: integer
                                              name:
                                                example: Test Subscription Plan
                                                type: string
                                              billing_interval:
                                                example: 1
                                                type: integer
                                                default: 1
                                                minimum: 1
                                              billing_interval_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type: string
                                                default: month
                                              shipping_interval:
                                                example: 1
                                                type: integer
                                                default: 1
                                                minimum: 1
                                              shipping_interval_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type: string
                                                default: month
                                              trial_period:
                                                example: 1
                                                type:
                                                  - integer
                                                  - 'null'
                                                minimum: 1
                                              trial_period_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type:
                                                  - string
                                                  - 'null'
                                              split_volume:
                                                example: true
                                                type: boolean
                                                default: false
                                              max_quantity:
                                                example: 100
                                                type:
                                                  - integer
                                                  - 'null'
                                                minimum: 1
                                              company_default:
                                                example: false
                                                type:
                                                  - boolean
                                                  - 'null'
                                                default: false
                                              products_count:
                                                example: 10
                                                type:
                                                  - integer
                                                  - 'null'
                                              subscribers_count:
                                                example: 10
                                                type:
                                                  - integer
                                                  - 'null'
                                              price:
                                                type: string
                                              price_in_currency:
                                                type: string
                                              subscription_start:
                                                type: string
                                              subscribe_and_save:
                                                type: string
                                              subscribe_and_save_in_currency:
                                                type: string
                                              subscribe_and_save_for_display:
                                                type: string
                                            required:
                                              - id
                                              - name
                                              - billing_interval
                                              - billing_interval_unit
                                              - shipping_interval
                                              - shipping_interval_unit
                                              - split_volume
                                              - price
                                              - price_in_currency
                                              - subscription_start
                                              - subscribe_and_save
                                              - subscribe_and_save_in_currency
                                              - subscribe_and_save_for_display
                                        - type: 'null'
                                    subscription_price:
                                      type: string
                                      example: '2000.0'
                                    subscription_price_in_currency:
                                      type: string
                                      example: $2,000.00
                                    subscription_start:
                                      type:
                                        - string
                                        - 'null'
                                      format: date
                                      example: '2025-02-28'
                                    tax:
                                      type: string
                                      example: '0.0'
                                    tax_in_currency:
                                      type: string
                                      example: $0.00
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: null
                                    display_to_customer:
                                      type: boolean
                                      example: false
                                    errors:
                                      oneOf:
                                        - type: 'null'
                                        - type: array
                                          items:
                                            type: object
                                            example:
                                              country:
                                                - >-
                                                  This product is not available for this
                                                  country. Please change your country
                              price:
                                type:
                                  - string
                                  - integer
                                example: 11.13
                              price_in_currency:
                                type: string
                                example: $11.13
                              subscription_price:
                                type:
                                  - string
                                  - integer
                                example: 2000
                              subscription_price_in_currency:
                                type: string
                                example: $2,000.00
                              title:
                                type: string
                                example: enroll product
                              token:
                                type: string
                                example: NxL22AqLRRisfyF9LqxxWRak
                          recurring:
                            oneOf:
                              - type: array
                                items:
                                  type: object
                                  properties:
                                    subtotal:
                                      type: string
                                      example: '10.0'
                                    subtotal_in_currency:
                                      type: string
                                      example: $10.0
                                    interval:
                                      type: integer
                                      example: 1
                                    interval_unit:
                                      type: string
                                      example: month
                                    subtotal_for_display:
                                      type: string
                                      example: $10.00 every 1 month
                                    start_date:
                                      type:
                                        - string
                                        - 'null'
                                      example: '2025-05-27'
                              - type: 'null'
                            default:
                              - subtotal: '10.0'
                                subtotal_in_currency: $10.0
                                interval: 1
                                interval_unit: month
                                subtotal_for_display: $10.00 every 1 month
                                start_date: '2025-05-27'
                required:
                  - error_message
                  - errors
                  - meta
        '422':
          description: discount code already applied
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    properties:
                      coupon_code:
                        type: array
                        items:
                          type: string
                          example: already applied
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                discount_code:
                  type: string
  /api/carts/{cart_token}/discount/{discount_code}:
    delete:
      summary: Remove discount from the cart
      tags:
        - Carts
      operationId: removeDiscount
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
        - name: discount_code
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: discount removed
          content:
            application/json:
              schema:
                type: object
                properties:
                  cart:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123
                      state:
                        type: string
                        example: start
                      processed:
                        type: boolean
                        example: false
                        description: >-
                          Determines if a cart payment has been processed or
                          not.
                      valid_for_checkout:
                        type: boolean
                        example: true
                      buyer_rep_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      currency_symbol:
                        type: string
                        example: $
                      currency_code:
                        type: string
                        example: USD
                      shipping_total_for_display:
                        type: string
                        example: Free
                      phone:
                        type:
                          - string
                          - 'null'
                        example: '4035551212'
                      payment_method_auto_assignable:
                        type: boolean
                        example: true
                        description: >-
                          Determines if a payment method can be auto-assigned to
                          the cart.
                      attribution:
                        oneOf:
                          - type: object
                            oneOf:
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  share_guid:
                                    type: string
                                    example: james-bond007
                                required:
                                  - id
                                  - share_guid
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  email:
                                    type: string
                                    example: james.bond@gmail.com
                                required:
                                  - id
                                  - email
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  username:
                                    type: string
                                    example: jaamball234
                                required:
                                  - id
                                  - username
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  fluid_rep_id:
                                    type: integer
                                    example: 23493
                                required:
                                  - id
                                  - fluid_rep_id
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  external_id:
                                    type:
                                      - string
                                      - 'null'
                                    example: w3sdf92
                                required:
                                  - id
                          - type: 'null'
                        default:
                          id: 456
                          share_guid: james-bond007
                      agreements:
                        type: array
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                              example: 1
                            required:
                              type: boolean
                              example: true
                            title:
                              type: string
                              example: Terms and Conditions
                            show_path:
                              type: string
                              example: /terms
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                      amount_total:
                        type: string
                        example: '121.65'
                      amount_total_in_currency:
                        type: string
                        example: $121.65 (USD)
                      sub_total:
                        type: string
                        example: '100.00'
                      sub_total_in_currency:
                        type: string
                        example: $100.00 (USD)
                      tax_total:
                        type: string
                        example: '20.00'
                      tax_total_in_currency:
                        type: string
                        example: $20.00 (USD)
                      shipping_total:
                        type: string
                        example: '1.65'
                      shipping_total_in_currency:
                        type: string
                        example: $1.65 (USD)
                      discount_total:
                        type: string
                        example: '2.99'
                      discount_total_in_currency:
                        type: string
                        example: $2.99 (USD)
                      transaction_fee:
                        type:
                          - number
                          - string
                        example: '1.90'
                      transaction_fee_in_currency:
                        type: string
                        example: $1.90 (USD)
                      cv_total:
                        type: integer
                        example: 10
                      qv_total:
                        type: integer
                        example: 15
                      company:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          primary_domain_hostname:
                            type:
                              - string
                              - 'null'
                            example: fluid.com
                          subdomain:
                            type:
                              - string
                              - 'null'
                            example: myco
                          logo_url:
                            type:
                              - string
                              - 'null'
                            example: https://example.com/logo.png
                          fluid_shop:
                            type:
                              - string
                              - 'null'
                            example: https://fluid-sample-shop.fluid.com
                          collect_phone:
                            type: boolean
                            example: true
                          require_phone:
                            type: boolean
                            example: false
                          require_billing_zip:
                            type: boolean
                            example: false
                          checkout_primary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                          checkout_primary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                      payment_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          cart_type:
                            type: string
                            example: credit_card
                          last_four:
                            type: string
                            example: '1234'
                          exp_month:
                            type: integer
                            example: 12
                          exp_year:
                            type: integer
                            example: 2025
                          logo_url:
                            type: string
                            example: https://example.com/image.svg
                      email:
                        type:
                          - string
                          - 'null'
                        example: user@example.com
                      enrollment_fee:
                        type:
                          - number
                          - string
                        example: '10.45'
                      enrollment_fee_in_currency:
                        type: string
                        example: $10.45
                      discount_code:
                        type:
                          - string
                          - 'null'
                        example: DISCOUNT10
                      language_iso:
                        type:
                          - string
                          - 'null'
                        example: en
                      cart_token:
                        type: string
                        example: abc123
                      immutable_items:
                        type: boolean
                        example: false
                      digital_only:
                        type: boolean
                        example: false
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 101
                            price:
                              type: string
                              example: '43.41'
                            price_in_currency:
                              type: string
                              example: $43.41
                            tax:
                              type: string
                              example: '2.99'
                            tax_in_currency:
                              type: string
                              example: $2.99
                            cv:
                              type: integer
                              example: 5
                            qv:
                              type: integer
                              example: 7
                            discount_amount:
                              type: string
                              example: '10'
                            discount_amount_in_currency:
                              type: string
                              example: $10.00
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            display_to_customer:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            product_title:
                              type:
                                - string
                                - 'null'
                              example: Sample Product
                            quantity:
                              type: integer
                              example: 3
                            subscription:
                              type: boolean
                              example: true
                            enrollment:
                              type: boolean
                              example: false
                            allow_subscription:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_plan_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_plans:
                              oneOf:
                                - type: array
                                  items:
                                    title: Commerce::SubscriptionPlan
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      name:
                                        example: Test Subscription Plan
                                        type: string
                                      billing_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      billing_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      shipping_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      shipping_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      trial_period:
                                        example: 1
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      trial_period_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type:
                                          - string
                                          - 'null'
                                      split_volume:
                                        example: true
                                        type: boolean
                                        default: false
                                      max_quantity:
                                        example: 100
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      company_default:
                                        example: false
                                        type:
                                          - boolean
                                          - 'null'
                                        default: false
                                      products_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      subscribers_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      price:
                                        type: string
                                      price_in_currency:
                                        type: string
                                      subscription_start:
                                        type: string
                                      subscribe_and_save:
                                        type: string
                                      subscribe_and_save_in_currency:
                                        type: string
                                      subscribe_and_save_for_display:
                                        type: string
                                    required:
                                      - id
                                      - name
                                      - billing_interval
                                      - billing_interval_unit
                                      - shipping_interval
                                      - shipping_interval_unit
                                      - split_volume
                                      - price
                                      - price_in_currency
                                      - subscription_start
                                      - subscribe_and_save
                                      - subscribe_and_save_in_currency
                                      - subscribe_and_save_for_display
                                - type: 'null'
                            subscription_only:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_interval:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_interval_unit:
                              type:
                                - string
                                - 'null'
                              example: month
                            subscription_price:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 10.5
                            subscription_price_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $10.50
                            subscription_start:
                              type:
                                - string
                                - 'null'
                              example: '2025-02-12'
                            subscribe_and_save:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 2.99
                            subscribe_and_save_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $2.99
                            subscribe_and_save_for_display:
                              type:
                                - string
                                - 'null'
                              example: Subscribe and save $2.99
                            title:
                              type:
                                - string
                                - 'null'
                              example: Surcharge
                            product:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type: string
                                      example: Sample Product
                                    cv:
                                      type: integer
                                      example: 10
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/product.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/product.png
                                    price:
                                      type: string
                                      example: '29.99'
                                    price_in_currency:
                                      type: string
                                      example: $29.99
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    tax:
                                      type: string
                                      example: '2.99'
                                    tax_in_currency:
                                      type: string
                                      example: $2.99
                                - type: 'null'
                            variant:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: Sample Variant
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/sample.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/sample.png
                                    primary_image:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/primary.png
                                    price:
                                      type:
                                        - string
                                        - 'null'
                                      example: '34.44'
                                    price_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $34.44
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    options:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          title:
                                            type: string
                                            example: Size
                                          value:
                                            type: string
                                            example: XL
                                - type: 'null'
                            errors:
                              oneOf:
                                - type: 'null'
                                - type: array
                                  items:
                                    type: object
                                    example:
                                      country:
                                        - >-
                                          This product is not available for this
                                          country. Please change your country
                      ship_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      bill_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      shipping_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type: string
                            example: Standard Shipping
                      available_shipping_methods:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            title:
                              type: string
                              example: Standard Shipping
                            price:
                              type:
                                - number
                                - string
                              example: 5.99
                            price_label:
                              type: string
                              example: $5.99
                            delivery_time_estimate:
                              type: string
                              example: 3-5 business days
                      available_payment_methods:
                        type: array
                        items:
                          oneOf:
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - credit_card
                                name:
                                  type: string
                                  example: Credit Card
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                                apple_pay:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method supports
                                    ApplePay or not 
                                bogus_gateway:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is a Bogus
                                    instance or not.
                                tokenize_path:
                                  type:
                                    - string
                                    - 'null'
                                  description: Path to tokenize, if applicable.
                                token_provider:
                                  type: string
                                  enum:
                                    - spreedly
                                    - vgs
                                  description: >-
                                    Determines if payment tokenization is via
                                    spreedly or VGS
                                apple_pay_merchant_identifier:
                                  type:
                                    - string
                                    - 'null'
                                  example: merchant.mycompany.com
                                  description: >-
                                    If ApplePay is supported, returns the
                                    merchant identifier registered with Apple,
                                    else returns nil
                                supported_brands:
                                  type: array
                                  items:
                                    type: string
                                  example:
                                    - visa
                                    - master
                                    - american_express
                                    - discover
                              required:
                                - id
                                - type
                                - name
                                - supported_brands
                                - test
                                - sandbox
                                - apple_pay
                                - apple_pay_merchant_identifier
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - klarna
                                name:
                                  type: string
                                  example: Klarna
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                      country:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          iso:
                            type: string
                            example: US
                          name:
                            type: string
                            example: United States
                          province_required:
                            type: boolean
                            example: false
                      type:
                        type: string
                        enum:
                          - regular
                          - enrollment
                        example: regular
                      enrollment_pack_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      enrollment_pack:
                        type:
                          - object
                          - 'null'
                        properties:
                          enrollment_pack_id:
                            type: integer
                            example: 1
                          additional_volume:
                            type:
                              - integer
                              - 'null'
                            example: 10
                          description:
                            type:
                              - object
                              - 'null'
                              - string
                            properties:
                              id:
                                type: integer
                                example: 111
                              name:
                                type: string
                                example: description
                              body:
                                type: string
                                example: >-
                                  <div>Try the latest and greatest of our sugar
                                  zip packs. Guaranteed to make you skinner and
                                  cure cancer.</div>
                              record_type:
                                type: string
                                example: EnrollmentPack
                              record_id:
                                type: integer
                                example: 1
                              created_at:
                                type: string
                                format: date_time
                                example: '2025-01-16T04:22:43.809Z'
                              updated_at:
                                type: string
                                format: date_time
                                example: '2025-01-22T10:23:52.941Z'
                              locale:
                                type: string
                                example: en
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: 10
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.00
                          images:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 2
                                relateable_type:
                                  type: string
                                  example: EnrollmentPack
                                relateable_id:
                                  type: integer
                                  example: 1
                                image_url:
                                  type: string
                                  example: >-
                                    https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                image_path:
                                  type: string
                                  example: jITWaU14QGe0y5AFgY7P_00179.svg
                                position:
                                  type: integer
                                  example: 1
                                shopify_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                                created_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                updated_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                external_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 625
                                allow_subscription:
                                  type: boolean
                                  example: true
                                cv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                cv_in_currency:
                                  type: string
                                  example: $0.00
                                enrollment:
                                  type: boolean
                                  example: true
                                enrollment_pack_id:
                                  type: integer
                                  example: 1
                                price:
                                  type: string
                                  example: '11.13'
                                price_in_currency:
                                  type: string
                                  example: $11.13
                                product_title:
                                  type: string
                                  example: Zip Pack Sample Pack (30)
                                quantity:
                                  type: integer
                                  example: 1
                                qv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                qv_in_currency:
                                  type: string
                                  example: $0.00
                                subscribe_and_save:
                                  type:
                                    - string
                                    - 'null'
                                  example: '-1988.87'
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $-1,988.87
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $-1,988.87
                                subscription:
                                  type: boolean
                                  example: false
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_only:
                                  type: boolean
                                  example: false
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_price:
                                  type: string
                                  example: '2000.0'
                                subscription_price_in_currency:
                                  type: string
                                  example: $2,000.00
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                  example: '2025-02-28'
                                tax:
                                  type: string
                                  example: '0.0'
                                tax_in_currency:
                                  type: string
                                  example: $0.00
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: null
                                display_to_customer:
                                  type: boolean
                                  example: false
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          price:
                            type:
                              - string
                              - integer
                            example: 11.13
                          price_in_currency:
                            type: string
                            example: $11.13
                          subscription_price:
                            type:
                              - string
                              - integer
                            example: 2000
                          subscription_price_in_currency:
                            type: string
                            example: $2,000.00
                          title:
                            type: string
                            example: enroll product
                          token:
                            type: string
                            example: NxL22AqLRRisfyF9LqxxWRak
                      recurring:
                        oneOf:
                          - type: array
                            items:
                              type: object
                              properties:
                                subtotal:
                                  type: string
                                  example: '10.0'
                                subtotal_in_currency:
                                  type: string
                                  example: $10.0
                                interval:
                                  type: integer
                                  example: 1
                                interval_unit:
                                  type: string
                                  example: month
                                subtotal_for_display:
                                  type: string
                                  example: $10.00 every 1 month
                                start_date:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-05-27'
                          - type: 'null'
                        default:
                          - subtotal: '10.0'
                            subtotal_in_currency: $10.0
                            interval: 1
                            interval_unit: month
                            subtotal_for_display: $10.00 every 1 month
                            start_date: '2025-05-27'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      checkout_url:
                        type: string
                        example: https://checkout.fluid.com/checkout?jwt=abc123
                      shop_url:
                        type: string
                        example: https://myco.fluid.app
        '404':
          description: discount code not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                      example:
                        - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
  /api/carts/{cart_token}/items:
    post:
      summary: Adds items to cart
      tags:
        - Carts
      operationId: addCartItems
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: item does not remove enrollment_pack_id if edited
          content:
            application/json:
              schema:
                type: object
                properties:
                  cart:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123
                      state:
                        type: string
                        example: start
                      processed:
                        type: boolean
                        example: false
                        description: >-
                          Determines if a cart payment has been processed or
                          not.
                      valid_for_checkout:
                        type: boolean
                        example: true
                      buyer_rep_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      currency_symbol:
                        type: string
                        example: $
                      currency_code:
                        type: string
                        example: USD
                      shipping_total_for_display:
                        type: string
                        example: Free
                      phone:
                        type:
                          - string
                          - 'null'
                        example: '4035551212'
                      payment_method_auto_assignable:
                        type: boolean
                        example: true
                        description: >-
                          Determines if a payment method can be auto-assigned to
                          the cart.
                      attribution:
                        oneOf:
                          - type: object
                            oneOf:
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  share_guid:
                                    type: string
                                    example: james-bond007
                                required:
                                  - id
                                  - share_guid
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  email:
                                    type: string
                                    example: james.bond@gmail.com
                                required:
                                  - id
                                  - email
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  username:
                                    type: string
                                    example: jaamball234
                                required:
                                  - id
                                  - username
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  fluid_rep_id:
                                    type: integer
                                    example: 23493
                                required:
                                  - id
                                  - fluid_rep_id
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  external_id:
                                    type:
                                      - string
                                      - 'null'
                                    example: w3sdf92
                                required:
                                  - id
                          - type: 'null'
                        default:
                          id: 456
                          share_guid: james-bond007
                      agreements:
                        type: array
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                              example: 1
                            required:
                              type: boolean
                              example: true
                            title:
                              type: string
                              example: Terms and Conditions
                            show_path:
                              type: string
                              example: /terms
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                      amount_total:
                        type: string
                        example: '121.65'
                      amount_total_in_currency:
                        type: string
                        example: $121.65 (USD)
                      sub_total:
                        type: string
                        example: '100.00'
                      sub_total_in_currency:
                        type: string
                        example: $100.00 (USD)
                      tax_total:
                        type: string
                        example: '20.00'
                      tax_total_in_currency:
                        type: string
                        example: $20.00 (USD)
                      shipping_total:
                        type: string
                        example: '1.65'
                      shipping_total_in_currency:
                        type: string
                        example: $1.65 (USD)
                      discount_total:
                        type: string
                        example: '2.99'
                      discount_total_in_currency:
                        type: string
                        example: $2.99 (USD)
                      transaction_fee:
                        type:
                          - number
                          - string
                        example: '1.90'
                      transaction_fee_in_currency:
                        type: string
                        example: $1.90 (USD)
                      cv_total:
                        type: integer
                        example: 10
                      qv_total:
                        type: integer
                        example: 15
                      company:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          primary_domain_hostname:
                            type:
                              - string
                              - 'null'
                            example: fluid.com
                          subdomain:
                            type:
                              - string
                              - 'null'
                            example: myco
                          logo_url:
                            type:
                              - string
                              - 'null'
                            example: https://example.com/logo.png
                          fluid_shop:
                            type:
                              - string
                              - 'null'
                            example: https://fluid-sample-shop.fluid.com
                          collect_phone:
                            type: boolean
                            example: true
                          require_phone:
                            type: boolean
                            example: false
                          require_billing_zip:
                            type: boolean
                            example: false
                          checkout_primary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                          checkout_primary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                      payment_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          cart_type:
                            type: string
                            example: credit_card
                          last_four:
                            type: string
                            example: '1234'
                          exp_month:
                            type: integer
                            example: 12
                          exp_year:
                            type: integer
                            example: 2025
                          logo_url:
                            type: string
                            example: https://example.com/image.svg
                      email:
                        type:
                          - string
                          - 'null'
                        example: user@example.com
                      enrollment_fee:
                        type:
                          - number
                          - string
                        example: '10.45'
                      enrollment_fee_in_currency:
                        type: string
                        example: $10.45
                      discount_code:
                        type:
                          - string
                          - 'null'
                        example: DISCOUNT10
                      language_iso:
                        type:
                          - string
                          - 'null'
                        example: en
                      cart_token:
                        type: string
                        example: abc123
                      immutable_items:
                        type: boolean
                        example: false
                      digital_only:
                        type: boolean
                        example: false
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 101
                            price:
                              type: string
                              example: '43.41'
                            price_in_currency:
                              type: string
                              example: $43.41
                            tax:
                              type: string
                              example: '2.99'
                            tax_in_currency:
                              type: string
                              example: $2.99
                            cv:
                              type: integer
                              example: 5
                            qv:
                              type: integer
                              example: 7
                            discount_amount:
                              type: string
                              example: '10'
                            discount_amount_in_currency:
                              type: string
                              example: $10.00
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            display_to_customer:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            product_title:
                              type:
                                - string
                                - 'null'
                              example: Sample Product
                            quantity:
                              type: integer
                              example: 3
                            subscription:
                              type: boolean
                              example: true
                            enrollment:
                              type: boolean
                              example: false
                            allow_subscription:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_plan_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_plans:
                              oneOf:
                                - type: array
                                  items:
                                    title: Commerce::SubscriptionPlan
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      name:
                                        example: Test Subscription Plan
                                        type: string
                                      billing_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      billing_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      shipping_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      shipping_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      trial_period:
                                        example: 1
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      trial_period_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type:
                                          - string
                                          - 'null'
                                      split_volume:
                                        example: true
                                        type: boolean
                                        default: false
                                      max_quantity:
                                        example: 100
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      company_default:
                                        example: false
                                        type:
                                          - boolean
                                          - 'null'
                                        default: false
                                      products_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      subscribers_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      price:
                                        type: string
                                      price_in_currency:
                                        type: string
                                      subscription_start:
                                        type: string
                                      subscribe_and_save:
                                        type: string
                                      subscribe_and_save_in_currency:
                                        type: string
                                      subscribe_and_save_for_display:
                                        type: string
                                    required:
                                      - id
                                      - name
                                      - billing_interval
                                      - billing_interval_unit
                                      - shipping_interval
                                      - shipping_interval_unit
                                      - split_volume
                                      - price
                                      - price_in_currency
                                      - subscription_start
                                      - subscribe_and_save
                                      - subscribe_and_save_in_currency
                                      - subscribe_and_save_for_display
                                - type: 'null'
                            subscription_only:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_interval:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_interval_unit:
                              type:
                                - string
                                - 'null'
                              example: month
                            subscription_price:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 10.5
                            subscription_price_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $10.50
                            subscription_start:
                              type:
                                - string
                                - 'null'
                              example: '2025-02-12'
                            subscribe_and_save:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 2.99
                            subscribe_and_save_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $2.99
                            subscribe_and_save_for_display:
                              type:
                                - string
                                - 'null'
                              example: Subscribe and save $2.99
                            title:
                              type:
                                - string
                                - 'null'
                              example: Surcharge
                            product:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type: string
                                      example: Sample Product
                                    cv:
                                      type: integer
                                      example: 10
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/product.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/product.png
                                    price:
                                      type: string
                                      example: '29.99'
                                    price_in_currency:
                                      type: string
                                      example: $29.99
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    tax:
                                      type: string
                                      example: '2.99'
                                    tax_in_currency:
                                      type: string
                                      example: $2.99
                                - type: 'null'
                            variant:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: Sample Variant
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/sample.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/sample.png
                                    primary_image:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/primary.png
                                    price:
                                      type:
                                        - string
                                        - 'null'
                                      example: '34.44'
                                    price_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $34.44
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    options:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          title:
                                            type: string
                                            example: Size
                                          value:
                                            type: string
                                            example: XL
                                - type: 'null'
                            errors:
                              oneOf:
                                - type: 'null'
                                - type: array
                                  items:
                                    type: object
                                    example:
                                      country:
                                        - >-
                                          This product is not available for this
                                          country. Please change your country
                      ship_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      bill_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      shipping_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type: string
                            example: Standard Shipping
                      available_shipping_methods:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            title:
                              type: string
                              example: Standard Shipping
                            price:
                              type:
                                - number
                                - string
                              example: 5.99
                            price_label:
                              type: string
                              example: $5.99
                            delivery_time_estimate:
                              type: string
                              example: 3-5 business days
                      available_payment_methods:
                        type: array
                        items:
                          oneOf:
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - credit_card
                                name:
                                  type: string
                                  example: Credit Card
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                                apple_pay:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method supports
                                    ApplePay or not 
                                bogus_gateway:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is a Bogus
                                    instance or not.
                                tokenize_path:
                                  type:
                                    - string
                                    - 'null'
                                  description: Path to tokenize, if applicable.
                                token_provider:
                                  type: string
                                  enum:
                                    - spreedly
                                    - vgs
                                  description: >-
                                    Determines if payment tokenization is via
                                    spreedly or VGS
                                apple_pay_merchant_identifier:
                                  type:
                                    - string
                                    - 'null'
                                  example: merchant.mycompany.com
                                  description: >-
                                    If ApplePay is supported, returns the
                                    merchant identifier registered with Apple,
                                    else returns nil
                                supported_brands:
                                  type: array
                                  items:
                                    type: string
                                  example:
                                    - visa
                                    - master
                                    - american_express
                                    - discover
                              required:
                                - id
                                - type
                                - name
                                - supported_brands
                                - test
                                - sandbox
                                - apple_pay
                                - apple_pay_merchant_identifier
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - klarna
                                name:
                                  type: string
                                  example: Klarna
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                      country:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          iso:
                            type: string
                            example: US
                          name:
                            type: string
                            example: United States
                          province_required:
                            type: boolean
                            example: false
                      type:
                        type: string
                        enum:
                          - regular
                          - enrollment
                        example: regular
                      enrollment_pack_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      enrollment_pack:
                        type:
                          - object
                          - 'null'
                        properties:
                          enrollment_pack_id:
                            type: integer
                            example: 1
                          additional_volume:
                            type:
                              - integer
                              - 'null'
                            example: 10
                          description:
                            type:
                              - object
                              - 'null'
                              - string
                            properties:
                              id:
                                type: integer
                                example: 111
                              name:
                                type: string
                                example: description
                              body:
                                type: string
                                example: >-
                                  <div>Try the latest and greatest of our sugar
                                  zip packs. Guaranteed to make you skinner and
                                  cure cancer.</div>
                              record_type:
                                type: string
                                example: EnrollmentPack
                              record_id:
                                type: integer
                                example: 1
                              created_at:
                                type: string
                                format: date_time
                                example: '2025-01-16T04:22:43.809Z'
                              updated_at:
                                type: string
                                format: date_time
                                example: '2025-01-22T10:23:52.941Z'
                              locale:
                                type: string
                                example: en
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: 10
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.00
                          images:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 2
                                relateable_type:
                                  type: string
                                  example: EnrollmentPack
                                relateable_id:
                                  type: integer
                                  example: 1
                                image_url:
                                  type: string
                                  example: >-
                                    https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                image_path:
                                  type: string
                                  example: jITWaU14QGe0y5AFgY7P_00179.svg
                                position:
                                  type: integer
                                  example: 1
                                shopify_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                                created_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                updated_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                external_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 625
                                allow_subscription:
                                  type: boolean
                                  example: true
                                cv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                cv_in_currency:
                                  type: string
                                  example: $0.00
                                enrollment:
                                  type: boolean
                                  example: true
                                enrollment_pack_id:
                                  type: integer
                                  example: 1
                                price:
                                  type: string
                                  example: '11.13'
                                price_in_currency:
                                  type: string
                                  example: $11.13
                                product_title:
                                  type: string
                                  example: Zip Pack Sample Pack (30)
                                quantity:
                                  type: integer
                                  example: 1
                                qv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                qv_in_currency:
                                  type: string
                                  example: $0.00
                                subscribe_and_save:
                                  type:
                                    - string
                                    - 'null'
                                  example: '-1988.87'
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $-1,988.87
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $-1,988.87
                                subscription:
                                  type: boolean
                                  example: false
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_only:
                                  type: boolean
                                  example: false
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_price:
                                  type: string
                                  example: '2000.0'
                                subscription_price_in_currency:
                                  type: string
                                  example: $2,000.00
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                  example: '2025-02-28'
                                tax:
                                  type: string
                                  example: '0.0'
                                tax_in_currency:
                                  type: string
                                  example: $0.00
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: null
                                display_to_customer:
                                  type: boolean
                                  example: false
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          price:
                            type:
                              - string
                              - integer
                            example: 11.13
                          price_in_currency:
                            type: string
                            example: $11.13
                          subscription_price:
                            type:
                              - string
                              - integer
                            example: 2000
                          subscription_price_in_currency:
                            type: string
                            example: $2,000.00
                          title:
                            type: string
                            example: enroll product
                          token:
                            type: string
                            example: NxL22AqLRRisfyF9LqxxWRak
                      recurring:
                        oneOf:
                          - type: array
                            items:
                              type: object
                              properties:
                                subtotal:
                                  type: string
                                  example: '10.0'
                                subtotal_in_currency:
                                  type: string
                                  example: $10.0
                                interval:
                                  type: integer
                                  example: 1
                                interval_unit:
                                  type: string
                                  example: month
                                subtotal_for_display:
                                  type: string
                                  example: $10.00 every 1 month
                                start_date:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-05-27'
                          - type: 'null'
                        default:
                          - subtotal: '10.0'
                            subtotal_in_currency: $10.0
                            interval: 1
                            interval_unit: month
                            subtotal_for_display: $10.00 every 1 month
                            start_date: '2025-05-27'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      checkout_url:
                        type: string
                        example: https://checkout.fluid.com/checkout?jwt=abc123
                      shop_url:
                        type: string
                        example: https://myco.fluid.app
        '400':
          description: no cart items specified
        '410':
          description: cart is in authorized enrollment state
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Cart is in authorized state and cannot be modified
                  errors:
                    type: object
                    example:
                      cart:
                        - is in authorized state and cannot be modified
                  meta:
                    type: object
                    properties:
                      shop_url:
                        type: string
                        example: https://example.myshopify.com
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      cart:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 123
                          state:
                            type: string
                            example: start
                          processed:
                            type: boolean
                            example: false
                            description: >-
                              Determines if a cart payment has been processed or
                              not.
                          valid_for_checkout:
                            type: boolean
                            example: true
                          buyer_rep_id:
                            type:
                              - integer
                              - 'null'
                            example: 1
                          currency_symbol:
                            type: string
                            example: $
                          currency_code:
                            type: string
                            example: USD
                          shipping_total_for_display:
                            type: string
                            example: Free
                          phone:
                            type:
                              - string
                              - 'null'
                            example: '4035551212'
                          payment_method_auto_assignable:
                            type: boolean
                            example: true
                            description: >-
                              Determines if a payment method can be
                              auto-assigned to the cart.
                          attribution:
                            oneOf:
                              - type: object
                                oneOf:
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      share_guid:
                                        type: string
                                        example: james-bond007
                                    required:
                                      - id
                                      - share_guid
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      email:
                                        type: string
                                        example: james.bond@gmail.com
                                    required:
                                      - id
                                      - email
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      username:
                                        type: string
                                        example: jaamball234
                                    required:
                                      - id
                                      - username
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      fluid_rep_id:
                                        type: integer
                                        example: 23493
                                    required:
                                      - id
                                      - fluid_rep_id
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      external_id:
                                        type:
                                          - string
                                          - 'null'
                                        example: w3sdf92
                                    required:
                                      - id
                              - type: 'null'
                            default:
                              id: 456
                              share_guid: james-bond007
                          agreements:
                            type: array
                            items:
                              type:
                                - object
                                - 'null'
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                required:
                                  type: boolean
                                  example: true
                                title:
                                  type: string
                                  example: Terms and Conditions
                                show_path:
                                  type: string
                                  example: /terms
                                enrollment_pack_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                          amount_total:
                            type: string
                            example: '121.65'
                          amount_total_in_currency:
                            type: string
                            example: $121.65 (USD)
                          sub_total:
                            type: string
                            example: '100.00'
                          sub_total_in_currency:
                            type: string
                            example: $100.00 (USD)
                          tax_total:
                            type: string
                            example: '20.00'
                          tax_total_in_currency:
                            type: string
                            example: $20.00 (USD)
                          shipping_total:
                            type: string
                            example: '1.65'
                          shipping_total_in_currency:
                            type: string
                            example: $1.65 (USD)
                          discount_total:
                            type: string
                            example: '2.99'
                          discount_total_in_currency:
                            type: string
                            example: $2.99 (USD)
                          transaction_fee:
                            type:
                              - number
                              - string
                            example: '1.90'
                          transaction_fee_in_currency:
                            type: string
                            example: $1.90 (USD)
                          cv_total:
                            type: integer
                            example: 10
                          qv_total:
                            type: integer
                            example: 15
                          company:
                            type: object
                            properties:
                              id:
                                type: integer
                              name:
                                type: string
                              primary_domain_hostname:
                                type:
                                  - string
                                  - 'null'
                                example: fluid.com
                              subdomain:
                                type:
                                  - string
                                  - 'null'
                                example: myco
                              logo_url:
                                type:
                                  - string
                                  - 'null'
                                example: https://example.com/logo.png
                              fluid_shop:
                                type:
                                  - string
                                  - 'null'
                                example: https://fluid-sample-shop.fluid.com
                              collect_phone:
                                type: boolean
                                example: true
                              require_phone:
                                type: boolean
                                example: false
                              require_billing_zip:
                                type: boolean
                                example: false
                              checkout_primary_button_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#000000'
                              checkout_primary_text_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#FFFFFF'
                              checkout_secondary_button_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#FFFFFF'
                              checkout_secondary_text_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#000000'
                          payment_method:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              cart_type:
                                type: string
                                example: credit_card
                              last_four:
                                type: string
                                example: '1234'
                              exp_month:
                                type: integer
                                example: 12
                              exp_year:
                                type: integer
                                example: 2025
                              logo_url:
                                type: string
                                example: https://example.com/image.svg
                          email:
                            type:
                              - string
                              - 'null'
                            example: user@example.com
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: '10.45'
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.45
                          discount_code:
                            type:
                              - string
                              - 'null'
                            example: DISCOUNT10
                          language_iso:
                            type:
                              - string
                              - 'null'
                            example: en
                          cart_token:
                            type: string
                            example: abc123
                          immutable_items:
                            type: boolean
                            example: false
                          digital_only:
                            type: boolean
                            example: false
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 101
                                price:
                                  type: string
                                  example: '43.41'
                                price_in_currency:
                                  type: string
                                  example: $43.41
                                tax:
                                  type: string
                                  example: '2.99'
                                tax_in_currency:
                                  type: string
                                  example: $2.99
                                cv:
                                  type: integer
                                  example: 5
                                qv:
                                  type: integer
                                  example: 7
                                discount_amount:
                                  type: string
                                  example: '10'
                                discount_amount_in_currency:
                                  type: string
                                  example: $10.00
                                enrollment_pack_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                display_to_customer:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                product_title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Sample Product
                                quantity:
                                  type: integer
                                  example: 3
                                subscription:
                                  type: boolean
                                  example: true
                                enrollment:
                                  type: boolean
                                  example: false
                                allow_subscription:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_only:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_price:
                                  type:
                                    - number
                                    - string
                                    - 'null'
                                  example: 10.5
                                subscription_price_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $10.50
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-02-12'
                                subscribe_and_save:
                                  type:
                                    - number
                                    - string
                                    - 'null'
                                  example: 2.99
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $2.99
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $2.99
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Surcharge
                                product:
                                  oneOf:
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 1
                                        title:
                                          type: string
                                          example: Sample Product
                                        cv:
                                          type: integer
                                          example: 10
                                        image_path:
                                          type:
                                            - string
                                            - 'null'
                                          example: /images/product.png
                                        image_url:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/product.png
                                        price:
                                          type: string
                                          example: '29.99'
                                        price_in_currency:
                                          type: string
                                          example: $29.99
                                        sku:
                                          type:
                                            - string
                                            - 'null'
                                          example: SKU12345
                                        tax:
                                          type: string
                                          example: '2.99'
                                        tax_in_currency:
                                          type: string
                                          example: $2.99
                                    - type: 'null'
                                variant:
                                  oneOf:
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 1
                                        title:
                                          type:
                                            - string
                                            - 'null'
                                          example: Sample Variant
                                        image_path:
                                          type:
                                            - string
                                            - 'null'
                                          example: /images/sample.png
                                        image_url:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/sample.png
                                        primary_image:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/primary.png
                                        price:
                                          type:
                                            - string
                                            - 'null'
                                          example: '34.44'
                                        price_in_currency:
                                          type:
                                            - string
                                            - 'null'
                                          example: $34.44
                                        sku:
                                          type:
                                            - string
                                            - 'null'
                                          example: SKU12345
                                        options:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              title:
                                                type: string
                                                example: Size
                                              value:
                                                type: string
                                                example: XL
                                    - type: 'null'
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          ship_to:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          bill_to:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          shipping_method:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type: string
                                example: Standard Shipping
                          available_shipping_methods:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type: string
                                  example: Standard Shipping
                                price:
                                  type:
                                    - number
                                    - string
                                  example: 5.99
                                price_label:
                                  type: string
                                  example: $5.99
                                delivery_time_estimate:
                                  type: string
                                  example: 3-5 business days
                          available_payment_methods:
                            type: array
                            items:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1337
                                    type:
                                      type: string
                                      enum:
                                        - credit_card
                                    name:
                                      type: string
                                      example: Credit Card
                                    test:
                                      type: boolean
                                      example: true
                                      description: >-
                                        Determines if payment method is test
                                        instance or not. By default, set to
                                        `true`
                                    sandbox:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is sandbox
                                        instance or not. By default, set to
                                        `false`
                                    apple_pay:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method supports
                                        ApplePay or not 
                                    bogus_gateway:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is a Bogus
                                        instance or not.
                                    tokenize_path:
                                      type:
                                        - string
                                        - 'null'
                                      description: Path to tokenize, if applicable.
                                    token_provider:
                                      type: string
                                      enum:
                                        - spreedly
                                        - vgs
                                      description: >-
                                        Determines if payment tokenization is
                                        via spreedly or VGS
                                    apple_pay_merchant_identifier:
                                      type:
                                        - string
                                        - 'null'
                                      example: merchant.mycompany.com
                                      description: >-
                                        If ApplePay is supported, returns the
                                        merchant identifier registered with
                                        Apple, else returns nil
                                    supported_brands:
                                      type: array
                                      items:
                                        type: string
                                      example:
                                        - visa
                                        - master
                                        - american_express
                                        - discover
                                  required:
                                    - id
                                    - type
                                    - name
                                    - supported_brands
                                    - test
                                    - sandbox
                                    - apple_pay
                                    - apple_pay_merchant_identifier
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1337
                                    type:
                                      type: string
                                      enum:
                                        - klarna
                                    name:
                                      type: string
                                      example: Klarna
                                    test:
                                      type: boolean
                                      example: true
                                      description: >-
                                        Determines if payment method is test
                                        instance or not. By default, set to
                                        `true`
                                    sandbox:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is sandbox
                                        instance or not. By default, set to
                                        `false`
                          country:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              iso:
                                type: string
                                example: US
                              name:
                                type: string
                                example: United States
                              province_required:
                                type: boolean
                                example: false
                          type:
                            type: string
                            enum:
                              - regular
                              - enrollment
                            example: regular
                          enrollment_pack_id:
                            type:
                              - integer
                              - 'null'
                            example: 1
                          enrollment_pack:
                            type:
                              - object
                              - 'null'
                            properties:
                              enrollment_pack_id:
                                type: integer
                                example: 1
                              additional_volume:
                                type:
                                  - integer
                                  - 'null'
                                example: 10
                              description:
                                type:
                                  - object
                                  - 'null'
                                  - string
                                properties:
                                  id:
                                    type: integer
                                    example: 111
                                  name:
                                    type: string
                                    example: description
                                  body:
                                    type: string
                                    example: >-
                                      <div>Try the latest and greatest of our
                                      sugar zip packs. Guaranteed to make you
                                      skinner and cure cancer.</div>
                                  record_type:
                                    type: string
                                    example: EnrollmentPack
                                  record_id:
                                    type: integer
                                    example: 1
                                  created_at:
                                    type: string
                                    format: date_time
                                    example: '2025-01-16T04:22:43.809Z'
                                  updated_at:
                                    type: string
                                    format: date_time
                                    example: '2025-01-22T10:23:52.941Z'
                                  locale:
                                    type: string
                                    example: en
                              enrollment_fee:
                                type:
                                  - number
                                  - string
                                example: 10
                              enrollment_fee_in_currency:
                                type: string
                                example: $10.00
                              images:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 2
                                    relateable_type:
                                      type: string
                                      example: EnrollmentPack
                                    relateable_id:
                                      type: integer
                                      example: 1
                                    image_url:
                                      type: string
                                      example: >-
                                        https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                    image_path:
                                      type: string
                                      example: jITWaU14QGe0y5AFgY7P_00179.svg
                                    position:
                                      type: integer
                                      example: 1
                                    shopify_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: null
                                    created_at:
                                      type: string
                                      format: date_time
                                      example: '2025-01-16T04:22:44.870Z'
                                    updated_at:
                                      type: string
                                      format: date_time
                                      example: '2025-01-16T04:22:44.870Z'
                                    external_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: null
                              items:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 625
                                    allow_subscription:
                                      type: boolean
                                      example: true
                                    cv:
                                      type:
                                        - number
                                        - string
                                      example: 0
                                    cv_in_currency:
                                      type: string
                                      example: $0.00
                                    enrollment:
                                      type: boolean
                                      example: true
                                    enrollment_pack_id:
                                      type: integer
                                      example: 1
                                    price:
                                      type: string
                                      example: '11.13'
                                    price_in_currency:
                                      type: string
                                      example: $11.13
                                    product_title:
                                      type: string
                                      example: Zip Pack Sample Pack (30)
                                    quantity:
                                      type: integer
                                      example: 1
                                    qv:
                                      type:
                                        - number
                                        - string
                                      example: 0
                                    qv_in_currency:
                                      type: string
                                      example: $0.00
                                    subscribe_and_save:
                                      type:
                                        - string
                                        - 'null'
                                      example: '-1988.87'
                                    subscribe_and_save_for_display:
                                      type:
                                        - string
                                        - 'null'
                                      example: Subscribe and save $-1,988.87
                                    subscribe_and_save_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $-1,988.87
                                    subscription:
                                      type: boolean
                                      example: false
                                    subscription_interval:
                                      type:
                                        - integer
                                        - 'null'
                                      example: 1
                                    subscription_interval_unit:
                                      type:
                                        - string
                                        - 'null'
                                      example: month
                                    subscription_only:
                                      type: boolean
                                      example: false
                                    subscription_plan_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: 1
                                    subscription_plans:
                                      oneOf:
                                        - type: array
                                          items:
                                            title: Commerce::SubscriptionPlan
                                            type: object
                                            properties:
                                              id:
                                                type: integer
                                              name:
                                                example: Test Subscription Plan
                                                type: string
                                              billing_interval:
                                                example: 1
                                                type: integer
                                                default: 1
                                                minimum: 1
                                              billing_interval_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type: string
                                                default: month
                                              shipping_interval:
                                                example: 1
                                                type: integer
                                                default: 1
                                                minimum: 1
                                              shipping_interval_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type: string
                                                default: month
                                              trial_period:
                                                example: 1
                                                type:
                                                  - integer
                                                  - 'null'
                                                minimum: 1
                                              trial_period_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type:
                                                  - string
                                                  - 'null'
                                              split_volume:
                                                example: true
                                                type: boolean
                                                default: false
                                              max_quantity:
                                                example: 100
                                                type:
                                                  - integer
                                                  - 'null'
                                                minimum: 1
                                              company_default:
                                                example: false
                                                type:
                                                  - boolean
                                                  - 'null'
                                                default: false
                                              products_count:
                                                example: 10
                                                type:
                                                  - integer
                                                  - 'null'
                                              subscribers_count:
                                                example: 10
                                                type:
                                                  - integer
                                                  - 'null'
                                              price:
                                                type: string
                                              price_in_currency:
                                                type: string
                                              subscription_start:
                                                type: string
                                              subscribe_and_save:
                                                type: string
                                              subscribe_and_save_in_currency:
                                                type: string
                                              subscribe_and_save_for_display:
                                                type: string
                                            required:
                                              - id
                                              - name
                                              - billing_interval
                                              - billing_interval_unit
                                              - shipping_interval
                                              - shipping_interval_unit
                                              - split_volume
                                              - price
                                              - price_in_currency
                                              - subscription_start
                                              - subscribe_and_save
                                              - subscribe_and_save_in_currency
                                              - subscribe_and_save_for_display
                                        - type: 'null'
                                    subscription_price:
                                      type: string
                                      example: '2000.0'
                                    subscription_price_in_currency:
                                      type: string
                                      example: $2,000.00
                                    subscription_start:
                                      type:
                                        - string
                                        - 'null'
                                      format: date
                                      example: '2025-02-28'
                                    tax:
                                      type: string
                                      example: '0.0'
                                    tax_in_currency:
                                      type: string
                                      example: $0.00
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: null
                                    display_to_customer:
                                      type: boolean
                                      example: false
                                    errors:
                                      oneOf:
                                        - type: 'null'
                                        - type: array
                                          items:
                                            type: object
                                            example:
                                              country:
                                                - >-
                                                  This product is not available for this
                                                  country. Please change your country
                              price:
                                type:
                                  - string
                                  - integer
                                example: 11.13
                              price_in_currency:
                                type: string
                                example: $11.13
                              subscription_price:
                                type:
                                  - string
                                  - integer
                                example: 2000
                              subscription_price_in_currency:
                                type: string
                                example: $2,000.00
                              title:
                                type: string
                                example: enroll product
                              token:
                                type: string
                                example: NxL22AqLRRisfyF9LqxxWRak
                          recurring:
                            oneOf:
                              - type: array
                                items:
                                  type: object
                                  properties:
                                    subtotal:
                                      type: string
                                      example: '10.0'
                                    subtotal_in_currency:
                                      type: string
                                      example: $10.0
                                    interval:
                                      type: integer
                                      example: 1
                                    interval_unit:
                                      type: string
                                      example: month
                                    subtotal_for_display:
                                      type: string
                                      example: $10.00 every 1 month
                                    start_date:
                                      type:
                                        - string
                                        - 'null'
                                      example: '2025-05-27'
                              - type: 'null'
                            default:
                              - subtotal: '10.0'
                                subtotal_in_currency: $10.0
                                interval: 1
                                interval_unit: month
                                subtotal_for_display: $10.00 every 1 month
                                start_date: '2025-05-27'
                required:
                  - error_message
                  - errors
                  - meta
        '422':
          description: product not available in country
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - items
              properties:
                items:
                  type: array
                  description: >-
                    Either send in [variant_id, quantity] - or [title, price,
                    quantity]
                  items:
                    type: object
                    required:
                      - quantity
                    properties:
                      variant_id:
                        type: integer
                        description: ID of the variant to add to cart
                      quantity:
                        type: integer
                        description: Quantity of the item to add
                      title:
                        type: string
                        description: Title for custom items without variants
                      price:
                        type:
                          - number
                          - string
                        description: Price for custom items without variants
                      subscription:
                        type: boolean
                        example: false
                        description: allow subscription for item
                      enrollment_pack_id:
                        type: integer
                        description: ID of the enrollment pack to add to cart item
    delete:
      summary: Removes items from cart
      tags:
        - Carts
      operationId: removeCartItems
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: items removed from cart
          content:
            application/json:
              schema:
                type: object
                properties:
                  cart:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123
                      state:
                        type: string
                        example: start
                      processed:
                        type: boolean
                        example: false
                        description: >-
                          Determines if a cart payment has been processed or
                          not.
                      valid_for_checkout:
                        type: boolean
                        example: true
                      buyer_rep_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      currency_symbol:
                        type: string
                        example: $
                      currency_code:
                        type: string
                        example: USD
                      shipping_total_for_display:
                        type: string
                        example: Free
                      phone:
                        type:
                          - string
                          - 'null'
                        example: '4035551212'
                      payment_method_auto_assignable:
                        type: boolean
                        example: true
                        description: >-
                          Determines if a payment method can be auto-assigned to
                          the cart.
                      attribution:
                        oneOf:
                          - type: object
                            oneOf:
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  share_guid:
                                    type: string
                                    example: james-bond007
                                required:
                                  - id
                                  - share_guid
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  email:
                                    type: string
                                    example: james.bond@gmail.com
                                required:
                                  - id
                                  - email
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  username:
                                    type: string
                                    example: jaamball234
                                required:
                                  - id
                                  - username
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  fluid_rep_id:
                                    type: integer
                                    example: 23493
                                required:
                                  - id
                                  - fluid_rep_id
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  external_id:
                                    type:
                                      - string
                                      - 'null'
                                    example: w3sdf92
                                required:
                                  - id
                          - type: 'null'
                        default:
                          id: 456
                          share_guid: james-bond007
                      agreements:
                        type: array
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                              example: 1
                            required:
                              type: boolean
                              example: true
                            title:
                              type: string
                              example: Terms and Conditions
                            show_path:
                              type: string
                              example: /terms
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                      amount_total:
                        type: string
                        example: '121.65'
                      amount_total_in_currency:
                        type: string
                        example: $121.65 (USD)
                      sub_total:
                        type: string
                        example: '100.00'
                      sub_total_in_currency:
                        type: string
                        example: $100.00 (USD)
                      tax_total:
                        type: string
                        example: '20.00'
                      tax_total_in_currency:
                        type: string
                        example: $20.00 (USD)
                      shipping_total:
                        type: string
                        example: '1.65'
                      shipping_total_in_currency:
                        type: string
                        example: $1.65 (USD)
                      discount_total:
                        type: string
                        example: '2.99'
                      discount_total_in_currency:
                        type: string
                        example: $2.99 (USD)
                      transaction_fee:
                        type:
                          - number
                          - string
                        example: '1.90'
                      transaction_fee_in_currency:
                        type: string
                        example: $1.90 (USD)
                      cv_total:
                        type: integer
                        example: 10
                      qv_total:
                        type: integer
                        example: 15
                      company:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          primary_domain_hostname:
                            type:
                              - string
                              - 'null'
                            example: fluid.com
                          subdomain:
                            type:
                              - string
                              - 'null'
                            example: myco
                          logo_url:
                            type:
                              - string
                              - 'null'
                            example: https://example.com/logo.png
                          fluid_shop:
                            type:
                              - string
                              - 'null'
                            example: https://fluid-sample-shop.fluid.com
                          collect_phone:
                            type: boolean
                            example: true
                          require_phone:
                            type: boolean
                            example: false
                          require_billing_zip:
                            type: boolean
                            example: false
                          checkout_primary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                          checkout_primary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                      payment_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          cart_type:
                            type: string
                            example: credit_card
                          last_four:
                            type: string
                            example: '1234'
                          exp_month:
                            type: integer
                            example: 12
                          exp_year:
                            type: integer
                            example: 2025
                          logo_url:
                            type: string
                            example: https://example.com/image.svg
                      email:
                        type:
                          - string
                          - 'null'
                        example: user@example.com
                      enrollment_fee:
                        type:
                          - number
                          - string
                        example: '10.45'
                      enrollment_fee_in_currency:
                        type: string
                        example: $10.45
                      discount_code:
                        type:
                          - string
                          - 'null'
                        example: DISCOUNT10
                      language_iso:
                        type:
                          - string
                          - 'null'
                        example: en
                      cart_token:
                        type: string
                        example: abc123
                      immutable_items:
                        type: boolean
                        example: false
                      digital_only:
                        type: boolean
                        example: false
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 101
                            price:
                              type: string
                              example: '43.41'
                            price_in_currency:
                              type: string
                              example: $43.41
                            tax:
                              type: string
                              example: '2.99'
                            tax_in_currency:
                              type: string
                              example: $2.99
                            cv:
                              type: integer
                              example: 5
                            qv:
                              type: integer
                              example: 7
                            discount_amount:
                              type: string
                              example: '10'
                            discount_amount_in_currency:
                              type: string
                              example: $10.00
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            display_to_customer:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            product_title:
                              type:
                                - string
                                - 'null'
                              example: Sample Product
                            quantity:
                              type: integer
                              example: 3
                            subscription:
                              type: boolean
                              example: true
                            enrollment:
                              type: boolean
                              example: false
                            allow_subscription:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_plan_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_plans:
                              oneOf:
                                - type: array
                                  items:
                                    title: Commerce::SubscriptionPlan
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      name:
                                        example: Test Subscription Plan
                                        type: string
                                      billing_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      billing_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      shipping_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      shipping_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      trial_period:
                                        example: 1
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      trial_period_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type:
                                          - string
                                          - 'null'
                                      split_volume:
                                        example: true
                                        type: boolean
                                        default: false
                                      max_quantity:
                                        example: 100
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      company_default:
                                        example: false
                                        type:
                                          - boolean
                                          - 'null'
                                        default: false
                                      products_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      subscribers_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      price:
                                        type: string
                                      price_in_currency:
                                        type: string
                                      subscription_start:
                                        type: string
                                      subscribe_and_save:
                                        type: string
                                      subscribe_and_save_in_currency:
                                        type: string
                                      subscribe_and_save_for_display:
                                        type: string
                                    required:
                                      - id
                                      - name
                                      - billing_interval
                                      - billing_interval_unit
                                      - shipping_interval
                                      - shipping_interval_unit
                                      - split_volume
                                      - price
                                      - price_in_currency
                                      - subscription_start
                                      - subscribe_and_save
                                      - subscribe_and_save_in_currency
                                      - subscribe_and_save_for_display
                                - type: 'null'
                            subscription_only:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_interval:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_interval_unit:
                              type:
                                - string
                                - 'null'
                              example: month
                            subscription_price:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 10.5
                            subscription_price_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $10.50
                            subscription_start:
                              type:
                                - string
                                - 'null'
                              example: '2025-02-12'
                            subscribe_and_save:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 2.99
                            subscribe_and_save_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $2.99
                            subscribe_and_save_for_display:
                              type:
                                - string
                                - 'null'
                              example: Subscribe and save $2.99
                            title:
                              type:
                                - string
                                - 'null'
                              example: Surcharge
                            product:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type: string
                                      example: Sample Product
                                    cv:
                                      type: integer
                                      example: 10
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/product.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/product.png
                                    price:
                                      type: string
                                      example: '29.99'
                                    price_in_currency:
                                      type: string
                                      example: $29.99
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    tax:
                                      type: string
                                      example: '2.99'
                                    tax_in_currency:
                                      type: string
                                      example: $2.99
                                - type: 'null'
                            variant:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: Sample Variant
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/sample.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/sample.png
                                    primary_image:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/primary.png
                                    price:
                                      type:
                                        - string
                                        - 'null'
                                      example: '34.44'
                                    price_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $34.44
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    options:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          title:
                                            type: string
                                            example: Size
                                          value:
                                            type: string
                                            example: XL
                                - type: 'null'
                            errors:
                              oneOf:
                                - type: 'null'
                                - type: array
                                  items:
                                    type: object
                                    example:
                                      country:
                                        - >-
                                          This product is not available for this
                                          country. Please change your country
                      ship_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      bill_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      shipping_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type: string
                            example: Standard Shipping
                      available_shipping_methods:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            title:
                              type: string
                              example: Standard Shipping
                            price:
                              type:
                                - number
                                - string
                              example: 5.99
                            price_label:
                              type: string
                              example: $5.99
                            delivery_time_estimate:
                              type: string
                              example: 3-5 business days
                      available_payment_methods:
                        type: array
                        items:
                          oneOf:
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - credit_card
                                name:
                                  type: string
                                  example: Credit Card
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                                apple_pay:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method supports
                                    ApplePay or not 
                                bogus_gateway:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is a Bogus
                                    instance or not.
                                tokenize_path:
                                  type:
                                    - string
                                    - 'null'
                                  description: Path to tokenize, if applicable.
                                token_provider:
                                  type: string
                                  enum:
                                    - spreedly
                                    - vgs
                                  description: >-
                                    Determines if payment tokenization is via
                                    spreedly or VGS
                                apple_pay_merchant_identifier:
                                  type:
                                    - string
                                    - 'null'
                                  example: merchant.mycompany.com
                                  description: >-
                                    If ApplePay is supported, returns the
                                    merchant identifier registered with Apple,
                                    else returns nil
                                supported_brands:
                                  type: array
                                  items:
                                    type: string
                                  example:
                                    - visa
                                    - master
                                    - american_express
                                    - discover
                              required:
                                - id
                                - type
                                - name
                                - supported_brands
                                - test
                                - sandbox
                                - apple_pay
                                - apple_pay_merchant_identifier
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - klarna
                                name:
                                  type: string
                                  example: Klarna
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                      country:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          iso:
                            type: string
                            example: US
                          name:
                            type: string
                            example: United States
                          province_required:
                            type: boolean
                            example: false
                      type:
                        type: string
                        enum:
                          - regular
                          - enrollment
                        example: regular
                      enrollment_pack_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      enrollment_pack:
                        type:
                          - object
                          - 'null'
                        properties:
                          enrollment_pack_id:
                            type: integer
                            example: 1
                          additional_volume:
                            type:
                              - integer
                              - 'null'
                            example: 10
                          description:
                            type:
                              - object
                              - 'null'
                              - string
                            properties:
                              id:
                                type: integer
                                example: 111
                              name:
                                type: string
                                example: description
                              body:
                                type: string
                                example: >-
                                  <div>Try the latest and greatest of our sugar
                                  zip packs. Guaranteed to make you skinner and
                                  cure cancer.</div>
                              record_type:
                                type: string
                                example: EnrollmentPack
                              record_id:
                                type: integer
                                example: 1
                              created_at:
                                type: string
                                format: date_time
                                example: '2025-01-16T04:22:43.809Z'
                              updated_at:
                                type: string
                                format: date_time
                                example: '2025-01-22T10:23:52.941Z'
                              locale:
                                type: string
                                example: en
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: 10
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.00
                          images:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 2
                                relateable_type:
                                  type: string
                                  example: EnrollmentPack
                                relateable_id:
                                  type: integer
                                  example: 1
                                image_url:
                                  type: string
                                  example: >-
                                    https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                image_path:
                                  type: string
                                  example: jITWaU14QGe0y5AFgY7P_00179.svg
                                position:
                                  type: integer
                                  example: 1
                                shopify_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                                created_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                updated_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                external_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 625
                                allow_subscription:
                                  type: boolean
                                  example: true
                                cv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                cv_in_currency:
                                  type: string
                                  example: $0.00
                                enrollment:
                                  type: boolean
                                  example: true
                                enrollment_pack_id:
                                  type: integer
                                  example: 1
                                price:
                                  type: string
                                  example: '11.13'
                                price_in_currency:
                                  type: string
                                  example: $11.13
                                product_title:
                                  type: string
                                  example: Zip Pack Sample Pack (30)
                                quantity:
                                  type: integer
                                  example: 1
                                qv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                qv_in_currency:
                                  type: string
                                  example: $0.00
                                subscribe_and_save:
                                  type:
                                    - string
                                    - 'null'
                                  example: '-1988.87'
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $-1,988.87
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $-1,988.87
                                subscription:
                                  type: boolean
                                  example: false
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_only:
                                  type: boolean
                                  example: false
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_price:
                                  type: string
                                  example: '2000.0'
                                subscription_price_in_currency:
                                  type: string
                                  example: $2,000.00
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                  example: '2025-02-28'
                                tax:
                                  type: string
                                  example: '0.0'
                                tax_in_currency:
                                  type: string
                                  example: $0.00
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: null
                                display_to_customer:
                                  type: boolean
                                  example: false
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          price:
                            type:
                              - string
                              - integer
                            example: 11.13
                          price_in_currency:
                            type: string
                            example: $11.13
                          subscription_price:
                            type:
                              - string
                              - integer
                            example: 2000
                          subscription_price_in_currency:
                            type: string
                            example: $2,000.00
                          title:
                            type: string
                            example: enroll product
                          token:
                            type: string
                            example: NxL22AqLRRisfyF9LqxxWRak
                      recurring:
                        oneOf:
                          - type: array
                            items:
                              type: object
                              properties:
                                subtotal:
                                  type: string
                                  example: '10.0'
                                subtotal_in_currency:
                                  type: string
                                  example: $10.0
                                interval:
                                  type: integer
                                  example: 1
                                interval_unit:
                                  type: string
                                  example: month
                                subtotal_for_display:
                                  type: string
                                  example: $10.00 every 1 month
                                start_date:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-05-27'
                          - type: 'null'
                        default:
                          - subtotal: '10.0'
                            subtotal_in_currency: $10.0
                            interval: 1
                            interval_unit: month
                            subtotal_for_display: $10.00 every 1 month
                            start_date: '2025-05-27'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      checkout_url:
                        type: string
                        example: https://checkout.fluid.com/checkout?jwt=abc123
                      shop_url:
                        type: string
                        example: https://myco.fluid.app
        '400':
          description: no cart items specified
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: No cart items specified
        '410':
          description: cart is in authorized enrollment state
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Cart is in authorized state and cannot be modified
                  errors:
                    type: object
                    example:
                      cart:
                        - is in authorized state and cannot be modified
                  meta:
                    type: object
                    properties:
                      shop_url:
                        type: string
                        example: https://example.myshopify.com
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      cart:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 123
                          state:
                            type: string
                            example: start
                          processed:
                            type: boolean
                            example: false
                            description: >-
                              Determines if a cart payment has been processed or
                              not.
                          valid_for_checkout:
                            type: boolean
                            example: true
                          buyer_rep_id:
                            type:
                              - integer
                              - 'null'
                            example: 1
                          currency_symbol:
                            type: string
                            example: $
                          currency_code:
                            type: string
                            example: USD
                          shipping_total_for_display:
                            type: string
                            example: Free
                          phone:
                            type:
                              - string
                              - 'null'
                            example: '4035551212'
                          payment_method_auto_assignable:
                            type: boolean
                            example: true
                            description: >-
                              Determines if a payment method can be
                              auto-assigned to the cart.
                          attribution:
                            oneOf:
                              - type: object
                                oneOf:
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      share_guid:
                                        type: string
                                        example: james-bond007
                                    required:
                                      - id
                                      - share_guid
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      email:
                                        type: string
                                        example: james.bond@gmail.com
                                    required:
                                      - id
                                      - email
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      username:
                                        type: string
                                        example: jaamball234
                                    required:
                                      - id
                                      - username
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      fluid_rep_id:
                                        type: integer
                                        example: 23493
                                    required:
                                      - id
                                      - fluid_rep_id
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      external_id:
                                        type:
                                          - string
                                          - 'null'
                                        example: w3sdf92
                                    required:
                                      - id
                              - type: 'null'
                            default:
                              id: 456
                              share_guid: james-bond007
                          agreements:
                            type: array
                            items:
                              type:
                                - object
                                - 'null'
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                required:
                                  type: boolean
                                  example: true
                                title:
                                  type: string
                                  example: Terms and Conditions
                                show_path:
                                  type: string
                                  example: /terms
                                enrollment_pack_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                          amount_total:
                            type: string
                            example: '121.65'
                          amount_total_in_currency:
                            type: string
                            example: $121.65 (USD)
                          sub_total:
                            type: string
                            example: '100.00'
                          sub_total_in_currency:
                            type: string
                            example: $100.00 (USD)
                          tax_total:
                            type: string
                            example: '20.00'
                          tax_total_in_currency:
                            type: string
                            example: $20.00 (USD)
                          shipping_total:
                            type: string
                            example: '1.65'
                          shipping_total_in_currency:
                            type: string
                            example: $1.65 (USD)
                          discount_total:
                            type: string
                            example: '2.99'
                          discount_total_in_currency:
                            type: string
                            example: $2.99 (USD)
                          transaction_fee:
                            type:
                              - number
                              - string
                            example: '1.90'
                          transaction_fee_in_currency:
                            type: string
                            example: $1.90 (USD)
                          cv_total:
                            type: integer
                            example: 10
                          qv_total:
                            type: integer
                            example: 15
                          company:
                            type: object
                            properties:
                              id:
                                type: integer
                              name:
                                type: string
                              primary_domain_hostname:
                                type:
                                  - string
                                  - 'null'
                                example: fluid.com
                              subdomain:
                                type:
                                  - string
                                  - 'null'
                                example: myco
                              logo_url:
                                type:
                                  - string
                                  - 'null'
                                example: https://example.com/logo.png
                              fluid_shop:
                                type:
                                  - string
                                  - 'null'
                                example: https://fluid-sample-shop.fluid.com
                              collect_phone:
                                type: boolean
                                example: true
                              require_phone:
                                type: boolean
                                example: false
                              require_billing_zip:
                                type: boolean
                                example: false
                              checkout_primary_button_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#000000'
                              checkout_primary_text_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#FFFFFF'
                              checkout_secondary_button_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#FFFFFF'
                              checkout_secondary_text_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#000000'
                          payment_method:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              cart_type:
                                type: string
                                example: credit_card
                              last_four:
                                type: string
                                example: '1234'
                              exp_month:
                                type: integer
                                example: 12
                              exp_year:
                                type: integer
                                example: 2025
                              logo_url:
                                type: string
                                example: https://example.com/image.svg
                          email:
                            type:
                              - string
                              - 'null'
                            example: user@example.com
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: '10.45'
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.45
                          discount_code:
                            type:
                              - string
                              - 'null'
                            example: DISCOUNT10
                          language_iso:
                            type:
                              - string
                              - 'null'
                            example: en
                          cart_token:
                            type: string
                            example: abc123
                          immutable_items:
                            type: boolean
                            example: false
                          digital_only:
                            type: boolean
                            example: false
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 101
                                price:
                                  type: string
                                  example: '43.41'
                                price_in_currency:
                                  type: string
                                  example: $43.41
                                tax:
                                  type: string
                                  example: '2.99'
                                tax_in_currency:
                                  type: string
                                  example: $2.99
                                cv:
                                  type: integer
                                  example: 5
                                qv:
                                  type: integer
                                  example: 7
                                discount_amount:
                                  type: string
                                  example: '10'
                                discount_amount_in_currency:
                                  type: string
                                  example: $10.00
                                enrollment_pack_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                display_to_customer:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                product_title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Sample Product
                                quantity:
                                  type: integer
                                  example: 3
                                subscription:
                                  type: boolean
                                  example: true
                                enrollment:
                                  type: boolean
                                  example: false
                                allow_subscription:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_only:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_price:
                                  type:
                                    - number
                                    - string
                                    - 'null'
                                  example: 10.5
                                subscription_price_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $10.50
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-02-12'
                                subscribe_and_save:
                                  type:
                                    - number
                                    - string
                                    - 'null'
                                  example: 2.99
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $2.99
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $2.99
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Surcharge
                                product:
                                  oneOf:
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 1
                                        title:
                                          type: string
                                          example: Sample Product
                                        cv:
                                          type: integer
                                          example: 10
                                        image_path:
                                          type:
                                            - string
                                            - 'null'
                                          example: /images/product.png
                                        image_url:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/product.png
                                        price:
                                          type: string
                                          example: '29.99'
                                        price_in_currency:
                                          type: string
                                          example: $29.99
                                        sku:
                                          type:
                                            - string
                                            - 'null'
                                          example: SKU12345
                                        tax:
                                          type: string
                                          example: '2.99'
                                        tax_in_currency:
                                          type: string
                                          example: $2.99
                                    - type: 'null'
                                variant:
                                  oneOf:
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 1
                                        title:
                                          type:
                                            - string
                                            - 'null'
                                          example: Sample Variant
                                        image_path:
                                          type:
                                            - string
                                            - 'null'
                                          example: /images/sample.png
                                        image_url:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/sample.png
                                        primary_image:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/primary.png
                                        price:
                                          type:
                                            - string
                                            - 'null'
                                          example: '34.44'
                                        price_in_currency:
                                          type:
                                            - string
                                            - 'null'
                                          example: $34.44
                                        sku:
                                          type:
                                            - string
                                            - 'null'
                                          example: SKU12345
                                        options:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              title:
                                                type: string
                                                example: Size
                                              value:
                                                type: string
                                                example: XL
                                    - type: 'null'
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          ship_to:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          bill_to:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          shipping_method:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type: string
                                example: Standard Shipping
                          available_shipping_methods:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type: string
                                  example: Standard Shipping
                                price:
                                  type:
                                    - number
                                    - string
                                  example: 5.99
                                price_label:
                                  type: string
                                  example: $5.99
                                delivery_time_estimate:
                                  type: string
                                  example: 3-5 business days
                          available_payment_methods:
                            type: array
                            items:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1337
                                    type:
                                      type: string
                                      enum:
                                        - credit_card
                                    name:
                                      type: string
                                      example: Credit Card
                                    test:
                                      type: boolean
                                      example: true
                                      description: >-
                                        Determines if payment method is test
                                        instance or not. By default, set to
                                        `true`
                                    sandbox:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is sandbox
                                        instance or not. By default, set to
                                        `false`
                                    apple_pay:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method supports
                                        ApplePay or not 
                                    bogus_gateway:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is a Bogus
                                        instance or not.
                                    tokenize_path:
                                      type:
                                        - string
                                        - 'null'
                                      description: Path to tokenize, if applicable.
                                    token_provider:
                                      type: string
                                      enum:
                                        - spreedly
                                        - vgs
                                      description: >-
                                        Determines if payment tokenization is
                                        via spreedly or VGS
                                    apple_pay_merchant_identifier:
                                      type:
                                        - string
                                        - 'null'
                                      example: merchant.mycompany.com
                                      description: >-
                                        If ApplePay is supported, returns the
                                        merchant identifier registered with
                                        Apple, else returns nil
                                    supported_brands:
                                      type: array
                                      items:
                                        type: string
                                      example:
                                        - visa
                                        - master
                                        - american_express
                                        - discover
                                  required:
                                    - id
                                    - type
                                    - name
                                    - supported_brands
                                    - test
                                    - sandbox
                                    - apple_pay
                                    - apple_pay_merchant_identifier
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1337
                                    type:
                                      type: string
                                      enum:
                                        - klarna
                                    name:
                                      type: string
                                      example: Klarna
                                    test:
                                      type: boolean
                                      example: true
                                      description: >-
                                        Determines if payment method is test
                                        instance or not. By default, set to
                                        `true`
                                    sandbox:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is sandbox
                                        instance or not. By default, set to
                                        `false`
                          country:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              iso:
                                type: string
                                example: US
                              name:
                                type: string
                                example: United States
                              province_required:
                                type: boolean
                                example: false
                          type:
                            type: string
                            enum:
                              - regular
                              - enrollment
                            example: regular
                          enrollment_pack_id:
                            type:
                              - integer
                              - 'null'
                            example: 1
                          enrollment_pack:
                            type:
                              - object
                              - 'null'
                            properties:
                              enrollment_pack_id:
                                type: integer
                                example: 1
                              additional_volume:
                                type:
                                  - integer
                                  - 'null'
                                example: 10
                              description:
                                type:
                                  - object
                                  - 'null'
                                  - string
                                properties:
                                  id:
                                    type: integer
                                    example: 111
                                  name:
                                    type: string
                                    example: description
                                  body:
                                    type: string
                                    example: >-
                                      <div>Try the latest and greatest of our
                                      sugar zip packs. Guaranteed to make you
                                      skinner and cure cancer.</div>
                                  record_type:
                                    type: string
                                    example: EnrollmentPack
                                  record_id:
                                    type: integer
                                    example: 1
                                  created_at:
                                    type: string
                                    format: date_time
                                    example: '2025-01-16T04:22:43.809Z'
                                  updated_at:
                                    type: string
                                    format: date_time
                                    example: '2025-01-22T10:23:52.941Z'
                                  locale:
                                    type: string
                                    example: en
                              enrollment_fee:
                                type:
                                  - number
                                  - string
                                example: 10
                              enrollment_fee_in_currency:
                                type: string
                                example: $10.00
                              images:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 2
                                    relateable_type:
                                      type: string
                                      example: EnrollmentPack
                                    relateable_id:
                                      type: integer
                                      example: 1
                                    image_url:
                                      type: string
                                      example: >-
                                        https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                    image_path:
                                      type: string
                                      example: jITWaU14QGe0y5AFgY7P_00179.svg
                                    position:
                                      type: integer
                                      example: 1
                                    shopify_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: null
                                    created_at:
                                      type: string
                                      format: date_time
                                      example: '2025-01-16T04:22:44.870Z'
                                    updated_at:
                                      type: string
                                      format: date_time
                                      example: '2025-01-16T04:22:44.870Z'
                                    external_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: null
                              items:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 625
                                    allow_subscription:
                                      type: boolean
                                      example: true
                                    cv:
                                      type:
                                        - number
                                        - string
                                      example: 0
                                    cv_in_currency:
                                      type: string
                                      example: $0.00
                                    enrollment:
                                      type: boolean
                                      example: true
                                    enrollment_pack_id:
                                      type: integer
                                      example: 1
                                    price:
                                      type: string
                                      example: '11.13'
                                    price_in_currency:
                                      type: string
                                      example: $11.13
                                    product_title:
                                      type: string
                                      example: Zip Pack Sample Pack (30)
                                    quantity:
                                      type: integer
                                      example: 1
                                    qv:
                                      type:
                                        - number
                                        - string
                                      example: 0
                                    qv_in_currency:
                                      type: string
                                      example: $0.00
                                    subscribe_and_save:
                                      type:
                                        - string
                                        - 'null'
                                      example: '-1988.87'
                                    subscribe_and_save_for_display:
                                      type:
                                        - string
                                        - 'null'
                                      example: Subscribe and save $-1,988.87
                                    subscribe_and_save_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $-1,988.87
                                    subscription:
                                      type: boolean
                                      example: false
                                    subscription_interval:
                                      type:
                                        - integer
                                        - 'null'
                                      example: 1
                                    subscription_interval_unit:
                                      type:
                                        - string
                                        - 'null'
                                      example: month
                                    subscription_only:
                                      type: boolean
                                      example: false
                                    subscription_plan_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: 1
                                    subscription_plans:
                                      oneOf:
                                        - type: array
                                          items:
                                            title: Commerce::SubscriptionPlan
                                            type: object
                                            properties:
                                              id:
                                                type: integer
                                              name:
                                                example: Test Subscription Plan
                                                type: string
                                              billing_interval:
                                                example: 1
                                                type: integer
                                                default: 1
                                                minimum: 1
                                              billing_interval_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type: string
                                                default: month
                                              shipping_interval:
                                                example: 1
                                                type: integer
                                                default: 1
                                                minimum: 1
                                              shipping_interval_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type: string
                                                default: month
                                              trial_period:
                                                example: 1
                                                type:
                                                  - integer
                                                  - 'null'
                                                minimum: 1
                                              trial_period_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type:
                                                  - string
                                                  - 'null'
                                              split_volume:
                                                example: true
                                                type: boolean
                                                default: false
                                              max_quantity:
                                                example: 100
                                                type:
                                                  - integer
                                                  - 'null'
                                                minimum: 1
                                              company_default:
                                                example: false
                                                type:
                                                  - boolean
                                                  - 'null'
                                                default: false
                                              products_count:
                                                example: 10
                                                type:
                                                  - integer
                                                  - 'null'
                                              subscribers_count:
                                                example: 10
                                                type:
                                                  - integer
                                                  - 'null'
                                              price:
                                                type: string
                                              price_in_currency:
                                                type: string
                                              subscription_start:
                                                type: string
                                              subscribe_and_save:
                                                type: string
                                              subscribe_and_save_in_currency:
                                                type: string
                                              subscribe_and_save_for_display:
                                                type: string
                                            required:
                                              - id
                                              - name
                                              - billing_interval
                                              - billing_interval_unit
                                              - shipping_interval
                                              - shipping_interval_unit
                                              - split_volume
                                              - price
                                              - price_in_currency
                                              - subscription_start
                                              - subscribe_and_save
                                              - subscribe_and_save_in_currency
                                              - subscribe_and_save_for_display
                                        - type: 'null'
                                    subscription_price:
                                      type: string
                                      example: '2000.0'
                                    subscription_price_in_currency:
                                      type: string
                                      example: $2,000.00
                                    subscription_start:
                                      type:
                                        - string
                                        - 'null'
                                      format: date
                                      example: '2025-02-28'
                                    tax:
                                      type: string
                                      example: '0.0'
                                    tax_in_currency:
                                      type: string
                                      example: $0.00
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: null
                                    display_to_customer:
                                      type: boolean
                                      example: false
                                    errors:
                                      oneOf:
                                        - type: 'null'
                                        - type: array
                                          items:
                                            type: object
                                            example:
                                              country:
                                                - >-
                                                  This product is not available for this
                                                  country. Please change your country
                              price:
                                type:
                                  - string
                                  - integer
                                example: 11.13
                              price_in_currency:
                                type: string
                                example: $11.13
                              subscription_price:
                                type:
                                  - string
                                  - integer
                                example: 2000
                              subscription_price_in_currency:
                                type: string
                                example: $2,000.00
                              title:
                                type: string
                                example: enroll product
                              token:
                                type: string
                                example: NxL22AqLRRisfyF9LqxxWRak
                          recurring:
                            oneOf:
                              - type: array
                                items:
                                  type: object
                                  properties:
                                    subtotal:
                                      type: string
                                      example: '10.0'
                                    subtotal_in_currency:
                                      type: string
                                      example: $10.0
                                    interval:
                                      type: integer
                                      example: 1
                                    interval_unit:
                                      type: string
                                      example: month
                                    subtotal_for_display:
                                      type: string
                                      example: $10.00 every 1 month
                                    start_date:
                                      type:
                                        - string
                                        - 'null'
                                      example: '2025-05-27'
                              - type: 'null'
                            default:
                              - subtotal: '10.0'
                                subtotal_in_currency: $10.0
                                interval: 1
                                interval_unit: month
                                subtotal_for_display: $10.00 every 1 month
                                start_date: '2025-05-27'
                required:
                  - error_message
                  - errors
                  - meta
        '422':
          description: variant id not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Cart item with variant_id not found
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - items
              properties:
                items:
                  type: array
                  items:
                    type: object
                    required:
                      - variant_id
                    properties:
                      variant_id:
                        type: integer
  /api/carts/{cart_token}/items/{item_id}:
    delete:
      summary: Removes item from cart
      tags:
        - Carts
      operationId: removeCartItem
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
        - name: item_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: item removed from cart
          content:
            application/json:
              schema:
                type: object
                properties:
                  cart:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123
                      state:
                        type: string
                        example: start
                      processed:
                        type: boolean
                        example: false
                        description: >-
                          Determines if a cart payment has been processed or
                          not.
                      valid_for_checkout:
                        type: boolean
                        example: true
                      buyer_rep_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      currency_symbol:
                        type: string
                        example: $
                      currency_code:
                        type: string
                        example: USD
                      shipping_total_for_display:
                        type: string
                        example: Free
                      phone:
                        type:
                          - string
                          - 'null'
                        example: '4035551212'
                      payment_method_auto_assignable:
                        type: boolean
                        example: true
                        description: >-
                          Determines if a payment method can be auto-assigned to
                          the cart.
                      attribution:
                        oneOf:
                          - type: object
                            oneOf:
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  share_guid:
                                    type: string
                                    example: james-bond007
                                required:
                                  - id
                                  - share_guid
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  email:
                                    type: string
                                    example: james.bond@gmail.com
                                required:
                                  - id
                                  - email
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  username:
                                    type: string
                                    example: jaamball234
                                required:
                                  - id
                                  - username
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  fluid_rep_id:
                                    type: integer
                                    example: 23493
                                required:
                                  - id
                                  - fluid_rep_id
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  external_id:
                                    type:
                                      - string
                                      - 'null'
                                    example: w3sdf92
                                required:
                                  - id
                          - type: 'null'
                        default:
                          id: 456
                          share_guid: james-bond007
                      agreements:
                        type: array
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                              example: 1
                            required:
                              type: boolean
                              example: true
                            title:
                              type: string
                              example: Terms and Conditions
                            show_path:
                              type: string
                              example: /terms
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                      amount_total:
                        type: string
                        example: '121.65'
                      amount_total_in_currency:
                        type: string
                        example: $121.65 (USD)
                      sub_total:
                        type: string
                        example: '100.00'
                      sub_total_in_currency:
                        type: string
                        example: $100.00 (USD)
                      tax_total:
                        type: string
                        example: '20.00'
                      tax_total_in_currency:
                        type: string
                        example: $20.00 (USD)
                      shipping_total:
                        type: string
                        example: '1.65'
                      shipping_total_in_currency:
                        type: string
                        example: $1.65 (USD)
                      discount_total:
                        type: string
                        example: '2.99'
                      discount_total_in_currency:
                        type: string
                        example: $2.99 (USD)
                      transaction_fee:
                        type:
                          - number
                          - string
                        example: '1.90'
                      transaction_fee_in_currency:
                        type: string
                        example: $1.90 (USD)
                      cv_total:
                        type: integer
                        example: 10
                      qv_total:
                        type: integer
                        example: 15
                      company:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          primary_domain_hostname:
                            type:
                              - string
                              - 'null'
                            example: fluid.com
                          subdomain:
                            type:
                              - string
                              - 'null'
                            example: myco
                          logo_url:
                            type:
                              - string
                              - 'null'
                            example: https://example.com/logo.png
                          fluid_shop:
                            type:
                              - string
                              - 'null'
                            example: https://fluid-sample-shop.fluid.com
                          collect_phone:
                            type: boolean
                            example: true
                          require_phone:
                            type: boolean
                            example: false
                          require_billing_zip:
                            type: boolean
                            example: false
                          checkout_primary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                          checkout_primary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                      payment_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          cart_type:
                            type: string
                            example: credit_card
                          last_four:
                            type: string
                            example: '1234'
                          exp_month:
                            type: integer
                            example: 12
                          exp_year:
                            type: integer
                            example: 2025
                          logo_url:
                            type: string
                            example: https://example.com/image.svg
                      email:
                        type:
                          - string
                          - 'null'
                        example: user@example.com
                      enrollment_fee:
                        type:
                          - number
                          - string
                        example: '10.45'
                      enrollment_fee_in_currency:
                        type: string
                        example: $10.45
                      discount_code:
                        type:
                          - string
                          - 'null'
                        example: DISCOUNT10
                      language_iso:
                        type:
                          - string
                          - 'null'
                        example: en
                      cart_token:
                        type: string
                        example: abc123
                      immutable_items:
                        type: boolean
                        example: false
                      digital_only:
                        type: boolean
                        example: false
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 101
                            price:
                              type: string
                              example: '43.41'
                            price_in_currency:
                              type: string
                              example: $43.41
                            tax:
                              type: string
                              example: '2.99'
                            tax_in_currency:
                              type: string
                              example: $2.99
                            cv:
                              type: integer
                              example: 5
                            qv:
                              type: integer
                              example: 7
                            discount_amount:
                              type: string
                              example: '10'
                            discount_amount_in_currency:
                              type: string
                              example: $10.00
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            display_to_customer:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            product_title:
                              type:
                                - string
                                - 'null'
                              example: Sample Product
                            quantity:
                              type: integer
                              example: 3
                            subscription:
                              type: boolean
                              example: true
                            enrollment:
                              type: boolean
                              example: false
                            allow_subscription:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_plan_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_plans:
                              oneOf:
                                - type: array
                                  items:
                                    title: Commerce::SubscriptionPlan
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      name:
                                        example: Test Subscription Plan
                                        type: string
                                      billing_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      billing_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      shipping_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      shipping_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      trial_period:
                                        example: 1
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      trial_period_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type:
                                          - string
                                          - 'null'
                                      split_volume:
                                        example: true
                                        type: boolean
                                        default: false
                                      max_quantity:
                                        example: 100
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      company_default:
                                        example: false
                                        type:
                                          - boolean
                                          - 'null'
                                        default: false
                                      products_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      subscribers_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      price:
                                        type: string
                                      price_in_currency:
                                        type: string
                                      subscription_start:
                                        type: string
                                      subscribe_and_save:
                                        type: string
                                      subscribe_and_save_in_currency:
                                        type: string
                                      subscribe_and_save_for_display:
                                        type: string
                                    required:
                                      - id
                                      - name
                                      - billing_interval
                                      - billing_interval_unit
                                      - shipping_interval
                                      - shipping_interval_unit
                                      - split_volume
                                      - price
                                      - price_in_currency
                                      - subscription_start
                                      - subscribe_and_save
                                      - subscribe_and_save_in_currency
                                      - subscribe_and_save_for_display
                                - type: 'null'
                            subscription_only:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_interval:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_interval_unit:
                              type:
                                - string
                                - 'null'
                              example: month
                            subscription_price:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 10.5
                            subscription_price_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $10.50
                            subscription_start:
                              type:
                                - string
                                - 'null'
                              example: '2025-02-12'
                            subscribe_and_save:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 2.99
                            subscribe_and_save_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $2.99
                            subscribe_and_save_for_display:
                              type:
                                - string
                                - 'null'
                              example: Subscribe and save $2.99
                            title:
                              type:
                                - string
                                - 'null'
                              example: Surcharge
                            product:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type: string
                                      example: Sample Product
                                    cv:
                                      type: integer
                                      example: 10
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/product.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/product.png
                                    price:
                                      type: string
                                      example: '29.99'
                                    price_in_currency:
                                      type: string
                                      example: $29.99
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    tax:
                                      type: string
                                      example: '2.99'
                                    tax_in_currency:
                                      type: string
                                      example: $2.99
                                - type: 'null'
                            variant:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: Sample Variant
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/sample.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/sample.png
                                    primary_image:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/primary.png
                                    price:
                                      type:
                                        - string
                                        - 'null'
                                      example: '34.44'
                                    price_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $34.44
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    options:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          title:
                                            type: string
                                            example: Size
                                          value:
                                            type: string
                                            example: XL
                                - type: 'null'
                            errors:
                              oneOf:
                                - type: 'null'
                                - type: array
                                  items:
                                    type: object
                                    example:
                                      country:
                                        - >-
                                          This product is not available for this
                                          country. Please change your country
                      ship_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      bill_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      shipping_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type: string
                            example: Standard Shipping
                      available_shipping_methods:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            title:
                              type: string
                              example: Standard Shipping
                            price:
                              type:
                                - number
                                - string
                              example: 5.99
                            price_label:
                              type: string
                              example: $5.99
                            delivery_time_estimate:
                              type: string
                              example: 3-5 business days
                      available_payment_methods:
                        type: array
                        items:
                          oneOf:
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - credit_card
                                name:
                                  type: string
                                  example: Credit Card
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                                apple_pay:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method supports
                                    ApplePay or not 
                                bogus_gateway:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is a Bogus
                                    instance or not.
                                tokenize_path:
                                  type:
                                    - string
                                    - 'null'
                                  description: Path to tokenize, if applicable.
                                token_provider:
                                  type: string
                                  enum:
                                    - spreedly
                                    - vgs
                                  description: >-
                                    Determines if payment tokenization is via
                                    spreedly or VGS
                                apple_pay_merchant_identifier:
                                  type:
                                    - string
                                    - 'null'
                                  example: merchant.mycompany.com
                                  description: >-
                                    If ApplePay is supported, returns the
                                    merchant identifier registered with Apple,
                                    else returns nil
                                supported_brands:
                                  type: array
                                  items:
                                    type: string
                                  example:
                                    - visa
                                    - master
                                    - american_express
                                    - discover
                              required:
                                - id
                                - type
                                - name
                                - supported_brands
                                - test
                                - sandbox
                                - apple_pay
                                - apple_pay_merchant_identifier
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - klarna
                                name:
                                  type: string
                                  example: Klarna
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                      country:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          iso:
                            type: string
                            example: US
                          name:
                            type: string
                            example: United States
                          province_required:
                            type: boolean
                            example: false
                      type:
                        type: string
                        enum:
                          - regular
                          - enrollment
                        example: regular
                      enrollment_pack_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      enrollment_pack:
                        type:
                          - object
                          - 'null'
                        properties:
                          enrollment_pack_id:
                            type: integer
                            example: 1
                          additional_volume:
                            type:
                              - integer
                              - 'null'
                            example: 10
                          description:
                            type:
                              - object
                              - 'null'
                              - string
                            properties:
                              id:
                                type: integer
                                example: 111
                              name:
                                type: string
                                example: description
                              body:
                                type: string
                                example: >-
                                  <div>Try the latest and greatest of our sugar
                                  zip packs. Guaranteed to make you skinner and
                                  cure cancer.</div>
                              record_type:
                                type: string
                                example: EnrollmentPack
                              record_id:
                                type: integer
                                example: 1
                              created_at:
                                type: string
                                format: date_time
                                example: '2025-01-16T04:22:43.809Z'
                              updated_at:
                                type: string
                                format: date_time
                                example: '2025-01-22T10:23:52.941Z'
                              locale:
                                type: string
                                example: en
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: 10
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.00
                          images:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 2
                                relateable_type:
                                  type: string
                                  example: EnrollmentPack
                                relateable_id:
                                  type: integer
                                  example: 1
                                image_url:
                                  type: string
                                  example: >-
                                    https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                image_path:
                                  type: string
                                  example: jITWaU14QGe0y5AFgY7P_00179.svg
                                position:
                                  type: integer
                                  example: 1
                                shopify_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                                created_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                updated_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                external_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 625
                                allow_subscription:
                                  type: boolean
                                  example: true
                                cv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                cv_in_currency:
                                  type: string
                                  example: $0.00
                                enrollment:
                                  type: boolean
                                  example: true
                                enrollment_pack_id:
                                  type: integer
                                  example: 1
                                price:
                                  type: string
                                  example: '11.13'
                                price_in_currency:
                                  type: string
                                  example: $11.13
                                product_title:
                                  type: string
                                  example: Zip Pack Sample Pack (30)
                                quantity:
                                  type: integer
                                  example: 1
                                qv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                qv_in_currency:
                                  type: string
                                  example: $0.00
                                subscribe_and_save:
                                  type:
                                    - string
                                    - 'null'
                                  example: '-1988.87'
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $-1,988.87
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $-1,988.87
                                subscription:
                                  type: boolean
                                  example: false
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_only:
                                  type: boolean
                                  example: false
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_price:
                                  type: string
                                  example: '2000.0'
                                subscription_price_in_currency:
                                  type: string
                                  example: $2,000.00
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                  example: '2025-02-28'
                                tax:
                                  type: string
                                  example: '0.0'
                                tax_in_currency:
                                  type: string
                                  example: $0.00
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: null
                                display_to_customer:
                                  type: boolean
                                  example: false
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          price:
                            type:
                              - string
                              - integer
                            example: 11.13
                          price_in_currency:
                            type: string
                            example: $11.13
                          subscription_price:
                            type:
                              - string
                              - integer
                            example: 2000
                          subscription_price_in_currency:
                            type: string
                            example: $2,000.00
                          title:
                            type: string
                            example: enroll product
                          token:
                            type: string
                            example: NxL22AqLRRisfyF9LqxxWRak
                      recurring:
                        oneOf:
                          - type: array
                            items:
                              type: object
                              properties:
                                subtotal:
                                  type: string
                                  example: '10.0'
                                subtotal_in_currency:
                                  type: string
                                  example: $10.0
                                interval:
                                  type: integer
                                  example: 1
                                interval_unit:
                                  type: string
                                  example: month
                                subtotal_for_display:
                                  type: string
                                  example: $10.00 every 1 month
                                start_date:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-05-27'
                          - type: 'null'
                        default:
                          - subtotal: '10.0'
                            subtotal_in_currency: $10.0
                            interval: 1
                            interval_unit: month
                            subtotal_for_display: $10.00 every 1 month
                            start_date: '2025-05-27'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      checkout_url:
                        type: string
                        example: https://checkout.fluid.com/checkout?jwt=abc123
                      shop_url:
                        type: string
                        example: https://myco.fluid.app
        '400':
          description: no cart item specified
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: No cart item specified
        '404':
          description: item id not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Cart item not found
        '410':
          description: cart is in authorized enrollment state
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Cart is in authorized state and cannot be modified
                  errors:
                    type: object
                    example:
                      cart:
                        - is in authorized state and cannot be modified
                  meta:
                    type: object
                    properties:
                      shop_url:
                        type: string
                        example: https://example.myshopify.com
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      cart:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 123
                          state:
                            type: string
                            example: start
                          processed:
                            type: boolean
                            example: false
                            description: >-
                              Determines if a cart payment has been processed or
                              not.
                          valid_for_checkout:
                            type: boolean
                            example: true
                          buyer_rep_id:
                            type:
                              - integer
                              - 'null'
                            example: 1
                          currency_symbol:
                            type: string
                            example: $
                          currency_code:
                            type: string
                            example: USD
                          shipping_total_for_display:
                            type: string
                            example: Free
                          phone:
                            type:
                              - string
                              - 'null'
                            example: '4035551212'
                          payment_method_auto_assignable:
                            type: boolean
                            example: true
                            description: >-
                              Determines if a payment method can be
                              auto-assigned to the cart.
                          attribution:
                            oneOf:
                              - type: object
                                oneOf:
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      share_guid:
                                        type: string
                                        example: james-bond007
                                    required:
                                      - id
                                      - share_guid
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      email:
                                        type: string
                                        example: james.bond@gmail.com
                                    required:
                                      - id
                                      - email
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      username:
                                        type: string
                                        example: jaamball234
                                    required:
                                      - id
                                      - username
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      fluid_rep_id:
                                        type: integer
                                        example: 23493
                                    required:
                                      - id
                                      - fluid_rep_id
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      external_id:
                                        type:
                                          - string
                                          - 'null'
                                        example: w3sdf92
                                    required:
                                      - id
                              - type: 'null'
                            default:
                              id: 456
                              share_guid: james-bond007
                          agreements:
                            type: array
                            items:
                              type:
                                - object
                                - 'null'
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                required:
                                  type: boolean
                                  example: true
                                title:
                                  type: string
                                  example: Terms and Conditions
                                show_path:
                                  type: string
                                  example: /terms
                                enrollment_pack_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                          amount_total:
                            type: string
                            example: '121.65'
                          amount_total_in_currency:
                            type: string
                            example: $121.65 (USD)
                          sub_total:
                            type: string
                            example: '100.00'
                          sub_total_in_currency:
                            type: string
                            example: $100.00 (USD)
                          tax_total:
                            type: string
                            example: '20.00'
                          tax_total_in_currency:
                            type: string
                            example: $20.00 (USD)
                          shipping_total:
                            type: string
                            example: '1.65'
                          shipping_total_in_currency:
                            type: string
                            example: $1.65 (USD)
                          discount_total:
                            type: string
                            example: '2.99'
                          discount_total_in_currency:
                            type: string
                            example: $2.99 (USD)
                          transaction_fee:
                            type:
                              - number
                              - string
                            example: '1.90'
                          transaction_fee_in_currency:
                            type: string
                            example: $1.90 (USD)
                          cv_total:
                            type: integer
                            example: 10
                          qv_total:
                            type: integer
                            example: 15
                          company:
                            type: object
                            properties:
                              id:
                                type: integer
                              name:
                                type: string
                              primary_domain_hostname:
                                type:
                                  - string
                                  - 'null'
                                example: fluid.com
                              subdomain:
                                type:
                                  - string
                                  - 'null'
                                example: myco
                              logo_url:
                                type:
                                  - string
                                  - 'null'
                                example: https://example.com/logo.png
                              fluid_shop:
                                type:
                                  - string
                                  - 'null'
                                example: https://fluid-sample-shop.fluid.com
                              collect_phone:
                                type: boolean
                                example: true
                              require_phone:
                                type: boolean
                                example: false
                              require_billing_zip:
                                type: boolean
                                example: false
                              checkout_primary_button_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#000000'
                              checkout_primary_text_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#FFFFFF'
                              checkout_secondary_button_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#FFFFFF'
                              checkout_secondary_text_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#000000'
                          payment_method:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              cart_type:
                                type: string
                                example: credit_card
                              last_four:
                                type: string
                                example: '1234'
                              exp_month:
                                type: integer
                                example: 12
                              exp_year:
                                type: integer
                                example: 2025
                              logo_url:
                                type: string
                                example: https://example.com/image.svg
                          email:
                            type:
                              - string
                              - 'null'
                            example: user@example.com
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: '10.45'
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.45
                          discount_code:
                            type:
                              - string
                              - 'null'
                            example: DISCOUNT10
                          language_iso:
                            type:
                              - string
                              - 'null'
                            example: en
                          cart_token:
                            type: string
                            example: abc123
                          immutable_items:
                            type: boolean
                            example: false
                          digital_only:
                            type: boolean
                            example: false
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 101
                                price:
                                  type: string
                                  example: '43.41'
                                price_in_currency:
                                  type: string
                                  example: $43.41
                                tax:
                                  type: string
                                  example: '2.99'
                                tax_in_currency:
                                  type: string
                                  example: $2.99
                                cv:
                                  type: integer
                                  example: 5
                                qv:
                                  type: integer
                                  example: 7
                                discount_amount:
                                  type: string
                                  example: '10'
                                discount_amount_in_currency:
                                  type: string
                                  example: $10.00
                                enrollment_pack_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                display_to_customer:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                product_title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Sample Product
                                quantity:
                                  type: integer
                                  example: 3
                                subscription:
                                  type: boolean
                                  example: true
                                enrollment:
                                  type: boolean
                                  example: false
                                allow_subscription:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_only:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_price:
                                  type:
                                    - number
                                    - string
                                    - 'null'
                                  example: 10.5
                                subscription_price_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $10.50
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-02-12'
                                subscribe_and_save:
                                  type:
                                    - number
                                    - string
                                    - 'null'
                                  example: 2.99
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $2.99
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $2.99
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Surcharge
                                product:
                                  oneOf:
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 1
                                        title:
                                          type: string
                                          example: Sample Product
                                        cv:
                                          type: integer
                                          example: 10
                                        image_path:
                                          type:
                                            - string
                                            - 'null'
                                          example: /images/product.png
                                        image_url:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/product.png
                                        price:
                                          type: string
                                          example: '29.99'
                                        price_in_currency:
                                          type: string
                                          example: $29.99
                                        sku:
                                          type:
                                            - string
                                            - 'null'
                                          example: SKU12345
                                        tax:
                                          type: string
                                          example: '2.99'
                                        tax_in_currency:
                                          type: string
                                          example: $2.99
                                    - type: 'null'
                                variant:
                                  oneOf:
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 1
                                        title:
                                          type:
                                            - string
                                            - 'null'
                                          example: Sample Variant
                                        image_path:
                                          type:
                                            - string
                                            - 'null'
                                          example: /images/sample.png
                                        image_url:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/sample.png
                                        primary_image:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/primary.png
                                        price:
                                          type:
                                            - string
                                            - 'null'
                                          example: '34.44'
                                        price_in_currency:
                                          type:
                                            - string
                                            - 'null'
                                          example: $34.44
                                        sku:
                                          type:
                                            - string
                                            - 'null'
                                          example: SKU12345
                                        options:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              title:
                                                type: string
                                                example: Size
                                              value:
                                                type: string
                                                example: XL
                                    - type: 'null'
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          ship_to:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          bill_to:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          shipping_method:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type: string
                                example: Standard Shipping
                          available_shipping_methods:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type: string
                                  example: Standard Shipping
                                price:
                                  type:
                                    - number
                                    - string
                                  example: 5.99
                                price_label:
                                  type: string
                                  example: $5.99
                                delivery_time_estimate:
                                  type: string
                                  example: 3-5 business days
                          available_payment_methods:
                            type: array
                            items:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1337
                                    type:
                                      type: string
                                      enum:
                                        - credit_card
                                    name:
                                      type: string
                                      example: Credit Card
                                    test:
                                      type: boolean
                                      example: true
                                      description: >-
                                        Determines if payment method is test
                                        instance or not. By default, set to
                                        `true`
                                    sandbox:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is sandbox
                                        instance or not. By default, set to
                                        `false`
                                    apple_pay:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method supports
                                        ApplePay or not 
                                    bogus_gateway:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is a Bogus
                                        instance or not.
                                    tokenize_path:
                                      type:
                                        - string
                                        - 'null'
                                      description: Path to tokenize, if applicable.
                                    token_provider:
                                      type: string
                                      enum:
                                        - spreedly
                                        - vgs
                                      description: >-
                                        Determines if payment tokenization is
                                        via spreedly or VGS
                                    apple_pay_merchant_identifier:
                                      type:
                                        - string
                                        - 'null'
                                      example: merchant.mycompany.com
                                      description: >-
                                        If ApplePay is supported, returns the
                                        merchant identifier registered with
                                        Apple, else returns nil
                                    supported_brands:
                                      type: array
                                      items:
                                        type: string
                                      example:
                                        - visa
                                        - master
                                        - american_express
                                        - discover
                                  required:
                                    - id
                                    - type
                                    - name
                                    - supported_brands
                                    - test
                                    - sandbox
                                    - apple_pay
                                    - apple_pay_merchant_identifier
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1337
                                    type:
                                      type: string
                                      enum:
                                        - klarna
                                    name:
                                      type: string
                                      example: Klarna
                                    test:
                                      type: boolean
                                      example: true
                                      description: >-
                                        Determines if payment method is test
                                        instance or not. By default, set to
                                        `true`
                                    sandbox:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is sandbox
                                        instance or not. By default, set to
                                        `false`
                          country:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              iso:
                                type: string
                                example: US
                              name:
                                type: string
                                example: United States
                              province_required:
                                type: boolean
                                example: false
                          type:
                            type: string
                            enum:
                              - regular
                              - enrollment
                            example: regular
                          enrollment_pack_id:
                            type:
                              - integer
                              - 'null'
                            example: 1
                          enrollment_pack:
                            type:
                              - object
                              - 'null'
                            properties:
                              enrollment_pack_id:
                                type: integer
                                example: 1
                              additional_volume:
                                type:
                                  - integer
                                  - 'null'
                                example: 10
                              description:
                                type:
                                  - object
                                  - 'null'
                                  - string
                                properties:
                                  id:
                                    type: integer
                                    example: 111
                                  name:
                                    type: string
                                    example: description
                                  body:
                                    type: string
                                    example: >-
                                      <div>Try the latest and greatest of our
                                      sugar zip packs. Guaranteed to make you
                                      skinner and cure cancer.</div>
                                  record_type:
                                    type: string
                                    example: EnrollmentPack
                                  record_id:
                                    type: integer
                                    example: 1
                                  created_at:
                                    type: string
                                    format: date_time
                                    example: '2025-01-16T04:22:43.809Z'
                                  updated_at:
                                    type: string
                                    format: date_time
                                    example: '2025-01-22T10:23:52.941Z'
                                  locale:
                                    type: string
                                    example: en
                              enrollment_fee:
                                type:
                                  - number
                                  - string
                                example: 10
                              enrollment_fee_in_currency:
                                type: string
                                example: $10.00
                              images:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 2
                                    relateable_type:
                                      type: string
                                      example: EnrollmentPack
                                    relateable_id:
                                      type: integer
                                      example: 1
                                    image_url:
                                      type: string
                                      example: >-
                                        https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                    image_path:
                                      type: string
                                      example: jITWaU14QGe0y5AFgY7P_00179.svg
                                    position:
                                      type: integer
                                      example: 1
                                    shopify_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: null
                                    created_at:
                                      type: string
                                      format: date_time
                                      example: '2025-01-16T04:22:44.870Z'
                                    updated_at:
                                      type: string
                                      format: date_time
                                      example: '2025-01-16T04:22:44.870Z'
                                    external_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: null
                              items:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 625
                                    allow_subscription:
                                      type: boolean
                                      example: true
                                    cv:
                                      type:
                                        - number
                                        - string
                                      example: 0
                                    cv_in_currency:
                                      type: string
                                      example: $0.00
                                    enrollment:
                                      type: boolean
                                      example: true
                                    enrollment_pack_id:
                                      type: integer
                                      example: 1
                                    price:
                                      type: string
                                      example: '11.13'
                                    price_in_currency:
                                      type: string
                                      example: $11.13
                                    product_title:
                                      type: string
                                      example: Zip Pack Sample Pack (30)
                                    quantity:
                                      type: integer
                                      example: 1
                                    qv:
                                      type:
                                        - number
                                        - string
                                      example: 0
                                    qv_in_currency:
                                      type: string
                                      example: $0.00
                                    subscribe_and_save:
                                      type:
                                        - string
                                        - 'null'
                                      example: '-1988.87'
                                    subscribe_and_save_for_display:
                                      type:
                                        - string
                                        - 'null'
                                      example: Subscribe and save $-1,988.87
                                    subscribe_and_save_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $-1,988.87
                                    subscription:
                                      type: boolean
                                      example: false
                                    subscription_interval:
                                      type:
                                        - integer
                                        - 'null'
                                      example: 1
                                    subscription_interval_unit:
                                      type:
                                        - string
                                        - 'null'
                                      example: month
                                    subscription_only:
                                      type: boolean
                                      example: false
                                    subscription_plan_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: 1
                                    subscription_plans:
                                      oneOf:
                                        - type: array
                                          items:
                                            title: Commerce::SubscriptionPlan
                                            type: object
                                            properties:
                                              id:
                                                type: integer
                                              name:
                                                example: Test Subscription Plan
                                                type: string
                                              billing_interval:
                                                example: 1
                                                type: integer
                                                default: 1
                                                minimum: 1
                                              billing_interval_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type: string
                                                default: month
                                              shipping_interval:
                                                example: 1
                                                type: integer
                                                default: 1
                                                minimum: 1
                                              shipping_interval_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type: string
                                                default: month
                                              trial_period:
                                                example: 1
                                                type:
                                                  - integer
                                                  - 'null'
                                                minimum: 1
                                              trial_period_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type:
                                                  - string
                                                  - 'null'
                                              split_volume:
                                                example: true
                                                type: boolean
                                                default: false
                                              max_quantity:
                                                example: 100
                                                type:
                                                  - integer
                                                  - 'null'
                                                minimum: 1
                                              company_default:
                                                example: false
                                                type:
                                                  - boolean
                                                  - 'null'
                                                default: false
                                              products_count:
                                                example: 10
                                                type:
                                                  - integer
                                                  - 'null'
                                              subscribers_count:
                                                example: 10
                                                type:
                                                  - integer
                                                  - 'null'
                                              price:
                                                type: string
                                              price_in_currency:
                                                type: string
                                              subscription_start:
                                                type: string
                                              subscribe_and_save:
                                                type: string
                                              subscribe_and_save_in_currency:
                                                type: string
                                              subscribe_and_save_for_display:
                                                type: string
                                            required:
                                              - id
                                              - name
                                              - billing_interval
                                              - billing_interval_unit
                                              - shipping_interval
                                              - shipping_interval_unit
                                              - split_volume
                                              - price
                                              - price_in_currency
                                              - subscription_start
                                              - subscribe_and_save
                                              - subscribe_and_save_in_currency
                                              - subscribe_and_save_for_display
                                        - type: 'null'
                                    subscription_price:
                                      type: string
                                      example: '2000.0'
                                    subscription_price_in_currency:
                                      type: string
                                      example: $2,000.00
                                    subscription_start:
                                      type:
                                        - string
                                        - 'null'
                                      format: date
                                      example: '2025-02-28'
                                    tax:
                                      type: string
                                      example: '0.0'
                                    tax_in_currency:
                                      type: string
                                      example: $0.00
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: null
                                    display_to_customer:
                                      type: boolean
                                      example: false
                                    errors:
                                      oneOf:
                                        - type: 'null'
                                        - type: array
                                          items:
                                            type: object
                                            example:
                                              country:
                                                - >-
                                                  This product is not available for this
                                                  country. Please change your country
                              price:
                                type:
                                  - string
                                  - integer
                                example: 11.13
                              price_in_currency:
                                type: string
                                example: $11.13
                              subscription_price:
                                type:
                                  - string
                                  - integer
                                example: 2000
                              subscription_price_in_currency:
                                type: string
                                example: $2,000.00
                              title:
                                type: string
                                example: enroll product
                              token:
                                type: string
                                example: NxL22AqLRRisfyF9LqxxWRak
                          recurring:
                            oneOf:
                              - type: array
                                items:
                                  type: object
                                  properties:
                                    subtotal:
                                      type: string
                                      example: '10.0'
                                    subtotal_in_currency:
                                      type: string
                                      example: $10.0
                                    interval:
                                      type: integer
                                      example: 1
                                    interval_unit:
                                      type: string
                                      example: month
                                    subtotal_for_display:
                                      type: string
                                      example: $10.00 every 1 month
                                    start_date:
                                      type:
                                        - string
                                        - 'null'
                                      example: '2025-05-27'
                              - type: 'null'
                            default:
                              - subtotal: '10.0'
                                subtotal_in_currency: $10.0
                                interval: 1
                                interval_unit: month
                                subtotal_for_display: $10.00 every 1 month
                                start_date: '2025-05-27'
                required:
                  - error_message
                  - errors
                  - meta
        '422':
          description: cannot remove item from cart if immutable items is true
  /api/carts/{cart_token}/enroll:
    get:
      summary: Retrieves enroll for cart
      tags:
        - Carts
      operationId: getCartEnrollFields
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
        - name: placement
          in: query
          required: false
          schema:
            type: string
            enum:
              - pre_purchase
              - post_purchase
              - all
            default: all
      responses:
        '200':
          description: enroll fields found
          content:
            application/json:
              schema:
                type: object
                properties:
                  enroll:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      active:
                        type: boolean
                        example: true
                      default:
                        type: boolean
                        example: false
                      title:
                        type: string
                        example: Customer Details
                      fields:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 2
                            type:
                              type: string
                              example: text
                            metadata:
                              type:
                                - string
                                - 'null'
                              example: >-
                                {"element_type":"input","label":"Phone
                                Number","field_data_value":"","required":true,"auto_translate":true,"is_form_field":true,"targetIndex":0}]
                            title:
                              type: string
                              example: Email
                            position:
                              type: integer
                              example: 0
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '404':
          description: enroll not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Enroll not found
                  errors:
                    type: object
                    example:
                      enroll:
                        - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
  /api/carts/{cart_token}/payment_methods/{type}:
    post:
      summary: Sets cart payment method
      tags:
        - Carts
      operationId: setCartPaymentMethod
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
        - name: type
          in: path
          required: true
          description: Type of payment method
          schema:
            type: string
            enum:
              - credit_card
        - name: jwt
          in: query
          required: false
          description: >-
            JWT token to authenticate (Optional, if payment method id is not
            provided)
          schema:
            type: string
        - name: payment_method_id
          in: query
          required: false
          description: Payment Method id (Optional)
          schema:
            type: integer
      responses:
        '201':
          description: payment method added
          content:
            application/json:
              schema:
                type: object
                properties:
                  card:
                    type: object
                    properties:
                      user_id:
                        type:
                          - string
                          - 'null'
                        example: '123'
                      spreedly_token:
                        type: string
                        example: 01JKFTVM6Z44YFPSS9KK36KMSV
                      full_name:
                        type: string
                        example: John Doe
                      month:
                        type: integer
                        example: 3
                      year:
                        type: integer
                        example: 2032
                      number:
                        type: string
                        example: XXXX-XXXX-XXXX-4444
                      last_four_digits:
                        type: string
                        example: '4444'
                      first_six_digits:
                        type:
                          - string
                          - 'null'
                        example: '555555'
                      card_type:
                        type: string
                        example: master
                      address_id:
                        type:
                          - string
                          - 'null'
                        example: '123'
                      fingerprint:
                        type:
                          - string
                          - 'null'
                        example: 6eb05c4c7fc52fec38ef6e0651e8225be41c
                      default:
                        type: boolean
                        example: false
                      active:
                        type: boolean
                        example: true
                      created_at:
                        type: string
                        format: date-time
                        example: '2021-01-01T00:00:00Z'
                      updated_at:
                        type: string
                        format: date-time
                        example: '2021-01-01T00:00:00Z'
                      fluid:
                        type: boolean
                        example: true
                      test:
                        type:
                          - boolean
                          - 'null'
                        example: true
                      email:
                        type:
                          - string
                          - 'null'
                        example: john@example.com
                      customer_id:
                        type:
                          - string
                          - 'null'
                        example: '123'
                      fluid_pay_account_id:
                        type:
                          - string
                          - 'null'
                        example: '123'
                required:
                  - card
        '404':
          description: cart not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                      example:
                        - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '410':
          description: Cart is processed and cannot be modified
        '422':
          description: invalid payment method
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - payment_method
              properties:
                billing_postal_code:
                  type: string
                  description: Billing postal code
                  example: '123'
                payment_method:
                  type: object
                  properties:
                    token:
                      type: string
                      description: Payment method token from Spreedly
                    last_four:
                      type: string
                      description: Last 4 digits of credit card
                    card_type:
                      type: string
                      description: Type of credit card (visa, mastercard, etc)
                    exp_month:
                      type: string
                      description: Expiration month (MM)
                    exp_year:
                      type: string
                      description: Expiration year (YYYY)
        required: true
  /api/carts/{cart_token}/shipping_method:
    post:
      summary: Sets cart shipping method
      tags:
        - Carts
      operationId: setCartShippingMethod
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: shipping method set
          content:
            application/json:
              schema:
                type: object
                properties:
                  cart:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123
                      state:
                        type: string
                        example: start
                      processed:
                        type: boolean
                        example: false
                        description: >-
                          Determines if a cart payment has been processed or
                          not.
                      valid_for_checkout:
                        type: boolean
                        example: true
                      buyer_rep_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      currency_symbol:
                        type: string
                        example: $
                      currency_code:
                        type: string
                        example: USD
                      shipping_total_for_display:
                        type: string
                        example: Free
                      phone:
                        type:
                          - string
                          - 'null'
                        example: '4035551212'
                      payment_method_auto_assignable:
                        type: boolean
                        example: true
                        description: >-
                          Determines if a payment method can be auto-assigned to
                          the cart.
                      attribution:
                        oneOf:
                          - type: object
                            oneOf:
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  share_guid:
                                    type: string
                                    example: james-bond007
                                required:
                                  - id
                                  - share_guid
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  email:
                                    type: string
                                    example: james.bond@gmail.com
                                required:
                                  - id
                                  - email
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  username:
                                    type: string
                                    example: jaamball234
                                required:
                                  - id
                                  - username
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  fluid_rep_id:
                                    type: integer
                                    example: 23493
                                required:
                                  - id
                                  - fluid_rep_id
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  external_id:
                                    type:
                                      - string
                                      - 'null'
                                    example: w3sdf92
                                required:
                                  - id
                          - type: 'null'
                        default:
                          id: 456
                          share_guid: james-bond007
                      agreements:
                        type: array
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                              example: 1
                            required:
                              type: boolean
                              example: true
                            title:
                              type: string
                              example: Terms and Conditions
                            show_path:
                              type: string
                              example: /terms
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                      amount_total:
                        type: string
                        example: '121.65'
                      amount_total_in_currency:
                        type: string
                        example: $121.65 (USD)
                      sub_total:
                        type: string
                        example: '100.00'
                      sub_total_in_currency:
                        type: string
                        example: $100.00 (USD)
                      tax_total:
                        type: string
                        example: '20.00'
                      tax_total_in_currency:
                        type: string
                        example: $20.00 (USD)
                      shipping_total:
                        type: string
                        example: '1.65'
                      shipping_total_in_currency:
                        type: string
                        example: $1.65 (USD)
                      discount_total:
                        type: string
                        example: '2.99'
                      discount_total_in_currency:
                        type: string
                        example: $2.99 (USD)
                      transaction_fee:
                        type:
                          - number
                          - string
                        example: '1.90'
                      transaction_fee_in_currency:
                        type: string
                        example: $1.90 (USD)
                      cv_total:
                        type: integer
                        example: 10
                      qv_total:
                        type: integer
                        example: 15
                      company:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          primary_domain_hostname:
                            type:
                              - string
                              - 'null'
                            example: fluid.com
                          subdomain:
                            type:
                              - string
                              - 'null'
                            example: myco
                          logo_url:
                            type:
                              - string
                              - 'null'
                            example: https://example.com/logo.png
                          fluid_shop:
                            type:
                              - string
                              - 'null'
                            example: https://fluid-sample-shop.fluid.com
                          collect_phone:
                            type: boolean
                            example: true
                          require_phone:
                            type: boolean
                            example: false
                          require_billing_zip:
                            type: boolean
                            example: false
                          checkout_primary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                          checkout_primary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                      payment_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          cart_type:
                            type: string
                            example: credit_card
                          last_four:
                            type: string
                            example: '1234'
                          exp_month:
                            type: integer
                            example: 12
                          exp_year:
                            type: integer
                            example: 2025
                          logo_url:
                            type: string
                            example: https://example.com/image.svg
                      email:
                        type:
                          - string
                          - 'null'
                        example: user@example.com
                      enrollment_fee:
                        type:
                          - number
                          - string
                        example: '10.45'
                      enrollment_fee_in_currency:
                        type: string
                        example: $10.45
                      discount_code:
                        type:
                          - string
                          - 'null'
                        example: DISCOUNT10
                      language_iso:
                        type:
                          - string
                          - 'null'
                        example: en
                      cart_token:
                        type: string
                        example: abc123
                      immutable_items:
                        type: boolean
                        example: false
                      digital_only:
                        type: boolean
                        example: false
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 101
                            price:
                              type: string
                              example: '43.41'
                            price_in_currency:
                              type: string
                              example: $43.41
                            tax:
                              type: string
                              example: '2.99'
                            tax_in_currency:
                              type: string
                              example: $2.99
                            cv:
                              type: integer
                              example: 5
                            qv:
                              type: integer
                              example: 7
                            discount_amount:
                              type: string
                              example: '10'
                            discount_amount_in_currency:
                              type: string
                              example: $10.00
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            display_to_customer:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            product_title:
                              type:
                                - string
                                - 'null'
                              example: Sample Product
                            quantity:
                              type: integer
                              example: 3
                            subscription:
                              type: boolean
                              example: true
                            enrollment:
                              type: boolean
                              example: false
                            allow_subscription:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_plan_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_plans:
                              oneOf:
                                - type: array
                                  items:
                                    title: Commerce::SubscriptionPlan
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      name:
                                        example: Test Subscription Plan
                                        type: string
                                      billing_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      billing_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      shipping_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      shipping_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      trial_period:
                                        example: 1
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      trial_period_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type:
                                          - string
                                          - 'null'
                                      split_volume:
                                        example: true
                                        type: boolean
                                        default: false
                                      max_quantity:
                                        example: 100
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      company_default:
                                        example: false
                                        type:
                                          - boolean
                                          - 'null'
                                        default: false
                                      products_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      subscribers_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      price:
                                        type: string
                                      price_in_currency:
                                        type: string
                                      subscription_start:
                                        type: string
                                      subscribe_and_save:
                                        type: string
                                      subscribe_and_save_in_currency:
                                        type: string
                                      subscribe_and_save_for_display:
                                        type: string
                                    required:
                                      - id
                                      - name
                                      - billing_interval
                                      - billing_interval_unit
                                      - shipping_interval
                                      - shipping_interval_unit
                                      - split_volume
                                      - price
                                      - price_in_currency
                                      - subscription_start
                                      - subscribe_and_save
                                      - subscribe_and_save_in_currency
                                      - subscribe_and_save_for_display
                                - type: 'null'
                            subscription_only:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_interval:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_interval_unit:
                              type:
                                - string
                                - 'null'
                              example: month
                            subscription_price:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 10.5
                            subscription_price_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $10.50
                            subscription_start:
                              type:
                                - string
                                - 'null'
                              example: '2025-02-12'
                            subscribe_and_save:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 2.99
                            subscribe_and_save_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $2.99
                            subscribe_and_save_for_display:
                              type:
                                - string
                                - 'null'
                              example: Subscribe and save $2.99
                            title:
                              type:
                                - string
                                - 'null'
                              example: Surcharge
                            product:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type: string
                                      example: Sample Product
                                    cv:
                                      type: integer
                                      example: 10
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/product.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/product.png
                                    price:
                                      type: string
                                      example: '29.99'
                                    price_in_currency:
                                      type: string
                                      example: $29.99
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    tax:
                                      type: string
                                      example: '2.99'
                                    tax_in_currency:
                                      type: string
                                      example: $2.99
                                - type: 'null'
                            variant:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: Sample Variant
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/sample.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/sample.png
                                    primary_image:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/primary.png
                                    price:
                                      type:
                                        - string
                                        - 'null'
                                      example: '34.44'
                                    price_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $34.44
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    options:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          title:
                                            type: string
                                            example: Size
                                          value:
                                            type: string
                                            example: XL
                                - type: 'null'
                            errors:
                              oneOf:
                                - type: 'null'
                                - type: array
                                  items:
                                    type: object
                                    example:
                                      country:
                                        - >-
                                          This product is not available for this
                                          country. Please change your country
                      ship_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      bill_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      shipping_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type: string
                            example: Standard Shipping
                      available_shipping_methods:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            title:
                              type: string
                              example: Standard Shipping
                            price:
                              type:
                                - number
                                - string
                              example: 5.99
                            price_label:
                              type: string
                              example: $5.99
                            delivery_time_estimate:
                              type: string
                              example: 3-5 business days
                      available_payment_methods:
                        type: array
                        items:
                          oneOf:
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - credit_card
                                name:
                                  type: string
                                  example: Credit Card
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                                apple_pay:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method supports
                                    ApplePay or not 
                                bogus_gateway:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is a Bogus
                                    instance or not.
                                tokenize_path:
                                  type:
                                    - string
                                    - 'null'
                                  description: Path to tokenize, if applicable.
                                token_provider:
                                  type: string
                                  enum:
                                    - spreedly
                                    - vgs
                                  description: >-
                                    Determines if payment tokenization is via
                                    spreedly or VGS
                                apple_pay_merchant_identifier:
                                  type:
                                    - string
                                    - 'null'
                                  example: merchant.mycompany.com
                                  description: >-
                                    If ApplePay is supported, returns the
                                    merchant identifier registered with Apple,
                                    else returns nil
                                supported_brands:
                                  type: array
                                  items:
                                    type: string
                                  example:
                                    - visa
                                    - master
                                    - american_express
                                    - discover
                              required:
                                - id
                                - type
                                - name
                                - supported_brands
                                - test
                                - sandbox
                                - apple_pay
                                - apple_pay_merchant_identifier
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - klarna
                                name:
                                  type: string
                                  example: Klarna
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                      country:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          iso:
                            type: string
                            example: US
                          name:
                            type: string
                            example: United States
                          province_required:
                            type: boolean
                            example: false
                      type:
                        type: string
                        enum:
                          - regular
                          - enrollment
                        example: regular
                      enrollment_pack_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      enrollment_pack:
                        type:
                          - object
                          - 'null'
                        properties:
                          enrollment_pack_id:
                            type: integer
                            example: 1
                          additional_volume:
                            type:
                              - integer
                              - 'null'
                            example: 10
                          description:
                            type:
                              - object
                              - 'null'
                              - string
                            properties:
                              id:
                                type: integer
                                example: 111
                              name:
                                type: string
                                example: description
                              body:
                                type: string
                                example: >-
                                  <div>Try the latest and greatest of our sugar
                                  zip packs. Guaranteed to make you skinner and
                                  cure cancer.</div>
                              record_type:
                                type: string
                                example: EnrollmentPack
                              record_id:
                                type: integer
                                example: 1
                              created_at:
                                type: string
                                format: date_time
                                example: '2025-01-16T04:22:43.809Z'
                              updated_at:
                                type: string
                                format: date_time
                                example: '2025-01-22T10:23:52.941Z'
                              locale:
                                type: string
                                example: en
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: 10
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.00
                          images:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 2
                                relateable_type:
                                  type: string
                                  example: EnrollmentPack
                                relateable_id:
                                  type: integer
                                  example: 1
                                image_url:
                                  type: string
                                  example: >-
                                    https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                image_path:
                                  type: string
                                  example: jITWaU14QGe0y5AFgY7P_00179.svg
                                position:
                                  type: integer
                                  example: 1
                                shopify_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                                created_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                updated_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                external_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 625
                                allow_subscription:
                                  type: boolean
                                  example: true
                                cv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                cv_in_currency:
                                  type: string
                                  example: $0.00
                                enrollment:
                                  type: boolean
                                  example: true
                                enrollment_pack_id:
                                  type: integer
                                  example: 1
                                price:
                                  type: string
                                  example: '11.13'
                                price_in_currency:
                                  type: string
                                  example: $11.13
                                product_title:
                                  type: string
                                  example: Zip Pack Sample Pack (30)
                                quantity:
                                  type: integer
                                  example: 1
                                qv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                qv_in_currency:
                                  type: string
                                  example: $0.00
                                subscribe_and_save:
                                  type:
                                    - string
                                    - 'null'
                                  example: '-1988.87'
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $-1,988.87
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $-1,988.87
                                subscription:
                                  type: boolean
                                  example: false
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_only:
                                  type: boolean
                                  example: false
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_price:
                                  type: string
                                  example: '2000.0'
                                subscription_price_in_currency:
                                  type: string
                                  example: $2,000.00
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                  example: '2025-02-28'
                                tax:
                                  type: string
                                  example: '0.0'
                                tax_in_currency:
                                  type: string
                                  example: $0.00
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: null
                                display_to_customer:
                                  type: boolean
                                  example: false
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          price:
                            type:
                              - string
                              - integer
                            example: 11.13
                          price_in_currency:
                            type: string
                            example: $11.13
                          subscription_price:
                            type:
                              - string
                              - integer
                            example: 2000
                          subscription_price_in_currency:
                            type: string
                            example: $2,000.00
                          title:
                            type: string
                            example: enroll product
                          token:
                            type: string
                            example: NxL22AqLRRisfyF9LqxxWRak
                      recurring:
                        oneOf:
                          - type: array
                            items:
                              type: object
                              properties:
                                subtotal:
                                  type: string
                                  example: '10.0'
                                subtotal_in_currency:
                                  type: string
                                  example: $10.0
                                interval:
                                  type: integer
                                  example: 1
                                interval_unit:
                                  type: string
                                  example: month
                                subtotal_for_display:
                                  type: string
                                  example: $10.00 every 1 month
                                start_date:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-05-27'
                          - type: 'null'
                        default:
                          - subtotal: '10.0'
                            subtotal_in_currency: $10.0
                            interval: 1
                            interval_unit: month
                            subtotal_for_display: $10.00 every 1 month
                            start_date: '2025-05-27'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      checkout_url:
                        type: string
                        example: https://checkout.fluid.com/checkout?jwt=abc123
                      shop_url:
                        type: string
                        example: https://myco.fluid.app
        '410':
          description: cart is in authorized enrollment state
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Cart is in authorized state and cannot be modified
                  errors:
                    type: object
                    example:
                      cart:
                        - is in authorized state and cannot be modified
                  meta:
                    type: object
                    properties:
                      shop_url:
                        type: string
                        example: https://example.myshopify.com
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      cart:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 123
                          state:
                            type: string
                            example: start
                          processed:
                            type: boolean
                            example: false
                            description: >-
                              Determines if a cart payment has been processed or
                              not.
                          valid_for_checkout:
                            type: boolean
                            example: true
                          buyer_rep_id:
                            type:
                              - integer
                              - 'null'
                            example: 1
                          currency_symbol:
                            type: string
                            example: $
                          currency_code:
                            type: string
                            example: USD
                          shipping_total_for_display:
                            type: string
                            example: Free
                          phone:
                            type:
                              - string
                              - 'null'
                            example: '4035551212'
                          payment_method_auto_assignable:
                            type: boolean
                            example: true
                            description: >-
                              Determines if a payment method can be
                              auto-assigned to the cart.
                          attribution:
                            oneOf:
                              - type: object
                                oneOf:
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      share_guid:
                                        type: string
                                        example: james-bond007
                                    required:
                                      - id
                                      - share_guid
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      email:
                                        type: string
                                        example: james.bond@gmail.com
                                    required:
                                      - id
                                      - email
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      username:
                                        type: string
                                        example: jaamball234
                                    required:
                                      - id
                                      - username
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      fluid_rep_id:
                                        type: integer
                                        example: 23493
                                    required:
                                      - id
                                      - fluid_rep_id
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      external_id:
                                        type:
                                          - string
                                          - 'null'
                                        example: w3sdf92
                                    required:
                                      - id
                              - type: 'null'
                            default:
                              id: 456
                              share_guid: james-bond007
                          agreements:
                            type: array
                            items:
                              type:
                                - object
                                - 'null'
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                required:
                                  type: boolean
                                  example: true
                                title:
                                  type: string
                                  example: Terms and Conditions
                                show_path:
                                  type: string
                                  example: /terms
                                enrollment_pack_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                          amount_total:
                            type: string
                            example: '121.65'
                          amount_total_in_currency:
                            type: string
                            example: $121.65 (USD)
                          sub_total:
                            type: string
                            example: '100.00'
                          sub_total_in_currency:
                            type: string
                            example: $100.00 (USD)
                          tax_total:
                            type: string
                            example: '20.00'
                          tax_total_in_currency:
                            type: string
                            example: $20.00 (USD)
                          shipping_total:
                            type: string
                            example: '1.65'
                          shipping_total_in_currency:
                            type: string
                            example: $1.65 (USD)
                          discount_total:
                            type: string
                            example: '2.99'
                          discount_total_in_currency:
                            type: string
                            example: $2.99 (USD)
                          transaction_fee:
                            type:
                              - number
                              - string
                            example: '1.90'
                          transaction_fee_in_currency:
                            type: string
                            example: $1.90 (USD)
                          cv_total:
                            type: integer
                            example: 10
                          qv_total:
                            type: integer
                            example: 15
                          company:
                            type: object
                            properties:
                              id:
                                type: integer
                              name:
                                type: string
                              primary_domain_hostname:
                                type:
                                  - string
                                  - 'null'
                                example: fluid.com
                              subdomain:
                                type:
                                  - string
                                  - 'null'
                                example: myco
                              logo_url:
                                type:
                                  - string
                                  - 'null'
                                example: https://example.com/logo.png
                              fluid_shop:
                                type:
                                  - string
                                  - 'null'
                                example: https://fluid-sample-shop.fluid.com
                              collect_phone:
                                type: boolean
                                example: true
                              require_phone:
                                type: boolean
                                example: false
                              require_billing_zip:
                                type: boolean
                                example: false
                              checkout_primary_button_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#000000'
                              checkout_primary_text_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#FFFFFF'
                              checkout_secondary_button_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#FFFFFF'
                              checkout_secondary_text_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#000000'
                          payment_method:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              cart_type:
                                type: string
                                example: credit_card
                              last_four:
                                type: string
                                example: '1234'
                              exp_month:
                                type: integer
                                example: 12
                              exp_year:
                                type: integer
                                example: 2025
                              logo_url:
                                type: string
                                example: https://example.com/image.svg
                          email:
                            type:
                              - string
                              - 'null'
                            example: user@example.com
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: '10.45'
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.45
                          discount_code:
                            type:
                              - string
                              - 'null'
                            example: DISCOUNT10
                          language_iso:
                            type:
                              - string
                              - 'null'
                            example: en
                          cart_token:
                            type: string
                            example: abc123
                          immutable_items:
                            type: boolean
                            example: false
                          digital_only:
                            type: boolean
                            example: false
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 101
                                price:
                                  type: string
                                  example: '43.41'
                                price_in_currency:
                                  type: string
                                  example: $43.41
                                tax:
                                  type: string
                                  example: '2.99'
                                tax_in_currency:
                                  type: string
                                  example: $2.99
                                cv:
                                  type: integer
                                  example: 5
                                qv:
                                  type: integer
                                  example: 7
                                discount_amount:
                                  type: string
                                  example: '10'
                                discount_amount_in_currency:
                                  type: string
                                  example: $10.00
                                enrollment_pack_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                display_to_customer:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                product_title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Sample Product
                                quantity:
                                  type: integer
                                  example: 3
                                subscription:
                                  type: boolean
                                  example: true
                                enrollment:
                                  type: boolean
                                  example: false
                                allow_subscription:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_only:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_price:
                                  type:
                                    - number
                                    - string
                                    - 'null'
                                  example: 10.5
                                subscription_price_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $10.50
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-02-12'
                                subscribe_and_save:
                                  type:
                                    - number
                                    - string
                                    - 'null'
                                  example: 2.99
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $2.99
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $2.99
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Surcharge
                                product:
                                  oneOf:
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 1
                                        title:
                                          type: string
                                          example: Sample Product
                                        cv:
                                          type: integer
                                          example: 10
                                        image_path:
                                          type:
                                            - string
                                            - 'null'
                                          example: /images/product.png
                                        image_url:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/product.png
                                        price:
                                          type: string
                                          example: '29.99'
                                        price_in_currency:
                                          type: string
                                          example: $29.99
                                        sku:
                                          type:
                                            - string
                                            - 'null'
                                          example: SKU12345
                                        tax:
                                          type: string
                                          example: '2.99'
                                        tax_in_currency:
                                          type: string
                                          example: $2.99
                                    - type: 'null'
                                variant:
                                  oneOf:
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 1
                                        title:
                                          type:
                                            - string
                                            - 'null'
                                          example: Sample Variant
                                        image_path:
                                          type:
                                            - string
                                            - 'null'
                                          example: /images/sample.png
                                        image_url:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/sample.png
                                        primary_image:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/primary.png
                                        price:
                                          type:
                                            - string
                                            - 'null'
                                          example: '34.44'
                                        price_in_currency:
                                          type:
                                            - string
                                            - 'null'
                                          example: $34.44
                                        sku:
                                          type:
                                            - string
                                            - 'null'
                                          example: SKU12345
                                        options:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              title:
                                                type: string
                                                example: Size
                                              value:
                                                type: string
                                                example: XL
                                    - type: 'null'
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          ship_to:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          bill_to:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          shipping_method:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type: string
                                example: Standard Shipping
                          available_shipping_methods:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type: string
                                  example: Standard Shipping
                                price:
                                  type:
                                    - number
                                    - string
                                  example: 5.99
                                price_label:
                                  type: string
                                  example: $5.99
                                delivery_time_estimate:
                                  type: string
                                  example: 3-5 business days
                          available_payment_methods:
                            type: array
                            items:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1337
                                    type:
                                      type: string
                                      enum:
                                        - credit_card
                                    name:
                                      type: string
                                      example: Credit Card
                                    test:
                                      type: boolean
                                      example: true
                                      description: >-
                                        Determines if payment method is test
                                        instance or not. By default, set to
                                        `true`
                                    sandbox:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is sandbox
                                        instance or not. By default, set to
                                        `false`
                                    apple_pay:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method supports
                                        ApplePay or not 
                                    bogus_gateway:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is a Bogus
                                        instance or not.
                                    tokenize_path:
                                      type:
                                        - string
                                        - 'null'
                                      description: Path to tokenize, if applicable.
                                    token_provider:
                                      type: string
                                      enum:
                                        - spreedly
                                        - vgs
                                      description: >-
                                        Determines if payment tokenization is
                                        via spreedly or VGS
                                    apple_pay_merchant_identifier:
                                      type:
                                        - string
                                        - 'null'
                                      example: merchant.mycompany.com
                                      description: >-
                                        If ApplePay is supported, returns the
                                        merchant identifier registered with
                                        Apple, else returns nil
                                    supported_brands:
                                      type: array
                                      items:
                                        type: string
                                      example:
                                        - visa
                                        - master
                                        - american_express
                                        - discover
                                  required:
                                    - id
                                    - type
                                    - name
                                    - supported_brands
                                    - test
                                    - sandbox
                                    - apple_pay
                                    - apple_pay_merchant_identifier
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1337
                                    type:
                                      type: string
                                      enum:
                                        - klarna
                                    name:
                                      type: string
                                      example: Klarna
                                    test:
                                      type: boolean
                                      example: true
                                      description: >-
                                        Determines if payment method is test
                                        instance or not. By default, set to
                                        `true`
                                    sandbox:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is sandbox
                                        instance or not. By default, set to
                                        `false`
                          country:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              iso:
                                type: string
                                example: US
                              name:
                                type: string
                                example: United States
                              province_required:
                                type: boolean
                                example: false
                          type:
                            type: string
                            enum:
                              - regular
                              - enrollment
                            example: regular
                          enrollment_pack_id:
                            type:
                              - integer
                              - 'null'
                            example: 1
                          enrollment_pack:
                            type:
                              - object
                              - 'null'
                            properties:
                              enrollment_pack_id:
                                type: integer
                                example: 1
                              additional_volume:
                                type:
                                  - integer
                                  - 'null'
                                example: 10
                              description:
                                type:
                                  - object
                                  - 'null'
                                  - string
                                properties:
                                  id:
                                    type: integer
                                    example: 111
                                  name:
                                    type: string
                                    example: description
                                  body:
                                    type: string
                                    example: >-
                                      <div>Try the latest and greatest of our
                                      sugar zip packs. Guaranteed to make you
                                      skinner and cure cancer.</div>
                                  record_type:
                                    type: string
                                    example: EnrollmentPack
                                  record_id:
                                    type: integer
                                    example: 1
                                  created_at:
                                    type: string
                                    format: date_time
                                    example: '2025-01-16T04:22:43.809Z'
                                  updated_at:
                                    type: string
                                    format: date_time
                                    example: '2025-01-22T10:23:52.941Z'
                                  locale:
                                    type: string
                                    example: en
                              enrollment_fee:
                                type:
                                  - number
                                  - string
                                example: 10
                              enrollment_fee_in_currency:
                                type: string
                                example: $10.00
                              images:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 2
                                    relateable_type:
                                      type: string
                                      example: EnrollmentPack
                                    relateable_id:
                                      type: integer
                                      example: 1
                                    image_url:
                                      type: string
                                      example: >-
                                        https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                    image_path:
                                      type: string
                                      example: jITWaU14QGe0y5AFgY7P_00179.svg
                                    position:
                                      type: integer
                                      example: 1
                                    shopify_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: null
                                    created_at:
                                      type: string
                                      format: date_time
                                      example: '2025-01-16T04:22:44.870Z'
                                    updated_at:
                                      type: string
                                      format: date_time
                                      example: '2025-01-16T04:22:44.870Z'
                                    external_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: null
                              items:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 625
                                    allow_subscription:
                                      type: boolean
                                      example: true
                                    cv:
                                      type:
                                        - number
                                        - string
                                      example: 0
                                    cv_in_currency:
                                      type: string
                                      example: $0.00
                                    enrollment:
                                      type: boolean
                                      example: true
                                    enrollment_pack_id:
                                      type: integer
                                      example: 1
                                    price:
                                      type: string
                                      example: '11.13'
                                    price_in_currency:
                                      type: string
                                      example: $11.13
                                    product_title:
                                      type: string
                                      example: Zip Pack Sample Pack (30)
                                    quantity:
                                      type: integer
                                      example: 1
                                    qv:
                                      type:
                                        - number
                                        - string
                                      example: 0
                                    qv_in_currency:
                                      type: string
                                      example: $0.00
                                    subscribe_and_save:
                                      type:
                                        - string
                                        - 'null'
                                      example: '-1988.87'
                                    subscribe_and_save_for_display:
                                      type:
                                        - string
                                        - 'null'
                                      example: Subscribe and save $-1,988.87
                                    subscribe_and_save_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $-1,988.87
                                    subscription:
                                      type: boolean
                                      example: false
                                    subscription_interval:
                                      type:
                                        - integer
                                        - 'null'
                                      example: 1
                                    subscription_interval_unit:
                                      type:
                                        - string
                                        - 'null'
                                      example: month
                                    subscription_only:
                                      type: boolean
                                      example: false
                                    subscription_plan_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: 1
                                    subscription_plans:
                                      oneOf:
                                        - type: array
                                          items:
                                            title: Commerce::SubscriptionPlan
                                            type: object
                                            properties:
                                              id:
                                                type: integer
                                              name:
                                                example: Test Subscription Plan
                                                type: string
                                              billing_interval:
                                                example: 1
                                                type: integer
                                                default: 1
                                                minimum: 1
                                              billing_interval_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type: string
                                                default: month
                                              shipping_interval:
                                                example: 1
                                                type: integer
                                                default: 1
                                                minimum: 1
                                              shipping_interval_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type: string
                                                default: month
                                              trial_period:
                                                example: 1
                                                type:
                                                  - integer
                                                  - 'null'
                                                minimum: 1
                                              trial_period_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type:
                                                  - string
                                                  - 'null'
                                              split_volume:
                                                example: true
                                                type: boolean
                                                default: false
                                              max_quantity:
                                                example: 100
                                                type:
                                                  - integer
                                                  - 'null'
                                                minimum: 1
                                              company_default:
                                                example: false
                                                type:
                                                  - boolean
                                                  - 'null'
                                                default: false
                                              products_count:
                                                example: 10
                                                type:
                                                  - integer
                                                  - 'null'
                                              subscribers_count:
                                                example: 10
                                                type:
                                                  - integer
                                                  - 'null'
                                              price:
                                                type: string
                                              price_in_currency:
                                                type: string
                                              subscription_start:
                                                type: string
                                              subscribe_and_save:
                                                type: string
                                              subscribe_and_save_in_currency:
                                                type: string
                                              subscribe_and_save_for_display:
                                                type: string
                                            required:
                                              - id
                                              - name
                                              - billing_interval
                                              - billing_interval_unit
                                              - shipping_interval
                                              - shipping_interval_unit
                                              - split_volume
                                              - price
                                              - price_in_currency
                                              - subscription_start
                                              - subscribe_and_save
                                              - subscribe_and_save_in_currency
                                              - subscribe_and_save_for_display
                                        - type: 'null'
                                    subscription_price:
                                      type: string
                                      example: '2000.0'
                                    subscription_price_in_currency:
                                      type: string
                                      example: $2,000.00
                                    subscription_start:
                                      type:
                                        - string
                                        - 'null'
                                      format: date
                                      example: '2025-02-28'
                                    tax:
                                      type: string
                                      example: '0.0'
                                    tax_in_currency:
                                      type: string
                                      example: $0.00
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: null
                                    display_to_customer:
                                      type: boolean
                                      example: false
                                    errors:
                                      oneOf:
                                        - type: 'null'
                                        - type: array
                                          items:
                                            type: object
                                            example:
                                              country:
                                                - >-
                                                  This product is not available for this
                                                  country. Please change your country
                              price:
                                type:
                                  - string
                                  - integer
                                example: 11.13
                              price_in_currency:
                                type: string
                                example: $11.13
                              subscription_price:
                                type:
                                  - string
                                  - integer
                                example: 2000
                              subscription_price_in_currency:
                                type: string
                                example: $2,000.00
                              title:
                                type: string
                                example: enroll product
                              token:
                                type: string
                                example: NxL22AqLRRisfyF9LqxxWRak
                          recurring:
                            oneOf:
                              - type: array
                                items:
                                  type: object
                                  properties:
                                    subtotal:
                                      type: string
                                      example: '10.0'
                                    subtotal_in_currency:
                                      type: string
                                      example: $10.0
                                    interval:
                                      type: integer
                                      example: 1
                                    interval_unit:
                                      type: string
                                      example: month
                                    subtotal_for_display:
                                      type: string
                                      example: $10.00 every 1 month
                                    start_date:
                                      type:
                                        - string
                                        - 'null'
                                      example: '2025-05-27'
                              - type: 'null'
                            default:
                              - subtotal: '10.0'
                                subtotal_in_currency: $10.0
                                interval: 1
                                interval_unit: month
                                subtotal_for_display: $10.00 every 1 month
                                start_date: '2025-05-27'
                required:
                  - error_message
                  - errors
                  - meta
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - shipping_method_id
              properties:
                shipping_method_id:
                  type: integer
                  example: 10
                  description: ID of the shipping method to use
  /api/carts/{cart_token}/checkout:
    post:
      summary: Completes cart checkout
      tags:
        - Carts
      operationId: checkoutCart
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: checkout completed
          content:
            application/json:
              schema:
                type: object
                properties:
                  order:
                    type: object
                    properties:
                      id:
                        type: integer
                      first_name:
                        type:
                          - string
                          - 'null'
                      last_name:
                        type:
                          - string
                          - 'null'
                      external_id:
                        type:
                          - string
                          - 'null'
                      email:
                        type: string
                      phone:
                        type:
                          - string
                          - 'null'
                      order_number:
                        type: string
                      token:
                        type: string
                      status:
                        type: string
                      order_type:
                        type:
                          - string
                          - 'null'
                      amount:
                        type: string
                      refundable_amount:
                        type:
                          - number
                          - string
                        format: float
                        example: 10.5
                      note:
                        oneOf:
                          - type: 'null'
                          - type: string
                      recurring:
                        oneOf:
                          - type: array
                            items:
                              type: object
                              properties:
                                subtotal:
                                  type:
                                    - number
                                    - string
                                  example: '10.0'
                                subtotal_in_currency:
                                  type: string
                                  example: $10.0
                                interval:
                                  type: integer
                                  example: 1
                                interval_unit:
                                  type: string
                                  example: month
                                subtotal_for_display:
                                  type: string
                                  example: $10.00 every 1 month
                                start_date:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-05-27'
                          - type: 'null'
                        default:
                          - subtotal: '10.0'
                            subtotal_in_currency: $10.0
                            interval: 1
                            interval_unit: month
                            subtotal_for_display: $10.00 every 1 month
                            start_date: '2025-05-27'
                      order_confirmation_url:
                        type:
                          - string
                          - 'null'
                      currency_code:
                        type: string
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      metadata:
                        type:
                          - object
                          - 'null'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                      shop_url:
                        type: string
                        example: https://example.com
        '202':
          description: enrollment created with pre purchase
          content:
            application/json:
              schema:
                type: object
                properties:
                  enrollment:
                    type: object
                    properties:
                      cart_token:
                        type: string
                        example: CART_TOKEN
                      state:
                        type: string
                        example: incomplete
                      token:
                        type: string
                        example: ENROLLMENT_TOKEN
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '302':
          description: Payment requires redirect
          content:
            application/json:
              schema:
                type: object
                properties:
                  redirect_url:
                    type: string
                    example: https://example.com/payment
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: checkout declined
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unprocessable entity
                  errors:
                    type: object
                    example:
                      base: Something went wrong
                    properties:
                      payment:
                        type: array
                        items:
                          type: string
                          example: >-
                            Payment declined: Unable to process the authorize
                            transaction.
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
  /api/carts/{cart_token}/cart_info:
    get:
      summary: Retrieves cart company information
      tags:
        - Carts
      operationId: retrieveCartInfo
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: company info found
          content:
            application/json:
              schema:
                type: object
                properties:
                  languages:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: English
                        iso:
                          type: string
                          example: en
                  countries:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: United States
                        iso:
                          type: string
                          example: US
        '410':
          description: Cart is processed and cannot be modified
  /api/carts/{cart_token}/change_language:
    patch:
      summary: Updates the language of a cart
      tags:
        - Carts
      operationId: changeCartLanguage
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: cart's language_iso changed
          content:
            application/json:
              schema:
                type: object
                properties:
                  cart:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123
                      state:
                        type: string
                        example: start
                      processed:
                        type: boolean
                        example: false
                        description: >-
                          Determines if a cart payment has been processed or
                          not.
                      valid_for_checkout:
                        type: boolean
                        example: true
                      buyer_rep_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      currency_symbol:
                        type: string
                        example: $
                      currency_code:
                        type: string
                        example: USD
                      shipping_total_for_display:
                        type: string
                        example: Free
                      phone:
                        type:
                          - string
                          - 'null'
                        example: '4035551212'
                      payment_method_auto_assignable:
                        type: boolean
                        example: true
                        description: >-
                          Determines if a payment method can be auto-assigned to
                          the cart.
                      attribution:
                        oneOf:
                          - type: object
                            oneOf:
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  share_guid:
                                    type: string
                                    example: james-bond007
                                required:
                                  - id
                                  - share_guid
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  email:
                                    type: string
                                    example: james.bond@gmail.com
                                required:
                                  - id
                                  - email
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  username:
                                    type: string
                                    example: jaamball234
                                required:
                                  - id
                                  - username
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  fluid_rep_id:
                                    type: integer
                                    example: 23493
                                required:
                                  - id
                                  - fluid_rep_id
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  external_id:
                                    type:
                                      - string
                                      - 'null'
                                    example: w3sdf92
                                required:
                                  - id
                          - type: 'null'
                        default:
                          id: 456
                          share_guid: james-bond007
                      agreements:
                        type: array
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                              example: 1
                            required:
                              type: boolean
                              example: true
                            title:
                              type: string
                              example: Terms and Conditions
                            show_path:
                              type: string
                              example: /terms
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                      amount_total:
                        type: string
                        example: '121.65'
                      amount_total_in_currency:
                        type: string
                        example: $121.65 (USD)
                      sub_total:
                        type: string
                        example: '100.00'
                      sub_total_in_currency:
                        type: string
                        example: $100.00 (USD)
                      tax_total:
                        type: string
                        example: '20.00'
                      tax_total_in_currency:
                        type: string
                        example: $20.00 (USD)
                      shipping_total:
                        type: string
                        example: '1.65'
                      shipping_total_in_currency:
                        type: string
                        example: $1.65 (USD)
                      discount_total:
                        type: string
                        example: '2.99'
                      discount_total_in_currency:
                        type: string
                        example: $2.99 (USD)
                      transaction_fee:
                        type:
                          - number
                          - string
                        example: '1.90'
                      transaction_fee_in_currency:
                        type: string
                        example: $1.90 (USD)
                      cv_total:
                        type: integer
                        example: 10
                      qv_total:
                        type: integer
                        example: 15
                      company:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          primary_domain_hostname:
                            type:
                              - string
                              - 'null'
                            example: fluid.com
                          subdomain:
                            type:
                              - string
                              - 'null'
                            example: myco
                          logo_url:
                            type:
                              - string
                              - 'null'
                            example: https://example.com/logo.png
                          fluid_shop:
                            type:
                              - string
                              - 'null'
                            example: https://fluid-sample-shop.fluid.com
                          collect_phone:
                            type: boolean
                            example: true
                          require_phone:
                            type: boolean
                            example: false
                          require_billing_zip:
                            type: boolean
                            example: false
                          checkout_primary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                          checkout_primary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                      payment_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          cart_type:
                            type: string
                            example: credit_card
                          last_four:
                            type: string
                            example: '1234'
                          exp_month:
                            type: integer
                            example: 12
                          exp_year:
                            type: integer
                            example: 2025
                          logo_url:
                            type: string
                            example: https://example.com/image.svg
                      email:
                        type:
                          - string
                          - 'null'
                        example: user@example.com
                      enrollment_fee:
                        type:
                          - number
                          - string
                        example: '10.45'
                      enrollment_fee_in_currency:
                        type: string
                        example: $10.45
                      discount_code:
                        type:
                          - string
                          - 'null'
                        example: DISCOUNT10
                      language_iso:
                        type:
                          - string
                          - 'null'
                        example: en
                      cart_token:
                        type: string
                        example: abc123
                      immutable_items:
                        type: boolean
                        example: false
                      digital_only:
                        type: boolean
                        example: false
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 101
                            price:
                              type: string
                              example: '43.41'
                            price_in_currency:
                              type: string
                              example: $43.41
                            tax:
                              type: string
                              example: '2.99'
                            tax_in_currency:
                              type: string
                              example: $2.99
                            cv:
                              type: integer
                              example: 5
                            qv:
                              type: integer
                              example: 7
                            discount_amount:
                              type: string
                              example: '10'
                            discount_amount_in_currency:
                              type: string
                              example: $10.00
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            display_to_customer:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            product_title:
                              type:
                                - string
                                - 'null'
                              example: Sample Product
                            quantity:
                              type: integer
                              example: 3
                            subscription:
                              type: boolean
                              example: true
                            enrollment:
                              type: boolean
                              example: false
                            allow_subscription:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_plan_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_plans:
                              oneOf:
                                - type: array
                                  items:
                                    title: Commerce::SubscriptionPlan
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      name:
                                        example: Test Subscription Plan
                                        type: string
                                      billing_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      billing_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      shipping_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      shipping_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      trial_period:
                                        example: 1
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      trial_period_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type:
                                          - string
                                          - 'null'
                                      split_volume:
                                        example: true
                                        type: boolean
                                        default: false
                                      max_quantity:
                                        example: 100
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      company_default:
                                        example: false
                                        type:
                                          - boolean
                                          - 'null'
                                        default: false
                                      products_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      subscribers_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      price:
                                        type: string
                                      price_in_currency:
                                        type: string
                                      subscription_start:
                                        type: string
                                      subscribe_and_save:
                                        type: string
                                      subscribe_and_save_in_currency:
                                        type: string
                                      subscribe_and_save_for_display:
                                        type: string
                                    required:
                                      - id
                                      - name
                                      - billing_interval
                                      - billing_interval_unit
                                      - shipping_interval
                                      - shipping_interval_unit
                                      - split_volume
                                      - price
                                      - price_in_currency
                                      - subscription_start
                                      - subscribe_and_save
                                      - subscribe_and_save_in_currency
                                      - subscribe_and_save_for_display
                                - type: 'null'
                            subscription_only:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_interval:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_interval_unit:
                              type:
                                - string
                                - 'null'
                              example: month
                            subscription_price:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 10.5
                            subscription_price_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $10.50
                            subscription_start:
                              type:
                                - string
                                - 'null'
                              example: '2025-02-12'
                            subscribe_and_save:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 2.99
                            subscribe_and_save_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $2.99
                            subscribe_and_save_for_display:
                              type:
                                - string
                                - 'null'
                              example: Subscribe and save $2.99
                            title:
                              type:
                                - string
                                - 'null'
                              example: Surcharge
                            product:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type: string
                                      example: Sample Product
                                    cv:
                                      type: integer
                                      example: 10
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/product.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/product.png
                                    price:
                                      type: string
                                      example: '29.99'
                                    price_in_currency:
                                      type: string
                                      example: $29.99
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    tax:
                                      type: string
                                      example: '2.99'
                                    tax_in_currency:
                                      type: string
                                      example: $2.99
                                - type: 'null'
                            variant:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: Sample Variant
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/sample.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/sample.png
                                    primary_image:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/primary.png
                                    price:
                                      type:
                                        - string
                                        - 'null'
                                      example: '34.44'
                                    price_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $34.44
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    options:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          title:
                                            type: string
                                            example: Size
                                          value:
                                            type: string
                                            example: XL
                                - type: 'null'
                            errors:
                              oneOf:
                                - type: 'null'
                                - type: array
                                  items:
                                    type: object
                                    example:
                                      country:
                                        - >-
                                          This product is not available for this
                                          country. Please change your country
                      ship_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      bill_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      shipping_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type: string
                            example: Standard Shipping
                      available_shipping_methods:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            title:
                              type: string
                              example: Standard Shipping
                            price:
                              type:
                                - number
                                - string
                              example: 5.99
                            price_label:
                              type: string
                              example: $5.99
                            delivery_time_estimate:
                              type: string
                              example: 3-5 business days
                      available_payment_methods:
                        type: array
                        items:
                          oneOf:
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - credit_card
                                name:
                                  type: string
                                  example: Credit Card
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                                apple_pay:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method supports
                                    ApplePay or not 
                                bogus_gateway:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is a Bogus
                                    instance or not.
                                tokenize_path:
                                  type:
                                    - string
                                    - 'null'
                                  description: Path to tokenize, if applicable.
                                token_provider:
                                  type: string
                                  enum:
                                    - spreedly
                                    - vgs
                                  description: >-
                                    Determines if payment tokenization is via
                                    spreedly or VGS
                                apple_pay_merchant_identifier:
                                  type:
                                    - string
                                    - 'null'
                                  example: merchant.mycompany.com
                                  description: >-
                                    If ApplePay is supported, returns the
                                    merchant identifier registered with Apple,
                                    else returns nil
                                supported_brands:
                                  type: array
                                  items:
                                    type: string
                                  example:
                                    - visa
                                    - master
                                    - american_express
                                    - discover
                              required:
                                - id
                                - type
                                - name
                                - supported_brands
                                - test
                                - sandbox
                                - apple_pay
                                - apple_pay_merchant_identifier
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - klarna
                                name:
                                  type: string
                                  example: Klarna
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                      country:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          iso:
                            type: string
                            example: US
                          name:
                            type: string
                            example: United States
                          province_required:
                            type: boolean
                            example: false
                      type:
                        type: string
                        enum:
                          - regular
                          - enrollment
                        example: regular
                      enrollment_pack_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      enrollment_pack:
                        type:
                          - object
                          - 'null'
                        properties:
                          enrollment_pack_id:
                            type: integer
                            example: 1
                          additional_volume:
                            type:
                              - integer
                              - 'null'
                            example: 10
                          description:
                            type:
                              - object
                              - 'null'
                              - string
                            properties:
                              id:
                                type: integer
                                example: 111
                              name:
                                type: string
                                example: description
                              body:
                                type: string
                                example: >-
                                  <div>Try the latest and greatest of our sugar
                                  zip packs. Guaranteed to make you skinner and
                                  cure cancer.</div>
                              record_type:
                                type: string
                                example: EnrollmentPack
                              record_id:
                                type: integer
                                example: 1
                              created_at:
                                type: string
                                format: date_time
                                example: '2025-01-16T04:22:43.809Z'
                              updated_at:
                                type: string
                                format: date_time
                                example: '2025-01-22T10:23:52.941Z'
                              locale:
                                type: string
                                example: en
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: 10
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.00
                          images:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 2
                                relateable_type:
                                  type: string
                                  example: EnrollmentPack
                                relateable_id:
                                  type: integer
                                  example: 1
                                image_url:
                                  type: string
                                  example: >-
                                    https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                image_path:
                                  type: string
                                  example: jITWaU14QGe0y5AFgY7P_00179.svg
                                position:
                                  type: integer
                                  example: 1
                                shopify_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                                created_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                updated_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                external_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 625
                                allow_subscription:
                                  type: boolean
                                  example: true
                                cv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                cv_in_currency:
                                  type: string
                                  example: $0.00
                                enrollment:
                                  type: boolean
                                  example: true
                                enrollment_pack_id:
                                  type: integer
                                  example: 1
                                price:
                                  type: string
                                  example: '11.13'
                                price_in_currency:
                                  type: string
                                  example: $11.13
                                product_title:
                                  type: string
                                  example: Zip Pack Sample Pack (30)
                                quantity:
                                  type: integer
                                  example: 1
                                qv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                qv_in_currency:
                                  type: string
                                  example: $0.00
                                subscribe_and_save:
                                  type:
                                    - string
                                    - 'null'
                                  example: '-1988.87'
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $-1,988.87
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $-1,988.87
                                subscription:
                                  type: boolean
                                  example: false
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_only:
                                  type: boolean
                                  example: false
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_price:
                                  type: string
                                  example: '2000.0'
                                subscription_price_in_currency:
                                  type: string
                                  example: $2,000.00
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                  example: '2025-02-28'
                                tax:
                                  type: string
                                  example: '0.0'
                                tax_in_currency:
                                  type: string
                                  example: $0.00
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: null
                                display_to_customer:
                                  type: boolean
                                  example: false
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          price:
                            type:
                              - string
                              - integer
                            example: 11.13
                          price_in_currency:
                            type: string
                            example: $11.13
                          subscription_price:
                            type:
                              - string
                              - integer
                            example: 2000
                          subscription_price_in_currency:
                            type: string
                            example: $2,000.00
                          title:
                            type: string
                            example: enroll product
                          token:
                            type: string
                            example: NxL22AqLRRisfyF9LqxxWRak
                      recurring:
                        oneOf:
                          - type: array
                            items:
                              type: object
                              properties:
                                subtotal:
                                  type: string
                                  example: '10.0'
                                subtotal_in_currency:
                                  type: string
                                  example: $10.0
                                interval:
                                  type: integer
                                  example: 1
                                interval_unit:
                                  type: string
                                  example: month
                                subtotal_for_display:
                                  type: string
                                  example: $10.00 every 1 month
                                start_date:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-05-27'
                          - type: 'null'
                        default:
                          - subtotal: '10.0'
                            subtotal_in_currency: $10.0
                            interval: 1
                            interval_unit: month
                            subtotal_for_display: $10.00 every 1 month
                            start_date: '2025-05-27'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      checkout_url:
                        type: string
                        example: https://checkout.fluid.com/checkout?jwt=abc123
                      shop_url:
                        type: string
                        example: https://myco.fluid.app
        '400':
          description: unavailable locale for the company
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Language not supported
        '410':
          description: Cart is processed and cannot be modified
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                language_iso:
                  type: string
                  example: en
        required: true
        description: List of valid iso are at `/api/carts/{cart_token}/cart_info`
  /api/carts/{cart_token}/update_country:
    patch:
      summary: Updates the country of a cart, also updates the currency code
      tags:
        - Carts
      operationId: changeCartCountry
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: cart's country and currency code changed
          content:
            application/json:
              schema:
                type: object
                properties:
                  cart:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123
                      state:
                        type: string
                        example: start
                      processed:
                        type: boolean
                        example: false
                        description: >-
                          Determines if a cart payment has been processed or
                          not.
                      valid_for_checkout:
                        type: boolean
                        example: true
                      buyer_rep_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      currency_symbol:
                        type: string
                        example: $
                      currency_code:
                        type: string
                        example: USD
                      shipping_total_for_display:
                        type: string
                        example: Free
                      phone:
                        type:
                          - string
                          - 'null'
                        example: '4035551212'
                      payment_method_auto_assignable:
                        type: boolean
                        example: true
                        description: >-
                          Determines if a payment method can be auto-assigned to
                          the cart.
                      attribution:
                        oneOf:
                          - type: object
                            oneOf:
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  share_guid:
                                    type: string
                                    example: james-bond007
                                required:
                                  - id
                                  - share_guid
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  email:
                                    type: string
                                    example: james.bond@gmail.com
                                required:
                                  - id
                                  - email
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  username:
                                    type: string
                                    example: jaamball234
                                required:
                                  - id
                                  - username
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  fluid_rep_id:
                                    type: integer
                                    example: 23493
                                required:
                                  - id
                                  - fluid_rep_id
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  external_id:
                                    type:
                                      - string
                                      - 'null'
                                    example: w3sdf92
                                required:
                                  - id
                          - type: 'null'
                        default:
                          id: 456
                          share_guid: james-bond007
                      agreements:
                        type: array
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                              example: 1
                            required:
                              type: boolean
                              example: true
                            title:
                              type: string
                              example: Terms and Conditions
                            show_path:
                              type: string
                              example: /terms
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                      amount_total:
                        type: string
                        example: '121.65'
                      amount_total_in_currency:
                        type: string
                        example: $121.65 (USD)
                      sub_total:
                        type: string
                        example: '100.00'
                      sub_total_in_currency:
                        type: string
                        example: $100.00 (USD)
                      tax_total:
                        type: string
                        example: '20.00'
                      tax_total_in_currency:
                        type: string
                        example: $20.00 (USD)
                      shipping_total:
                        type: string
                        example: '1.65'
                      shipping_total_in_currency:
                        type: string
                        example: $1.65 (USD)
                      discount_total:
                        type: string
                        example: '2.99'
                      discount_total_in_currency:
                        type: string
                        example: $2.99 (USD)
                      transaction_fee:
                        type:
                          - number
                          - string
                        example: '1.90'
                      transaction_fee_in_currency:
                        type: string
                        example: $1.90 (USD)
                      cv_total:
                        type: integer
                        example: 10
                      qv_total:
                        type: integer
                        example: 15
                      company:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          primary_domain_hostname:
                            type:
                              - string
                              - 'null'
                            example: fluid.com
                          subdomain:
                            type:
                              - string
                              - 'null'
                            example: myco
                          logo_url:
                            type:
                              - string
                              - 'null'
                            example: https://example.com/logo.png
                          fluid_shop:
                            type:
                              - string
                              - 'null'
                            example: https://fluid-sample-shop.fluid.com
                          collect_phone:
                            type: boolean
                            example: true
                          require_phone:
                            type: boolean
                            example: false
                          require_billing_zip:
                            type: boolean
                            example: false
                          checkout_primary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                          checkout_primary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                      payment_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          cart_type:
                            type: string
                            example: credit_card
                          last_four:
                            type: string
                            example: '1234'
                          exp_month:
                            type: integer
                            example: 12
                          exp_year:
                            type: integer
                            example: 2025
                          logo_url:
                            type: string
                            example: https://example.com/image.svg
                      email:
                        type:
                          - string
                          - 'null'
                        example: user@example.com
                      enrollment_fee:
                        type:
                          - number
                          - string
                        example: '10.45'
                      enrollment_fee_in_currency:
                        type: string
                        example: $10.45
                      discount_code:
                        type:
                          - string
                          - 'null'
                        example: DISCOUNT10
                      language_iso:
                        type:
                          - string
                          - 'null'
                        example: en
                      cart_token:
                        type: string
                        example: abc123
                      immutable_items:
                        type: boolean
                        example: false
                      digital_only:
                        type: boolean
                        example: false
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 101
                            price:
                              type: string
                              example: '43.41'
                            price_in_currency:
                              type: string
                              example: $43.41
                            tax:
                              type: string
                              example: '2.99'
                            tax_in_currency:
                              type: string
                              example: $2.99
                            cv:
                              type: integer
                              example: 5
                            qv:
                              type: integer
                              example: 7
                            discount_amount:
                              type: string
                              example: '10'
                            discount_amount_in_currency:
                              type: string
                              example: $10.00
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            display_to_customer:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            product_title:
                              type:
                                - string
                                - 'null'
                              example: Sample Product
                            quantity:
                              type: integer
                              example: 3
                            subscription:
                              type: boolean
                              example: true
                            enrollment:
                              type: boolean
                              example: false
                            allow_subscription:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_plan_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_plans:
                              oneOf:
                                - type: array
                                  items:
                                    title: Commerce::SubscriptionPlan
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      name:
                                        example: Test Subscription Plan
                                        type: string
                                      billing_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      billing_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      shipping_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      shipping_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      trial_period:
                                        example: 1
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      trial_period_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type:
                                          - string
                                          - 'null'
                                      split_volume:
                                        example: true
                                        type: boolean
                                        default: false
                                      max_quantity:
                                        example: 100
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      company_default:
                                        example: false
                                        type:
                                          - boolean
                                          - 'null'
                                        default: false
                                      products_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      subscribers_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      price:
                                        type: string
                                      price_in_currency:
                                        type: string
                                      subscription_start:
                                        type: string
                                      subscribe_and_save:
                                        type: string
                                      subscribe_and_save_in_currency:
                                        type: string
                                      subscribe_and_save_for_display:
                                        type: string
                                    required:
                                      - id
                                      - name
                                      - billing_interval
                                      - billing_interval_unit
                                      - shipping_interval
                                      - shipping_interval_unit
                                      - split_volume
                                      - price
                                      - price_in_currency
                                      - subscription_start
                                      - subscribe_and_save
                                      - subscribe_and_save_in_currency
                                      - subscribe_and_save_for_display
                                - type: 'null'
                            subscription_only:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_interval:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_interval_unit:
                              type:
                                - string
                                - 'null'
                              example: month
                            subscription_price:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 10.5
                            subscription_price_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $10.50
                            subscription_start:
                              type:
                                - string
                                - 'null'
                              example: '2025-02-12'
                            subscribe_and_save:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 2.99
                            subscribe_and_save_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $2.99
                            subscribe_and_save_for_display:
                              type:
                                - string
                                - 'null'
                              example: Subscribe and save $2.99
                            title:
                              type:
                                - string
                                - 'null'
                              example: Surcharge
                            product:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type: string
                                      example: Sample Product
                                    cv:
                                      type: integer
                                      example: 10
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/product.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/product.png
                                    price:
                                      type: string
                                      example: '29.99'
                                    price_in_currency:
                                      type: string
                                      example: $29.99
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    tax:
                                      type: string
                                      example: '2.99'
                                    tax_in_currency:
                                      type: string
                                      example: $2.99
                                - type: 'null'
                            variant:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: Sample Variant
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/sample.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/sample.png
                                    primary_image:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/primary.png
                                    price:
                                      type:
                                        - string
                                        - 'null'
                                      example: '34.44'
                                    price_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $34.44
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    options:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          title:
                                            type: string
                                            example: Size
                                          value:
                                            type: string
                                            example: XL
                                - type: 'null'
                            errors:
                              oneOf:
                                - type: 'null'
                                - type: array
                                  items:
                                    type: object
                                    example:
                                      country:
                                        - >-
                                          This product is not available for this
                                          country. Please change your country
                      ship_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      bill_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      shipping_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type: string
                            example: Standard Shipping
                      available_shipping_methods:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            title:
                              type: string
                              example: Standard Shipping
                            price:
                              type:
                                - number
                                - string
                              example: 5.99
                            price_label:
                              type: string
                              example: $5.99
                            delivery_time_estimate:
                              type: string
                              example: 3-5 business days
                      available_payment_methods:
                        type: array
                        items:
                          oneOf:
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - credit_card
                                name:
                                  type: string
                                  example: Credit Card
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                                apple_pay:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method supports
                                    ApplePay or not 
                                bogus_gateway:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is a Bogus
                                    instance or not.
                                tokenize_path:
                                  type:
                                    - string
                                    - 'null'
                                  description: Path to tokenize, if applicable.
                                token_provider:
                                  type: string
                                  enum:
                                    - spreedly
                                    - vgs
                                  description: >-
                                    Determines if payment tokenization is via
                                    spreedly or VGS
                                apple_pay_merchant_identifier:
                                  type:
                                    - string
                                    - 'null'
                                  example: merchant.mycompany.com
                                  description: >-
                                    If ApplePay is supported, returns the
                                    merchant identifier registered with Apple,
                                    else returns nil
                                supported_brands:
                                  type: array
                                  items:
                                    type: string
                                  example:
                                    - visa
                                    - master
                                    - american_express
                                    - discover
                              required:
                                - id
                                - type
                                - name
                                - supported_brands
                                - test
                                - sandbox
                                - apple_pay
                                - apple_pay_merchant_identifier
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - klarna
                                name:
                                  type: string
                                  example: Klarna
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                      country:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          iso:
                            type: string
                            example: US
                          name:
                            type: string
                            example: United States
                          province_required:
                            type: boolean
                            example: false
                      type:
                        type: string
                        enum:
                          - regular
                          - enrollment
                        example: regular
                      enrollment_pack_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      enrollment_pack:
                        type:
                          - object
                          - 'null'
                        properties:
                          enrollment_pack_id:
                            type: integer
                            example: 1
                          additional_volume:
                            type:
                              - integer
                              - 'null'
                            example: 10
                          description:
                            type:
                              - object
                              - 'null'
                              - string
                            properties:
                              id:
                                type: integer
                                example: 111
                              name:
                                type: string
                                example: description
                              body:
                                type: string
                                example: >-
                                  <div>Try the latest and greatest of our sugar
                                  zip packs. Guaranteed to make you skinner and
                                  cure cancer.</div>
                              record_type:
                                type: string
                                example: EnrollmentPack
                              record_id:
                                type: integer
                                example: 1
                              created_at:
                                type: string
                                format: date_time
                                example: '2025-01-16T04:22:43.809Z'
                              updated_at:
                                type: string
                                format: date_time
                                example: '2025-01-22T10:23:52.941Z'
                              locale:
                                type: string
                                example: en
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: 10
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.00
                          images:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 2
                                relateable_type:
                                  type: string
                                  example: EnrollmentPack
                                relateable_id:
                                  type: integer
                                  example: 1
                                image_url:
                                  type: string
                                  example: >-
                                    https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                image_path:
                                  type: string
                                  example: jITWaU14QGe0y5AFgY7P_00179.svg
                                position:
                                  type: integer
                                  example: 1
                                shopify_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                                created_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                updated_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                external_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 625
                                allow_subscription:
                                  type: boolean
                                  example: true
                                cv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                cv_in_currency:
                                  type: string
                                  example: $0.00
                                enrollment:
                                  type: boolean
                                  example: true
                                enrollment_pack_id:
                                  type: integer
                                  example: 1
                                price:
                                  type: string
                                  example: '11.13'
                                price_in_currency:
                                  type: string
                                  example: $11.13
                                product_title:
                                  type: string
                                  example: Zip Pack Sample Pack (30)
                                quantity:
                                  type: integer
                                  example: 1
                                qv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                qv_in_currency:
                                  type: string
                                  example: $0.00
                                subscribe_and_save:
                                  type:
                                    - string
                                    - 'null'
                                  example: '-1988.87'
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $-1,988.87
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $-1,988.87
                                subscription:
                                  type: boolean
                                  example: false
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_only:
                                  type: boolean
                                  example: false
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_price:
                                  type: string
                                  example: '2000.0'
                                subscription_price_in_currency:
                                  type: string
                                  example: $2,000.00
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                  example: '2025-02-28'
                                tax:
                                  type: string
                                  example: '0.0'
                                tax_in_currency:
                                  type: string
                                  example: $0.00
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: null
                                display_to_customer:
                                  type: boolean
                                  example: false
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          price:
                            type:
                              - string
                              - integer
                            example: 11.13
                          price_in_currency:
                            type: string
                            example: $11.13
                          subscription_price:
                            type:
                              - string
                              - integer
                            example: 2000
                          subscription_price_in_currency:
                            type: string
                            example: $2,000.00
                          title:
                            type: string
                            example: enroll product
                          token:
                            type: string
                            example: NxL22AqLRRisfyF9LqxxWRak
                      recurring:
                        oneOf:
                          - type: array
                            items:
                              type: object
                              properties:
                                subtotal:
                                  type: string
                                  example: '10.0'
                                subtotal_in_currency:
                                  type: string
                                  example: $10.0
                                interval:
                                  type: integer
                                  example: 1
                                interval_unit:
                                  type: string
                                  example: month
                                subtotal_for_display:
                                  type: string
                                  example: $10.00 every 1 month
                                start_date:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-05-27'
                          - type: 'null'
                        default:
                          - subtotal: '10.0'
                            subtotal_in_currency: $10.0
                            interval: 1
                            interval_unit: month
                            subtotal_for_display: $10.00 every 1 month
                            start_date: '2025-05-27'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '404':
          description: country code not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Country not found
                  errors:
                    type: object
                    example:
                      country_code:
                        - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '410':
          description: Cart is processed and cannot be modified
      requestBody:
        content:
          application/json:
            schema:
              required:
                - country_code
              type: object
              properties:
                country_code:
                  type: string
                  example: US
        description: ISO country code to update the cart to
  /api/carts/{cart_token}/magic_link:
    post:
      summary: Create magic link for cart
      tags:
        - Carts
      operationId: createCartMagicLink
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
      responses:
        '201':
          description: magic link created
          content:
            application/json:
              schema:
                type: object
                properties:
                  multi_factor_authentication:
                    type: object
                    properties:
                      uuid:
                        type: string
                      authenticated:
                        type: boolean
                      verification_channel:
                        type: string
                      verification_code_expires_at:
                        type: string
                        format: date-time
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                        format: date-time
        '410':
          description: Cart is processed and cannot be modified
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  example: example@gmail.com
                fluid_shop:
                  type: string
                  example: fluid.app
                lookup_only:
                  type: boolean
                  example: true
              required:
                - email
                - fluid_shop
  /api/carts/{cart_token}/confirm_magic_link:
    post:
      summary: Confirm magic link for cart
      tags:
        - Carts
      operationId: confirmCartMagicLink
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: magic link confirmed
          content:
            application/json:
              schema:
                type: object
                properties:
                  jwt:
                    type: string
                  authenticated:
                    type: boolean
                  auth_type:
                    type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '410':
          description: Cart is processed and cannot be modified
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unprocessable entity
                  errors:
                    type: object
                    example:
                      enrollment: User cannot be enrolled again.
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                uuid:
                  type: string
                multi_factor_authentication:
                  type: object
                  properties:
                    verification_code:
                      type: string
                  required:
                    - verification_code
              required:
                - uuid
                - multi_factor_authentication
  /api/carts/{cart_token}/enrollment:
    post:
      summary: Add enrollment to existing cart
      tags:
        - Carts
      operationId: addEnrollmentToCart
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Enrollment pack added to cart
          content:
            application/json:
              schema:
                type: object
                properties:
                  cart:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123
                      state:
                        type: string
                        example: start
                      processed:
                        type: boolean
                        example: false
                        description: >-
                          Determines if a cart payment has been processed or
                          not.
                      valid_for_checkout:
                        type: boolean
                        example: true
                      buyer_rep_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      currency_symbol:
                        type: string
                        example: $
                      currency_code:
                        type: string
                        example: USD
                      shipping_total_for_display:
                        type: string
                        example: Free
                      phone:
                        type:
                          - string
                          - 'null'
                        example: '4035551212'
                      payment_method_auto_assignable:
                        type: boolean
                        example: true
                        description: >-
                          Determines if a payment method can be auto-assigned to
                          the cart.
                      attribution:
                        oneOf:
                          - type: object
                            oneOf:
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  share_guid:
                                    type: string
                                    example: james-bond007
                                required:
                                  - id
                                  - share_guid
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  email:
                                    type: string
                                    example: james.bond@gmail.com
                                required:
                                  - id
                                  - email
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  username:
                                    type: string
                                    example: jaamball234
                                required:
                                  - id
                                  - username
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  fluid_rep_id:
                                    type: integer
                                    example: 23493
                                required:
                                  - id
                                  - fluid_rep_id
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  external_id:
                                    type:
                                      - string
                                      - 'null'
                                    example: w3sdf92
                                required:
                                  - id
                          - type: 'null'
                        default:
                          id: 456
                          share_guid: james-bond007
                      agreements:
                        type: array
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                              example: 1
                            required:
                              type: boolean
                              example: true
                            title:
                              type: string
                              example: Terms and Conditions
                            show_path:
                              type: string
                              example: /terms
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                      amount_total:
                        type: string
                        example: '121.65'
                      amount_total_in_currency:
                        type: string
                        example: $121.65 (USD)
                      sub_total:
                        type: string
                        example: '100.00'
                      sub_total_in_currency:
                        type: string
                        example: $100.00 (USD)
                      tax_total:
                        type: string
                        example: '20.00'
                      tax_total_in_currency:
                        type: string
                        example: $20.00 (USD)
                      shipping_total:
                        type: string
                        example: '1.65'
                      shipping_total_in_currency:
                        type: string
                        example: $1.65 (USD)
                      discount_total:
                        type: string
                        example: '2.99'
                      discount_total_in_currency:
                        type: string
                        example: $2.99 (USD)
                      transaction_fee:
                        type:
                          - number
                          - string
                        example: '1.90'
                      transaction_fee_in_currency:
                        type: string
                        example: $1.90 (USD)
                      cv_total:
                        type: integer
                        example: 10
                      qv_total:
                        type: integer
                        example: 15
                      company:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          primary_domain_hostname:
                            type:
                              - string
                              - 'null'
                            example: fluid.com
                          subdomain:
                            type:
                              - string
                              - 'null'
                            example: myco
                          logo_url:
                            type:
                              - string
                              - 'null'
                            example: https://example.com/logo.png
                          fluid_shop:
                            type:
                              - string
                              - 'null'
                            example: https://fluid-sample-shop.fluid.com
                          collect_phone:
                            type: boolean
                            example: true
                          require_phone:
                            type: boolean
                            example: false
                          require_billing_zip:
                            type: boolean
                            example: false
                          checkout_primary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                          checkout_primary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                      payment_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          cart_type:
                            type: string
                            example: credit_card
                          last_four:
                            type: string
                            example: '1234'
                          exp_month:
                            type: integer
                            example: 12
                          exp_year:
                            type: integer
                            example: 2025
                          logo_url:
                            type: string
                            example: https://example.com/image.svg
                      email:
                        type:
                          - string
                          - 'null'
                        example: user@example.com
                      enrollment_fee:
                        type:
                          - number
                          - string
                        example: '10.45'
                      enrollment_fee_in_currency:
                        type: string
                        example: $10.45
                      discount_code:
                        type:
                          - string
                          - 'null'
                        example: DISCOUNT10
                      language_iso:
                        type:
                          - string
                          - 'null'
                        example: en
                      cart_token:
                        type: string
                        example: abc123
                      immutable_items:
                        type: boolean
                        example: false
                      digital_only:
                        type: boolean
                        example: false
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 101
                            price:
                              type: string
                              example: '43.41'
                            price_in_currency:
                              type: string
                              example: $43.41
                            tax:
                              type: string
                              example: '2.99'
                            tax_in_currency:
                              type: string
                              example: $2.99
                            cv:
                              type: integer
                              example: 5
                            qv:
                              type: integer
                              example: 7
                            discount_amount:
                              type: string
                              example: '10'
                            discount_amount_in_currency:
                              type: string
                              example: $10.00
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            display_to_customer:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            product_title:
                              type:
                                - string
                                - 'null'
                              example: Sample Product
                            quantity:
                              type: integer
                              example: 3
                            subscription:
                              type: boolean
                              example: true
                            enrollment:
                              type: boolean
                              example: false
                            allow_subscription:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_plan_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_plans:
                              oneOf:
                                - type: array
                                  items:
                                    title: Commerce::SubscriptionPlan
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      name:
                                        example: Test Subscription Plan
                                        type: string
                                      billing_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      billing_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      shipping_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      shipping_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      trial_period:
                                        example: 1
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      trial_period_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type:
                                          - string
                                          - 'null'
                                      split_volume:
                                        example: true
                                        type: boolean
                                        default: false
                                      max_quantity:
                                        example: 100
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      company_default:
                                        example: false
                                        type:
                                          - boolean
                                          - 'null'
                                        default: false
                                      products_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      subscribers_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      price:
                                        type: string
                                      price_in_currency:
                                        type: string
                                      subscription_start:
                                        type: string
                                      subscribe_and_save:
                                        type: string
                                      subscribe_and_save_in_currency:
                                        type: string
                                      subscribe_and_save_for_display:
                                        type: string
                                    required:
                                      - id
                                      - name
                                      - billing_interval
                                      - billing_interval_unit
                                      - shipping_interval
                                      - shipping_interval_unit
                                      - split_volume
                                      - price
                                      - price_in_currency
                                      - subscription_start
                                      - subscribe_and_save
                                      - subscribe_and_save_in_currency
                                      - subscribe_and_save_for_display
                                - type: 'null'
                            subscription_only:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_interval:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_interval_unit:
                              type:
                                - string
                                - 'null'
                              example: month
                            subscription_price:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 10.5
                            subscription_price_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $10.50
                            subscription_start:
                              type:
                                - string
                                - 'null'
                              example: '2025-02-12'
                            subscribe_and_save:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 2.99
                            subscribe_and_save_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $2.99
                            subscribe_and_save_for_display:
                              type:
                                - string
                                - 'null'
                              example: Subscribe and save $2.99
                            title:
                              type:
                                - string
                                - 'null'
                              example: Surcharge
                            product:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type: string
                                      example: Sample Product
                                    cv:
                                      type: integer
                                      example: 10
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/product.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/product.png
                                    price:
                                      type: string
                                      example: '29.99'
                                    price_in_currency:
                                      type: string
                                      example: $29.99
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    tax:
                                      type: string
                                      example: '2.99'
                                    tax_in_currency:
                                      type: string
                                      example: $2.99
                                - type: 'null'
                            variant:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: Sample Variant
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/sample.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/sample.png
                                    primary_image:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/primary.png
                                    price:
                                      type:
                                        - string
                                        - 'null'
                                      example: '34.44'
                                    price_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $34.44
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    options:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          title:
                                            type: string
                                            example: Size
                                          value:
                                            type: string
                                            example: XL
                                - type: 'null'
                            errors:
                              oneOf:
                                - type: 'null'
                                - type: array
                                  items:
                                    type: object
                                    example:
                                      country:
                                        - >-
                                          This product is not available for this
                                          country. Please change your country
                      ship_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      bill_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      shipping_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type: string
                            example: Standard Shipping
                      available_shipping_methods:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            title:
                              type: string
                              example: Standard Shipping
                            price:
                              type:
                                - number
                                - string
                              example: 5.99
                            price_label:
                              type: string
                              example: $5.99
                            delivery_time_estimate:
                              type: string
                              example: 3-5 business days
                      available_payment_methods:
                        type: array
                        items:
                          oneOf:
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - credit_card
                                name:
                                  type: string
                                  example: Credit Card
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                                apple_pay:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method supports
                                    ApplePay or not 
                                bogus_gateway:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is a Bogus
                                    instance or not.
                                tokenize_path:
                                  type:
                                    - string
                                    - 'null'
                                  description: Path to tokenize, if applicable.
                                token_provider:
                                  type: string
                                  enum:
                                    - spreedly
                                    - vgs
                                  description: >-
                                    Determines if payment tokenization is via
                                    spreedly or VGS
                                apple_pay_merchant_identifier:
                                  type:
                                    - string
                                    - 'null'
                                  example: merchant.mycompany.com
                                  description: >-
                                    If ApplePay is supported, returns the
                                    merchant identifier registered with Apple,
                                    else returns nil
                                supported_brands:
                                  type: array
                                  items:
                                    type: string
                                  example:
                                    - visa
                                    - master
                                    - american_express
                                    - discover
                              required:
                                - id
                                - type
                                - name
                                - supported_brands
                                - test
                                - sandbox
                                - apple_pay
                                - apple_pay_merchant_identifier
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - klarna
                                name:
                                  type: string
                                  example: Klarna
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                      country:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          iso:
                            type: string
                            example: US
                          name:
                            type: string
                            example: United States
                          province_required:
                            type: boolean
                            example: false
                      type:
                        type: string
                        enum:
                          - regular
                          - enrollment
                        example: regular
                      enrollment_pack_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      enrollment_pack:
                        type:
                          - object
                          - 'null'
                        properties:
                          enrollment_pack_id:
                            type: integer
                            example: 1
                          additional_volume:
                            type:
                              - integer
                              - 'null'
                            example: 10
                          description:
                            type:
                              - object
                              - 'null'
                              - string
                            properties:
                              id:
                                type: integer
                                example: 111
                              name:
                                type: string
                                example: description
                              body:
                                type: string
                                example: >-
                                  <div>Try the latest and greatest of our sugar
                                  zip packs. Guaranteed to make you skinner and
                                  cure cancer.</div>
                              record_type:
                                type: string
                                example: EnrollmentPack
                              record_id:
                                type: integer
                                example: 1
                              created_at:
                                type: string
                                format: date_time
                                example: '2025-01-16T04:22:43.809Z'
                              updated_at:
                                type: string
                                format: date_time
                                example: '2025-01-22T10:23:52.941Z'
                              locale:
                                type: string
                                example: en
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: 10
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.00
                          images:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 2
                                relateable_type:
                                  type: string
                                  example: EnrollmentPack
                                relateable_id:
                                  type: integer
                                  example: 1
                                image_url:
                                  type: string
                                  example: >-
                                    https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                image_path:
                                  type: string
                                  example: jITWaU14QGe0y5AFgY7P_00179.svg
                                position:
                                  type: integer
                                  example: 1
                                shopify_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                                created_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                updated_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                external_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 625
                                allow_subscription:
                                  type: boolean
                                  example: true
                                cv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                cv_in_currency:
                                  type: string
                                  example: $0.00
                                enrollment:
                                  type: boolean
                                  example: true
                                enrollment_pack_id:
                                  type: integer
                                  example: 1
                                price:
                                  type: string
                                  example: '11.13'
                                price_in_currency:
                                  type: string
                                  example: $11.13
                                product_title:
                                  type: string
                                  example: Zip Pack Sample Pack (30)
                                quantity:
                                  type: integer
                                  example: 1
                                qv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                qv_in_currency:
                                  type: string
                                  example: $0.00
                                subscribe_and_save:
                                  type:
                                    - string
                                    - 'null'
                                  example: '-1988.87'
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $-1,988.87
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $-1,988.87
                                subscription:
                                  type: boolean
                                  example: false
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_only:
                                  type: boolean
                                  example: false
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_price:
                                  type: string
                                  example: '2000.0'
                                subscription_price_in_currency:
                                  type: string
                                  example: $2,000.00
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                  example: '2025-02-28'
                                tax:
                                  type: string
                                  example: '0.0'
                                tax_in_currency:
                                  type: string
                                  example: $0.00
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: null
                                display_to_customer:
                                  type: boolean
                                  example: false
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          price:
                            type:
                              - string
                              - integer
                            example: 11.13
                          price_in_currency:
                            type: string
                            example: $11.13
                          subscription_price:
                            type:
                              - string
                              - integer
                            example: 2000
                          subscription_price_in_currency:
                            type: string
                            example: $2,000.00
                          title:
                            type: string
                            example: enroll product
                          token:
                            type: string
                            example: NxL22AqLRRisfyF9LqxxWRak
                      recurring:
                        oneOf:
                          - type: array
                            items:
                              type: object
                              properties:
                                subtotal:
                                  type: string
                                  example: '10.0'
                                subtotal_in_currency:
                                  type: string
                                  example: $10.0
                                interval:
                                  type: integer
                                  example: 1
                                interval_unit:
                                  type: string
                                  example: month
                                subtotal_for_display:
                                  type: string
                                  example: $10.00 every 1 month
                                start_date:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-05-27'
                          - type: 'null'
                        default:
                          - subtotal: '10.0'
                            subtotal_in_currency: $10.0
                            interval: 1
                            interval_unit: month
                            subtotal_for_display: $10.00 every 1 month
                            start_date: '2025-05-27'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Enrollment pack already exists in cart
                  errors:
                    type: object
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '404':
          description: Enrollment pack not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Enrollment pack with id 1 not found
                  errors:
                    type: object
                    example:
                      enrollment_pack_id:
                        - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: Unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Invalid parameters
                  errors:
                    type: object
                    example:
                      enrollment_pack_id:
                        - is missing
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                enrollment_pack_id:
                  type: integer
              required:
                - enrollment_pack_id
  /api/carts/{cart_token}/items/{item_id}/subscribe:
    post:
      summary: Adds subscribe:true to cart item
      tags:
        - Carts
      operationId: addSubscriptionInCartItem
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
        - name: item_id
          in: path
          required: true
          schema:
            type: string
        - name: subscription_plan_id
          in: query
          description: ID of the subscription plan to use
          example: 123
          schema:
            type: integer
      responses:
        '200':
          description: subscription true updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  cart:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123
                      state:
                        type: string
                        example: start
                      processed:
                        type: boolean
                        example: false
                        description: >-
                          Determines if a cart payment has been processed or
                          not.
                      valid_for_checkout:
                        type: boolean
                        example: true
                      buyer_rep_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      currency_symbol:
                        type: string
                        example: $
                      currency_code:
                        type: string
                        example: USD
                      shipping_total_for_display:
                        type: string
                        example: Free
                      phone:
                        type:
                          - string
                          - 'null'
                        example: '4035551212'
                      payment_method_auto_assignable:
                        type: boolean
                        example: true
                        description: >-
                          Determines if a payment method can be auto-assigned to
                          the cart.
                      attribution:
                        oneOf:
                          - type: object
                            oneOf:
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  share_guid:
                                    type: string
                                    example: james-bond007
                                required:
                                  - id
                                  - share_guid
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  email:
                                    type: string
                                    example: james.bond@gmail.com
                                required:
                                  - id
                                  - email
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  username:
                                    type: string
                                    example: jaamball234
                                required:
                                  - id
                                  - username
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  fluid_rep_id:
                                    type: integer
                                    example: 23493
                                required:
                                  - id
                                  - fluid_rep_id
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  external_id:
                                    type:
                                      - string
                                      - 'null'
                                    example: w3sdf92
                                required:
                                  - id
                          - type: 'null'
                        default:
                          id: 456
                          share_guid: james-bond007
                      agreements:
                        type: array
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                              example: 1
                            required:
                              type: boolean
                              example: true
                            title:
                              type: string
                              example: Terms and Conditions
                            show_path:
                              type: string
                              example: /terms
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                      amount_total:
                        type: string
                        example: '121.65'
                      amount_total_in_currency:
                        type: string
                        example: $121.65 (USD)
                      sub_total:
                        type: string
                        example: '100.00'
                      sub_total_in_currency:
                        type: string
                        example: $100.00 (USD)
                      tax_total:
                        type: string
                        example: '20.00'
                      tax_total_in_currency:
                        type: string
                        example: $20.00 (USD)
                      shipping_total:
                        type: string
                        example: '1.65'
                      shipping_total_in_currency:
                        type: string
                        example: $1.65 (USD)
                      discount_total:
                        type: string
                        example: '2.99'
                      discount_total_in_currency:
                        type: string
                        example: $2.99 (USD)
                      transaction_fee:
                        type:
                          - number
                          - string
                        example: '1.90'
                      transaction_fee_in_currency:
                        type: string
                        example: $1.90 (USD)
                      cv_total:
                        type: integer
                        example: 10
                      qv_total:
                        type: integer
                        example: 15
                      company:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          primary_domain_hostname:
                            type:
                              - string
                              - 'null'
                            example: fluid.com
                          subdomain:
                            type:
                              - string
                              - 'null'
                            example: myco
                          logo_url:
                            type:
                              - string
                              - 'null'
                            example: https://example.com/logo.png
                          fluid_shop:
                            type:
                              - string
                              - 'null'
                            example: https://fluid-sample-shop.fluid.com
                          collect_phone:
                            type: boolean
                            example: true
                          require_phone:
                            type: boolean
                            example: false
                          require_billing_zip:
                            type: boolean
                            example: false
                          checkout_primary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                          checkout_primary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                      payment_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          cart_type:
                            type: string
                            example: credit_card
                          last_four:
                            type: string
                            example: '1234'
                          exp_month:
                            type: integer
                            example: 12
                          exp_year:
                            type: integer
                            example: 2025
                          logo_url:
                            type: string
                            example: https://example.com/image.svg
                      email:
                        type:
                          - string
                          - 'null'
                        example: user@example.com
                      enrollment_fee:
                        type:
                          - number
                          - string
                        example: '10.45'
                      enrollment_fee_in_currency:
                        type: string
                        example: $10.45
                      discount_code:
                        type:
                          - string
                          - 'null'
                        example: DISCOUNT10
                      language_iso:
                        type:
                          - string
                          - 'null'
                        example: en
                      cart_token:
                        type: string
                        example: abc123
                      immutable_items:
                        type: boolean
                        example: false
                      digital_only:
                        type: boolean
                        example: false
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 101
                            price:
                              type: string
                              example: '43.41'
                            price_in_currency:
                              type: string
                              example: $43.41
                            tax:
                              type: string
                              example: '2.99'
                            tax_in_currency:
                              type: string
                              example: $2.99
                            cv:
                              type: integer
                              example: 5
                            qv:
                              type: integer
                              example: 7
                            discount_amount:
                              type: string
                              example: '10'
                            discount_amount_in_currency:
                              type: string
                              example: $10.00
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            display_to_customer:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            product_title:
                              type:
                                - string
                                - 'null'
                              example: Sample Product
                            quantity:
                              type: integer
                              example: 3
                            subscription:
                              type: boolean
                              example: true
                            enrollment:
                              type: boolean
                              example: false
                            allow_subscription:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_plan_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_plans:
                              oneOf:
                                - type: array
                                  items:
                                    title: Commerce::SubscriptionPlan
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      name:
                                        example: Test Subscription Plan
                                        type: string
                                      billing_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      billing_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      shipping_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      shipping_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      trial_period:
                                        example: 1
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      trial_period_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type:
                                          - string
                                          - 'null'
                                      split_volume:
                                        example: true
                                        type: boolean
                                        default: false
                                      max_quantity:
                                        example: 100
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      company_default:
                                        example: false
                                        type:
                                          - boolean
                                          - 'null'
                                        default: false
                                      products_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      subscribers_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      price:
                                        type: string
                                      price_in_currency:
                                        type: string
                                      subscription_start:
                                        type: string
                                      subscribe_and_save:
                                        type: string
                                      subscribe_and_save_in_currency:
                                        type: string
                                      subscribe_and_save_for_display:
                                        type: string
                                    required:
                                      - id
                                      - name
                                      - billing_interval
                                      - billing_interval_unit
                                      - shipping_interval
                                      - shipping_interval_unit
                                      - split_volume
                                      - price
                                      - price_in_currency
                                      - subscription_start
                                      - subscribe_and_save
                                      - subscribe_and_save_in_currency
                                      - subscribe_and_save_for_display
                                - type: 'null'
                            subscription_only:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_interval:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_interval_unit:
                              type:
                                - string
                                - 'null'
                              example: month
                            subscription_price:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 10.5
                            subscription_price_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $10.50
                            subscription_start:
                              type:
                                - string
                                - 'null'
                              example: '2025-02-12'
                            subscribe_and_save:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 2.99
                            subscribe_and_save_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $2.99
                            subscribe_and_save_for_display:
                              type:
                                - string
                                - 'null'
                              example: Subscribe and save $2.99
                            title:
                              type:
                                - string
                                - 'null'
                              example: Surcharge
                            product:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type: string
                                      example: Sample Product
                                    cv:
                                      type: integer
                                      example: 10
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/product.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/product.png
                                    price:
                                      type: string
                                      example: '29.99'
                                    price_in_currency:
                                      type: string
                                      example: $29.99
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    tax:
                                      type: string
                                      example: '2.99'
                                    tax_in_currency:
                                      type: string
                                      example: $2.99
                                - type: 'null'
                            variant:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: Sample Variant
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/sample.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/sample.png
                                    primary_image:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/primary.png
                                    price:
                                      type:
                                        - string
                                        - 'null'
                                      example: '34.44'
                                    price_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $34.44
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    options:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          title:
                                            type: string
                                            example: Size
                                          value:
                                            type: string
                                            example: XL
                                - type: 'null'
                            errors:
                              oneOf:
                                - type: 'null'
                                - type: array
                                  items:
                                    type: object
                                    example:
                                      country:
                                        - >-
                                          This product is not available for this
                                          country. Please change your country
                      ship_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      bill_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      shipping_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type: string
                            example: Standard Shipping
                      available_shipping_methods:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            title:
                              type: string
                              example: Standard Shipping
                            price:
                              type:
                                - number
                                - string
                              example: 5.99
                            price_label:
                              type: string
                              example: $5.99
                            delivery_time_estimate:
                              type: string
                              example: 3-5 business days
                      available_payment_methods:
                        type: array
                        items:
                          oneOf:
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - credit_card
                                name:
                                  type: string
                                  example: Credit Card
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                                apple_pay:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method supports
                                    ApplePay or not 
                                bogus_gateway:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is a Bogus
                                    instance or not.
                                tokenize_path:
                                  type:
                                    - string
                                    - 'null'
                                  description: Path to tokenize, if applicable.
                                token_provider:
                                  type: string
                                  enum:
                                    - spreedly
                                    - vgs
                                  description: >-
                                    Determines if payment tokenization is via
                                    spreedly or VGS
                                apple_pay_merchant_identifier:
                                  type:
                                    - string
                                    - 'null'
                                  example: merchant.mycompany.com
                                  description: >-
                                    If ApplePay is supported, returns the
                                    merchant identifier registered with Apple,
                                    else returns nil
                                supported_brands:
                                  type: array
                                  items:
                                    type: string
                                  example:
                                    - visa
                                    - master
                                    - american_express
                                    - discover
                              required:
                                - id
                                - type
                                - name
                                - supported_brands
                                - test
                                - sandbox
                                - apple_pay
                                - apple_pay_merchant_identifier
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - klarna
                                name:
                                  type: string
                                  example: Klarna
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                      country:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          iso:
                            type: string
                            example: US
                          name:
                            type: string
                            example: United States
                          province_required:
                            type: boolean
                            example: false
                      type:
                        type: string
                        enum:
                          - regular
                          - enrollment
                        example: regular
                      enrollment_pack_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      enrollment_pack:
                        type:
                          - object
                          - 'null'
                        properties:
                          enrollment_pack_id:
                            type: integer
                            example: 1
                          additional_volume:
                            type:
                              - integer
                              - 'null'
                            example: 10
                          description:
                            type:
                              - object
                              - 'null'
                              - string
                            properties:
                              id:
                                type: integer
                                example: 111
                              name:
                                type: string
                                example: description
                              body:
                                type: string
                                example: >-
                                  <div>Try the latest and greatest of our sugar
                                  zip packs. Guaranteed to make you skinner and
                                  cure cancer.</div>
                              record_type:
                                type: string
                                example: EnrollmentPack
                              record_id:
                                type: integer
                                example: 1
                              created_at:
                                type: string
                                format: date_time
                                example: '2025-01-16T04:22:43.809Z'
                              updated_at:
                                type: string
                                format: date_time
                                example: '2025-01-22T10:23:52.941Z'
                              locale:
                                type: string
                                example: en
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: 10
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.00
                          images:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 2
                                relateable_type:
                                  type: string
                                  example: EnrollmentPack
                                relateable_id:
                                  type: integer
                                  example: 1
                                image_url:
                                  type: string
                                  example: >-
                                    https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                image_path:
                                  type: string
                                  example: jITWaU14QGe0y5AFgY7P_00179.svg
                                position:
                                  type: integer
                                  example: 1
                                shopify_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                                created_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                updated_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                external_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 625
                                allow_subscription:
                                  type: boolean
                                  example: true
                                cv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                cv_in_currency:
                                  type: string
                                  example: $0.00
                                enrollment:
                                  type: boolean
                                  example: true
                                enrollment_pack_id:
                                  type: integer
                                  example: 1
                                price:
                                  type: string
                                  example: '11.13'
                                price_in_currency:
                                  type: string
                                  example: $11.13
                                product_title:
                                  type: string
                                  example: Zip Pack Sample Pack (30)
                                quantity:
                                  type: integer
                                  example: 1
                                qv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                qv_in_currency:
                                  type: string
                                  example: $0.00
                                subscribe_and_save:
                                  type:
                                    - string
                                    - 'null'
                                  example: '-1988.87'
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $-1,988.87
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $-1,988.87
                                subscription:
                                  type: boolean
                                  example: false
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_only:
                                  type: boolean
                                  example: false
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_price:
                                  type: string
                                  example: '2000.0'
                                subscription_price_in_currency:
                                  type: string
                                  example: $2,000.00
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                  example: '2025-02-28'
                                tax:
                                  type: string
                                  example: '0.0'
                                tax_in_currency:
                                  type: string
                                  example: $0.00
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: null
                                display_to_customer:
                                  type: boolean
                                  example: false
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          price:
                            type:
                              - string
                              - integer
                            example: 11.13
                          price_in_currency:
                            type: string
                            example: $11.13
                          subscription_price:
                            type:
                              - string
                              - integer
                            example: 2000
                          subscription_price_in_currency:
                            type: string
                            example: $2,000.00
                          title:
                            type: string
                            example: enroll product
                          token:
                            type: string
                            example: NxL22AqLRRisfyF9LqxxWRak
                      recurring:
                        oneOf:
                          - type: array
                            items:
                              type: object
                              properties:
                                subtotal:
                                  type: string
                                  example: '10.0'
                                subtotal_in_currency:
                                  type: string
                                  example: $10.0
                                interval:
                                  type: integer
                                  example: 1
                                interval_unit:
                                  type: string
                                  example: month
                                subtotal_for_display:
                                  type: string
                                  example: $10.00 every 1 month
                                start_date:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-05-27'
                          - type: 'null'
                        default:
                          - subtotal: '10.0'
                            subtotal_in_currency: $10.0
                            interval: 1
                            interval_unit: month
                            subtotal_for_display: $10.00 every 1 month
                            start_date: '2025-05-27'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      checkout_url:
                        type: string
                        example: https://checkout.fluid.com/checkout?jwt=abc123
                      shop_url:
                        type: string
                        example: https://myco.fluid.app
        '410':
          description: Cart is processed and cannot be modified
        '422':
          description: cannot subscribe items
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unprocessable entity
                  errors:
                    type: object
                    example:
                      subscription:
                        - is not allowed
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
    delete:
      summary: Updates subscribe:false to cart item
      tags:
        - Carts
      operationId: deleteSubscriptionInCartItem
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
        - name: item_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: subscription false updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  cart:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123
                      state:
                        type: string
                        example: start
                      processed:
                        type: boolean
                        example: false
                        description: >-
                          Determines if a cart payment has been processed or
                          not.
                      valid_for_checkout:
                        type: boolean
                        example: true
                      buyer_rep_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      currency_symbol:
                        type: string
                        example: $
                      currency_code:
                        type: string
                        example: USD
                      shipping_total_for_display:
                        type: string
                        example: Free
                      phone:
                        type:
                          - string
                          - 'null'
                        example: '4035551212'
                      payment_method_auto_assignable:
                        type: boolean
                        example: true
                        description: >-
                          Determines if a payment method can be auto-assigned to
                          the cart.
                      attribution:
                        oneOf:
                          - type: object
                            oneOf:
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  share_guid:
                                    type: string
                                    example: james-bond007
                                required:
                                  - id
                                  - share_guid
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  email:
                                    type: string
                                    example: james.bond@gmail.com
                                required:
                                  - id
                                  - email
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  username:
                                    type: string
                                    example: jaamball234
                                required:
                                  - id
                                  - username
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  fluid_rep_id:
                                    type: integer
                                    example: 23493
                                required:
                                  - id
                                  - fluid_rep_id
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  external_id:
                                    type:
                                      - string
                                      - 'null'
                                    example: w3sdf92
                                required:
                                  - id
                          - type: 'null'
                        default:
                          id: 456
                          share_guid: james-bond007
                      agreements:
                        type: array
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                              example: 1
                            required:
                              type: boolean
                              example: true
                            title:
                              type: string
                              example: Terms and Conditions
                            show_path:
                              type: string
                              example: /terms
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                      amount_total:
                        type: string
                        example: '121.65'
                      amount_total_in_currency:
                        type: string
                        example: $121.65 (USD)
                      sub_total:
                        type: string
                        example: '100.00'
                      sub_total_in_currency:
                        type: string
                        example: $100.00 (USD)
                      tax_total:
                        type: string
                        example: '20.00'
                      tax_total_in_currency:
                        type: string
                        example: $20.00 (USD)
                      shipping_total:
                        type: string
                        example: '1.65'
                      shipping_total_in_currency:
                        type: string
                        example: $1.65 (USD)
                      discount_total:
                        type: string
                        example: '2.99'
                      discount_total_in_currency:
                        type: string
                        example: $2.99 (USD)
                      transaction_fee:
                        type:
                          - number
                          - string
                        example: '1.90'
                      transaction_fee_in_currency:
                        type: string
                        example: $1.90 (USD)
                      cv_total:
                        type: integer
                        example: 10
                      qv_total:
                        type: integer
                        example: 15
                      company:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          primary_domain_hostname:
                            type:
                              - string
                              - 'null'
                            example: fluid.com
                          subdomain:
                            type:
                              - string
                              - 'null'
                            example: myco
                          logo_url:
                            type:
                              - string
                              - 'null'
                            example: https://example.com/logo.png
                          fluid_shop:
                            type:
                              - string
                              - 'null'
                            example: https://fluid-sample-shop.fluid.com
                          collect_phone:
                            type: boolean
                            example: true
                          require_phone:
                            type: boolean
                            example: false
                          require_billing_zip:
                            type: boolean
                            example: false
                          checkout_primary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                          checkout_primary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                      payment_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          cart_type:
                            type: string
                            example: credit_card
                          last_four:
                            type: string
                            example: '1234'
                          exp_month:
                            type: integer
                            example: 12
                          exp_year:
                            type: integer
                            example: 2025
                          logo_url:
                            type: string
                            example: https://example.com/image.svg
                      email:
                        type:
                          - string
                          - 'null'
                        example: user@example.com
                      enrollment_fee:
                        type:
                          - number
                          - string
                        example: '10.45'
                      enrollment_fee_in_currency:
                        type: string
                        example: $10.45
                      discount_code:
                        type:
                          - string
                          - 'null'
                        example: DISCOUNT10
                      language_iso:
                        type:
                          - string
                          - 'null'
                        example: en
                      cart_token:
                        type: string
                        example: abc123
                      immutable_items:
                        type: boolean
                        example: false
                      digital_only:
                        type: boolean
                        example: false
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 101
                            price:
                              type: string
                              example: '43.41'
                            price_in_currency:
                              type: string
                              example: $43.41
                            tax:
                              type: string
                              example: '2.99'
                            tax_in_currency:
                              type: string
                              example: $2.99
                            cv:
                              type: integer
                              example: 5
                            qv:
                              type: integer
                              example: 7
                            discount_amount:
                              type: string
                              example: '10'
                            discount_amount_in_currency:
                              type: string
                              example: $10.00
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            display_to_customer:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            product_title:
                              type:
                                - string
                                - 'null'
                              example: Sample Product
                            quantity:
                              type: integer
                              example: 3
                            subscription:
                              type: boolean
                              example: true
                            enrollment:
                              type: boolean
                              example: false
                            allow_subscription:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_plan_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_plans:
                              oneOf:
                                - type: array
                                  items:
                                    title: Commerce::SubscriptionPlan
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      name:
                                        example: Test Subscription Plan
                                        type: string
                                      billing_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      billing_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      shipping_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      shipping_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      trial_period:
                                        example: 1
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      trial_period_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type:
                                          - string
                                          - 'null'
                                      split_volume:
                                        example: true
                                        type: boolean
                                        default: false
                                      max_quantity:
                                        example: 100
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      company_default:
                                        example: false
                                        type:
                                          - boolean
                                          - 'null'
                                        default: false
                                      products_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      subscribers_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      price:
                                        type: string
                                      price_in_currency:
                                        type: string
                                      subscription_start:
                                        type: string
                                      subscribe_and_save:
                                        type: string
                                      subscribe_and_save_in_currency:
                                        type: string
                                      subscribe_and_save_for_display:
                                        type: string
                                    required:
                                      - id
                                      - name
                                      - billing_interval
                                      - billing_interval_unit
                                      - shipping_interval
                                      - shipping_interval_unit
                                      - split_volume
                                      - price
                                      - price_in_currency
                                      - subscription_start
                                      - subscribe_and_save
                                      - subscribe_and_save_in_currency
                                      - subscribe_and_save_for_display
                                - type: 'null'
                            subscription_only:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_interval:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_interval_unit:
                              type:
                                - string
                                - 'null'
                              example: month
                            subscription_price:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 10.5
                            subscription_price_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $10.50
                            subscription_start:
                              type:
                                - string
                                - 'null'
                              example: '2025-02-12'
                            subscribe_and_save:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 2.99
                            subscribe_and_save_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $2.99
                            subscribe_and_save_for_display:
                              type:
                                - string
                                - 'null'
                              example: Subscribe and save $2.99
                            title:
                              type:
                                - string
                                - 'null'
                              example: Surcharge
                            product:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type: string
                                      example: Sample Product
                                    cv:
                                      type: integer
                                      example: 10
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/product.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/product.png
                                    price:
                                      type: string
                                      example: '29.99'
                                    price_in_currency:
                                      type: string
                                      example: $29.99
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    tax:
                                      type: string
                                      example: '2.99'
                                    tax_in_currency:
                                      type: string
                                      example: $2.99
                                - type: 'null'
                            variant:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: Sample Variant
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/sample.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/sample.png
                                    primary_image:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/primary.png
                                    price:
                                      type:
                                        - string
                                        - 'null'
                                      example: '34.44'
                                    price_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $34.44
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    options:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          title:
                                            type: string
                                            example: Size
                                          value:
                                            type: string
                                            example: XL
                                - type: 'null'
                            errors:
                              oneOf:
                                - type: 'null'
                                - type: array
                                  items:
                                    type: object
                                    example:
                                      country:
                                        - >-
                                          This product is not available for this
                                          country. Please change your country
                      ship_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      bill_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      shipping_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type: string
                            example: Standard Shipping
                      available_shipping_methods:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            title:
                              type: string
                              example: Standard Shipping
                            price:
                              type:
                                - number
                                - string
                              example: 5.99
                            price_label:
                              type: string
                              example: $5.99
                            delivery_time_estimate:
                              type: string
                              example: 3-5 business days
                      available_payment_methods:
                        type: array
                        items:
                          oneOf:
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - credit_card
                                name:
                                  type: string
                                  example: Credit Card
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                                apple_pay:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method supports
                                    ApplePay or not 
                                bogus_gateway:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is a Bogus
                                    instance or not.
                                tokenize_path:
                                  type:
                                    - string
                                    - 'null'
                                  description: Path to tokenize, if applicable.
                                token_provider:
                                  type: string
                                  enum:
                                    - spreedly
                                    - vgs
                                  description: >-
                                    Determines if payment tokenization is via
                                    spreedly or VGS
                                apple_pay_merchant_identifier:
                                  type:
                                    - string
                                    - 'null'
                                  example: merchant.mycompany.com
                                  description: >-
                                    If ApplePay is supported, returns the
                                    merchant identifier registered with Apple,
                                    else returns nil
                                supported_brands:
                                  type: array
                                  items:
                                    type: string
                                  example:
                                    - visa
                                    - master
                                    - american_express
                                    - discover
                              required:
                                - id
                                - type
                                - name
                                - supported_brands
                                - test
                                - sandbox
                                - apple_pay
                                - apple_pay_merchant_identifier
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - klarna
                                name:
                                  type: string
                                  example: Klarna
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                      country:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          iso:
                            type: string
                            example: US
                          name:
                            type: string
                            example: United States
                          province_required:
                            type: boolean
                            example: false
                      type:
                        type: string
                        enum:
                          - regular
                          - enrollment
                        example: regular
                      enrollment_pack_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      enrollment_pack:
                        type:
                          - object
                          - 'null'
                        properties:
                          enrollment_pack_id:
                            type: integer
                            example: 1
                          additional_volume:
                            type:
                              - integer
                              - 'null'
                            example: 10
                          description:
                            type:
                              - object
                              - 'null'
                              - string
                            properties:
                              id:
                                type: integer
                                example: 111
                              name:
                                type: string
                                example: description
                              body:
                                type: string
                                example: >-
                                  <div>Try the latest and greatest of our sugar
                                  zip packs. Guaranteed to make you skinner and
                                  cure cancer.</div>
                              record_type:
                                type: string
                                example: EnrollmentPack
                              record_id:
                                type: integer
                                example: 1
                              created_at:
                                type: string
                                format: date_time
                                example: '2025-01-16T04:22:43.809Z'
                              updated_at:
                                type: string
                                format: date_time
                                example: '2025-01-22T10:23:52.941Z'
                              locale:
                                type: string
                                example: en
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: 10
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.00
                          images:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 2
                                relateable_type:
                                  type: string
                                  example: EnrollmentPack
                                relateable_id:
                                  type: integer
                                  example: 1
                                image_url:
                                  type: string
                                  example: >-
                                    https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                image_path:
                                  type: string
                                  example: jITWaU14QGe0y5AFgY7P_00179.svg
                                position:
                                  type: integer
                                  example: 1
                                shopify_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                                created_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                updated_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                external_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 625
                                allow_subscription:
                                  type: boolean
                                  example: true
                                cv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                cv_in_currency:
                                  type: string
                                  example: $0.00
                                enrollment:
                                  type: boolean
                                  example: true
                                enrollment_pack_id:
                                  type: integer
                                  example: 1
                                price:
                                  type: string
                                  example: '11.13'
                                price_in_currency:
                                  type: string
                                  example: $11.13
                                product_title:
                                  type: string
                                  example: Zip Pack Sample Pack (30)
                                quantity:
                                  type: integer
                                  example: 1
                                qv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                qv_in_currency:
                                  type: string
                                  example: $0.00
                                subscribe_and_save:
                                  type:
                                    - string
                                    - 'null'
                                  example: '-1988.87'
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $-1,988.87
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $-1,988.87
                                subscription:
                                  type: boolean
                                  example: false
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_only:
                                  type: boolean
                                  example: false
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_price:
                                  type: string
                                  example: '2000.0'
                                subscription_price_in_currency:
                                  type: string
                                  example: $2,000.00
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                  example: '2025-02-28'
                                tax:
                                  type: string
                                  example: '0.0'
                                tax_in_currency:
                                  type: string
                                  example: $0.00
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: null
                                display_to_customer:
                                  type: boolean
                                  example: false
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          price:
                            type:
                              - string
                              - integer
                            example: 11.13
                          price_in_currency:
                            type: string
                            example: $11.13
                          subscription_price:
                            type:
                              - string
                              - integer
                            example: 2000
                          subscription_price_in_currency:
                            type: string
                            example: $2,000.00
                          title:
                            type: string
                            example: enroll product
                          token:
                            type: string
                            example: NxL22AqLRRisfyF9LqxxWRak
                      recurring:
                        oneOf:
                          - type: array
                            items:
                              type: object
                              properties:
                                subtotal:
                                  type: string
                                  example: '10.0'
                                subtotal_in_currency:
                                  type: string
                                  example: $10.0
                                interval:
                                  type: integer
                                  example: 1
                                interval_unit:
                                  type: string
                                  example: month
                                subtotal_for_display:
                                  type: string
                                  example: $10.00 every 1 month
                                start_date:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-05-27'
                          - type: 'null'
                        default:
                          - subtotal: '10.0'
                            subtotal_in_currency: $10.0
                            interval: 1
                            interval_unit: month
                            subtotal_for_display: $10.00 every 1 month
                            start_date: '2025-05-27'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      checkout_url:
                        type: string
                        example: https://checkout.fluid.com/checkout?jwt=abc123
                      shop_url:
                        type: string
                        example: https://myco.fluid.app
        '410':
          description: Cart is processed and cannot be modified
        '422':
          description: cannot be unsubscribed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unprocessable entity
                  errors:
                    type: object
                    example:
                      subscription:
                        - cannot be disabled
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
  /api/carts/{cart_token}/logout:
    delete:
      summary: Removes rep_buyer and customer for the cart
      tags:
        - Carts
      operationId: cartLogout
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Logout successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  cart:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123
                      state:
                        type: string
                        example: start
                      processed:
                        type: boolean
                        example: false
                        description: >-
                          Determines if a cart payment has been processed or
                          not.
                      valid_for_checkout:
                        type: boolean
                        example: true
                      buyer_rep_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      currency_symbol:
                        type: string
                        example: $
                      currency_code:
                        type: string
                        example: USD
                      shipping_total_for_display:
                        type: string
                        example: Free
                      phone:
                        type:
                          - string
                          - 'null'
                        example: '4035551212'
                      payment_method_auto_assignable:
                        type: boolean
                        example: true
                        description: >-
                          Determines if a payment method can be auto-assigned to
                          the cart.
                      attribution:
                        oneOf:
                          - type: object
                            oneOf:
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  share_guid:
                                    type: string
                                    example: james-bond007
                                required:
                                  - id
                                  - share_guid
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  email:
                                    type: string
                                    example: james.bond@gmail.com
                                required:
                                  - id
                                  - email
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  username:
                                    type: string
                                    example: jaamball234
                                required:
                                  - id
                                  - username
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  fluid_rep_id:
                                    type: integer
                                    example: 23493
                                required:
                                  - id
                                  - fluid_rep_id
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  external_id:
                                    type:
                                      - string
                                      - 'null'
                                    example: w3sdf92
                                required:
                                  - id
                          - type: 'null'
                        default:
                          id: 456
                          share_guid: james-bond007
                      agreements:
                        type: array
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                              example: 1
                            required:
                              type: boolean
                              example: true
                            title:
                              type: string
                              example: Terms and Conditions
                            show_path:
                              type: string
                              example: /terms
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                      amount_total:
                        type: string
                        example: '121.65'
                      amount_total_in_currency:
                        type: string
                        example: $121.65 (USD)
                      sub_total:
                        type: string
                        example: '100.00'
                      sub_total_in_currency:
                        type: string
                        example: $100.00 (USD)
                      tax_total:
                        type: string
                        example: '20.00'
                      tax_total_in_currency:
                        type: string
                        example: $20.00 (USD)
                      shipping_total:
                        type: string
                        example: '1.65'
                      shipping_total_in_currency:
                        type: string
                        example: $1.65 (USD)
                      discount_total:
                        type: string
                        example: '2.99'
                      discount_total_in_currency:
                        type: string
                        example: $2.99 (USD)
                      transaction_fee:
                        type:
                          - number
                          - string
                        example: '1.90'
                      transaction_fee_in_currency:
                        type: string
                        example: $1.90 (USD)
                      cv_total:
                        type: integer
                        example: 10
                      qv_total:
                        type: integer
                        example: 15
                      company:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          primary_domain_hostname:
                            type:
                              - string
                              - 'null'
                            example: fluid.com
                          subdomain:
                            type:
                              - string
                              - 'null'
                            example: myco
                          logo_url:
                            type:
                              - string
                              - 'null'
                            example: https://example.com/logo.png
                          fluid_shop:
                            type:
                              - string
                              - 'null'
                            example: https://fluid-sample-shop.fluid.com
                          collect_phone:
                            type: boolean
                            example: true
                          require_phone:
                            type: boolean
                            example: false
                          require_billing_zip:
                            type: boolean
                            example: false
                          checkout_primary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                          checkout_primary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                      payment_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          cart_type:
                            type: string
                            example: credit_card
                          last_four:
                            type: string
                            example: '1234'
                          exp_month:
                            type: integer
                            example: 12
                          exp_year:
                            type: integer
                            example: 2025
                          logo_url:
                            type: string
                            example: https://example.com/image.svg
                      email:
                        type:
                          - string
                          - 'null'
                        example: user@example.com
                      enrollment_fee:
                        type:
                          - number
                          - string
                        example: '10.45'
                      enrollment_fee_in_currency:
                        type: string
                        example: $10.45
                      discount_code:
                        type:
                          - string
                          - 'null'
                        example: DISCOUNT10
                      language_iso:
                        type:
                          - string
                          - 'null'
                        example: en
                      cart_token:
                        type: string
                        example: abc123
                      immutable_items:
                        type: boolean
                        example: false
                      digital_only:
                        type: boolean
                        example: false
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 101
                            price:
                              type: string
                              example: '43.41'
                            price_in_currency:
                              type: string
                              example: $43.41
                            tax:
                              type: string
                              example: '2.99'
                            tax_in_currency:
                              type: string
                              example: $2.99
                            cv:
                              type: integer
                              example: 5
                            qv:
                              type: integer
                              example: 7
                            discount_amount:
                              type: string
                              example: '10'
                            discount_amount_in_currency:
                              type: string
                              example: $10.00
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            display_to_customer:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            product_title:
                              type:
                                - string
                                - 'null'
                              example: Sample Product
                            quantity:
                              type: integer
                              example: 3
                            subscription:
                              type: boolean
                              example: true
                            enrollment:
                              type: boolean
                              example: false
                            allow_subscription:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_plan_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_plans:
                              oneOf:
                                - type: array
                                  items:
                                    title: Commerce::SubscriptionPlan
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      name:
                                        example: Test Subscription Plan
                                        type: string
                                      billing_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      billing_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      shipping_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      shipping_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      trial_period:
                                        example: 1
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      trial_period_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type:
                                          - string
                                          - 'null'
                                      split_volume:
                                        example: true
                                        type: boolean
                                        default: false
                                      max_quantity:
                                        example: 100
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      company_default:
                                        example: false
                                        type:
                                          - boolean
                                          - 'null'
                                        default: false
                                      products_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      subscribers_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      price:
                                        type: string
                                      price_in_currency:
                                        type: string
                                      subscription_start:
                                        type: string
                                      subscribe_and_save:
                                        type: string
                                      subscribe_and_save_in_currency:
                                        type: string
                                      subscribe_and_save_for_display:
                                        type: string
                                    required:
                                      - id
                                      - name
                                      - billing_interval
                                      - billing_interval_unit
                                      - shipping_interval
                                      - shipping_interval_unit
                                      - split_volume
                                      - price
                                      - price_in_currency
                                      - subscription_start
                                      - subscribe_and_save
                                      - subscribe_and_save_in_currency
                                      - subscribe_and_save_for_display
                                - type: 'null'
                            subscription_only:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_interval:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_interval_unit:
                              type:
                                - string
                                - 'null'
                              example: month
                            subscription_price:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 10.5
                            subscription_price_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $10.50
                            subscription_start:
                              type:
                                - string
                                - 'null'
                              example: '2025-02-12'
                            subscribe_and_save:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 2.99
                            subscribe_and_save_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $2.99
                            subscribe_and_save_for_display:
                              type:
                                - string
                                - 'null'
                              example: Subscribe and save $2.99
                            title:
                              type:
                                - string
                                - 'null'
                              example: Surcharge
                            product:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type: string
                                      example: Sample Product
                                    cv:
                                      type: integer
                                      example: 10
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/product.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/product.png
                                    price:
                                      type: string
                                      example: '29.99'
                                    price_in_currency:
                                      type: string
                                      example: $29.99
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    tax:
                                      type: string
                                      example: '2.99'
                                    tax_in_currency:
                                      type: string
                                      example: $2.99
                                - type: 'null'
                            variant:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: Sample Variant
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/sample.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/sample.png
                                    primary_image:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/primary.png
                                    price:
                                      type:
                                        - string
                                        - 'null'
                                      example: '34.44'
                                    price_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $34.44
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    options:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          title:
                                            type: string
                                            example: Size
                                          value:
                                            type: string
                                            example: XL
                                - type: 'null'
                            errors:
                              oneOf:
                                - type: 'null'
                                - type: array
                                  items:
                                    type: object
                                    example:
                                      country:
                                        - >-
                                          This product is not available for this
                                          country. Please change your country
                      ship_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      bill_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      shipping_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type: string
                            example: Standard Shipping
                      available_shipping_methods:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            title:
                              type: string
                              example: Standard Shipping
                            price:
                              type:
                                - number
                                - string
                              example: 5.99
                            price_label:
                              type: string
                              example: $5.99
                            delivery_time_estimate:
                              type: string
                              example: 3-5 business days
                      available_payment_methods:
                        type: array
                        items:
                          oneOf:
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - credit_card
                                name:
                                  type: string
                                  example: Credit Card
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                                apple_pay:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method supports
                                    ApplePay or not 
                                bogus_gateway:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is a Bogus
                                    instance or not.
                                tokenize_path:
                                  type:
                                    - string
                                    - 'null'
                                  description: Path to tokenize, if applicable.
                                token_provider:
                                  type: string
                                  enum:
                                    - spreedly
                                    - vgs
                                  description: >-
                                    Determines if payment tokenization is via
                                    spreedly or VGS
                                apple_pay_merchant_identifier:
                                  type:
                                    - string
                                    - 'null'
                                  example: merchant.mycompany.com
                                  description: >-
                                    If ApplePay is supported, returns the
                                    merchant identifier registered with Apple,
                                    else returns nil
                                supported_brands:
                                  type: array
                                  items:
                                    type: string
                                  example:
                                    - visa
                                    - master
                                    - american_express
                                    - discover
                              required:
                                - id
                                - type
                                - name
                                - supported_brands
                                - test
                                - sandbox
                                - apple_pay
                                - apple_pay_merchant_identifier
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - klarna
                                name:
                                  type: string
                                  example: Klarna
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                      country:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          iso:
                            type: string
                            example: US
                          name:
                            type: string
                            example: United States
                          province_required:
                            type: boolean
                            example: false
                      type:
                        type: string
                        enum:
                          - regular
                          - enrollment
                        example: regular
                      enrollment_pack_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      enrollment_pack:
                        type:
                          - object
                          - 'null'
                        properties:
                          enrollment_pack_id:
                            type: integer
                            example: 1
                          additional_volume:
                            type:
                              - integer
                              - 'null'
                            example: 10
                          description:
                            type:
                              - object
                              - 'null'
                              - string
                            properties:
                              id:
                                type: integer
                                example: 111
                              name:
                                type: string
                                example: description
                              body:
                                type: string
                                example: >-
                                  <div>Try the latest and greatest of our sugar
                                  zip packs. Guaranteed to make you skinner and
                                  cure cancer.</div>
                              record_type:
                                type: string
                                example: EnrollmentPack
                              record_id:
                                type: integer
                                example: 1
                              created_at:
                                type: string
                                format: date_time
                                example: '2025-01-16T04:22:43.809Z'
                              updated_at:
                                type: string
                                format: date_time
                                example: '2025-01-22T10:23:52.941Z'
                              locale:
                                type: string
                                example: en
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: 10
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.00
                          images:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 2
                                relateable_type:
                                  type: string
                                  example: EnrollmentPack
                                relateable_id:
                                  type: integer
                                  example: 1
                                image_url:
                                  type: string
                                  example: >-
                                    https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                image_path:
                                  type: string
                                  example: jITWaU14QGe0y5AFgY7P_00179.svg
                                position:
                                  type: integer
                                  example: 1
                                shopify_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                                created_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                updated_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                external_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 625
                                allow_subscription:
                                  type: boolean
                                  example: true
                                cv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                cv_in_currency:
                                  type: string
                                  example: $0.00
                                enrollment:
                                  type: boolean
                                  example: true
                                enrollment_pack_id:
                                  type: integer
                                  example: 1
                                price:
                                  type: string
                                  example: '11.13'
                                price_in_currency:
                                  type: string
                                  example: $11.13
                                product_title:
                                  type: string
                                  example: Zip Pack Sample Pack (30)
                                quantity:
                                  type: integer
                                  example: 1
                                qv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                qv_in_currency:
                                  type: string
                                  example: $0.00
                                subscribe_and_save:
                                  type:
                                    - string
                                    - 'null'
                                  example: '-1988.87'
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $-1,988.87
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $-1,988.87
                                subscription:
                                  type: boolean
                                  example: false
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_only:
                                  type: boolean
                                  example: false
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_price:
                                  type: string
                                  example: '2000.0'
                                subscription_price_in_currency:
                                  type: string
                                  example: $2,000.00
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                  example: '2025-02-28'
                                tax:
                                  type: string
                                  example: '0.0'
                                tax_in_currency:
                                  type: string
                                  example: $0.00
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: null
                                display_to_customer:
                                  type: boolean
                                  example: false
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          price:
                            type:
                              - string
                              - integer
                            example: 11.13
                          price_in_currency:
                            type: string
                            example: $11.13
                          subscription_price:
                            type:
                              - string
                              - integer
                            example: 2000
                          subscription_price_in_currency:
                            type: string
                            example: $2,000.00
                          title:
                            type: string
                            example: enroll product
                          token:
                            type: string
                            example: NxL22AqLRRisfyF9LqxxWRak
                      recurring:
                        oneOf:
                          - type: array
                            items:
                              type: object
                              properties:
                                subtotal:
                                  type: string
                                  example: '10.0'
                                subtotal_in_currency:
                                  type: string
                                  example: $10.0
                                interval:
                                  type: integer
                                  example: 1
                                interval_unit:
                                  type: string
                                  example: month
                                subtotal_for_display:
                                  type: string
                                  example: $10.00 every 1 month
                                start_date:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-05-27'
                          - type: 'null'
                        default:
                          - subtotal: '10.0'
                            subtotal_in_currency: $10.0
                            interval: 1
                            interval_unit: month
                            subtotal_for_display: $10.00 every 1 month
                            start_date: '2025-05-27'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      checkout_url:
                        type: string
                        example: https://checkout.fluid.com/checkout?jwt=abc123
                      shop_url:
                        type: string
                        example: https://myco.fluid.app
        '404':
          description: cart not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Cart not found
                  errors:
                    type: object
                    example:
                      cart:
                        - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '410':
          description: Cart is processed and cannot be modified
  /api/carts/{cart_token}/attribution:
    patch:
      summary: Updates cart attribution
      tags:
        - Carts
      description: Updates attribution data for a cart
      operationId: updateCartAttribution
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: attribution updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  cart:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123
                      state:
                        type: string
                        example: start
                      processed:
                        type: boolean
                        example: false
                        description: >-
                          Determines if a cart payment has been processed or
                          not.
                      valid_for_checkout:
                        type: boolean
                        example: true
                      buyer_rep_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      currency_symbol:
                        type: string
                        example: $
                      currency_code:
                        type: string
                        example: USD
                      shipping_total_for_display:
                        type: string
                        example: Free
                      phone:
                        type:
                          - string
                          - 'null'
                        example: '4035551212'
                      payment_method_auto_assignable:
                        type: boolean
                        example: true
                        description: >-
                          Determines if a payment method can be auto-assigned to
                          the cart.
                      attribution:
                        oneOf:
                          - type: object
                            oneOf:
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  share_guid:
                                    type: string
                                    example: james-bond007
                                required:
                                  - id
                                  - share_guid
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  email:
                                    type: string
                                    example: james.bond@gmail.com
                                required:
                                  - id
                                  - email
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  username:
                                    type: string
                                    example: jaamball234
                                required:
                                  - id
                                  - username
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  fluid_rep_id:
                                    type: integer
                                    example: 23493
                                required:
                                  - id
                                  - fluid_rep_id
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  external_id:
                                    type:
                                      - string
                                      - 'null'
                                    example: w3sdf92
                                required:
                                  - id
                          - type: 'null'
                        default:
                          id: 456
                          share_guid: james-bond007
                      agreements:
                        type: array
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                              example: 1
                            required:
                              type: boolean
                              example: true
                            title:
                              type: string
                              example: Terms and Conditions
                            show_path:
                              type: string
                              example: /terms
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                      amount_total:
                        type: string
                        example: '121.65'
                      amount_total_in_currency:
                        type: string
                        example: $121.65 (USD)
                      sub_total:
                        type: string
                        example: '100.00'
                      sub_total_in_currency:
                        type: string
                        example: $100.00 (USD)
                      tax_total:
                        type: string
                        example: '20.00'
                      tax_total_in_currency:
                        type: string
                        example: $20.00 (USD)
                      shipping_total:
                        type: string
                        example: '1.65'
                      shipping_total_in_currency:
                        type: string
                        example: $1.65 (USD)
                      discount_total:
                        type: string
                        example: '2.99'
                      discount_total_in_currency:
                        type: string
                        example: $2.99 (USD)
                      transaction_fee:
                        type:
                          - number
                          - string
                        example: '1.90'
                      transaction_fee_in_currency:
                        type: string
                        example: $1.90 (USD)
                      cv_total:
                        type: integer
                        example: 10
                      qv_total:
                        type: integer
                        example: 15
                      company:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          primary_domain_hostname:
                            type:
                              - string
                              - 'null'
                            example: fluid.com
                          subdomain:
                            type:
                              - string
                              - 'null'
                            example: myco
                          logo_url:
                            type:
                              - string
                              - 'null'
                            example: https://example.com/logo.png
                          fluid_shop:
                            type:
                              - string
                              - 'null'
                            example: https://fluid-sample-shop.fluid.com
                          collect_phone:
                            type: boolean
                            example: true
                          require_phone:
                            type: boolean
                            example: false
                          require_billing_zip:
                            type: boolean
                            example: false
                          checkout_primary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                          checkout_primary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                      payment_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          cart_type:
                            type: string
                            example: credit_card
                          last_four:
                            type: string
                            example: '1234'
                          exp_month:
                            type: integer
                            example: 12
                          exp_year:
                            type: integer
                            example: 2025
                          logo_url:
                            type: string
                            example: https://example.com/image.svg
                      email:
                        type:
                          - string
                          - 'null'
                        example: user@example.com
                      enrollment_fee:
                        type:
                          - number
                          - string
                        example: '10.45'
                      enrollment_fee_in_currency:
                        type: string
                        example: $10.45
                      discount_code:
                        type:
                          - string
                          - 'null'
                        example: DISCOUNT10
                      language_iso:
                        type:
                          - string
                          - 'null'
                        example: en
                      cart_token:
                        type: string
                        example: abc123
                      immutable_items:
                        type: boolean
                        example: false
                      digital_only:
                        type: boolean
                        example: false
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 101
                            price:
                              type: string
                              example: '43.41'
                            price_in_currency:
                              type: string
                              example: $43.41
                            tax:
                              type: string
                              example: '2.99'
                            tax_in_currency:
                              type: string
                              example: $2.99
                            cv:
                              type: integer
                              example: 5
                            qv:
                              type: integer
                              example: 7
                            discount_amount:
                              type: string
                              example: '10'
                            discount_amount_in_currency:
                              type: string
                              example: $10.00
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            display_to_customer:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            product_title:
                              type:
                                - string
                                - 'null'
                              example: Sample Product
                            quantity:
                              type: integer
                              example: 3
                            subscription:
                              type: boolean
                              example: true
                            enrollment:
                              type: boolean
                              example: false
                            allow_subscription:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_plan_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_plans:
                              oneOf:
                                - type: array
                                  items:
                                    title: Commerce::SubscriptionPlan
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      name:
                                        example: Test Subscription Plan
                                        type: string
                                      billing_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      billing_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      shipping_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      shipping_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      trial_period:
                                        example: 1
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      trial_period_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type:
                                          - string
                                          - 'null'
                                      split_volume:
                                        example: true
                                        type: boolean
                                        default: false
                                      max_quantity:
                                        example: 100
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      company_default:
                                        example: false
                                        type:
                                          - boolean
                                          - 'null'
                                        default: false
                                      products_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      subscribers_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      price:
                                        type: string
                                      price_in_currency:
                                        type: string
                                      subscription_start:
                                        type: string
                                      subscribe_and_save:
                                        type: string
                                      subscribe_and_save_in_currency:
                                        type: string
                                      subscribe_and_save_for_display:
                                        type: string
                                    required:
                                      - id
                                      - name
                                      - billing_interval
                                      - billing_interval_unit
                                      - shipping_interval
                                      - shipping_interval_unit
                                      - split_volume
                                      - price
                                      - price_in_currency
                                      - subscription_start
                                      - subscribe_and_save
                                      - subscribe_and_save_in_currency
                                      - subscribe_and_save_for_display
                                - type: 'null'
                            subscription_only:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_interval:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_interval_unit:
                              type:
                                - string
                                - 'null'
                              example: month
                            subscription_price:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 10.5
                            subscription_price_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $10.50
                            subscription_start:
                              type:
                                - string
                                - 'null'
                              example: '2025-02-12'
                            subscribe_and_save:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 2.99
                            subscribe_and_save_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $2.99
                            subscribe_and_save_for_display:
                              type:
                                - string
                                - 'null'
                              example: Subscribe and save $2.99
                            title:
                              type:
                                - string
                                - 'null'
                              example: Surcharge
                            product:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type: string
                                      example: Sample Product
                                    cv:
                                      type: integer
                                      example: 10
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/product.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/product.png
                                    price:
                                      type: string
                                      example: '29.99'
                                    price_in_currency:
                                      type: string
                                      example: $29.99
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    tax:
                                      type: string
                                      example: '2.99'
                                    tax_in_currency:
                                      type: string
                                      example: $2.99
                                - type: 'null'
                            variant:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: Sample Variant
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/sample.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/sample.png
                                    primary_image:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/primary.png
                                    price:
                                      type:
                                        - string
                                        - 'null'
                                      example: '34.44'
                                    price_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $34.44
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    options:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          title:
                                            type: string
                                            example: Size
                                          value:
                                            type: string
                                            example: XL
                                - type: 'null'
                            errors:
                              oneOf:
                                - type: 'null'
                                - type: array
                                  items:
                                    type: object
                                    example:
                                      country:
                                        - >-
                                          This product is not available for this
                                          country. Please change your country
                      ship_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      bill_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      shipping_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type: string
                            example: Standard Shipping
                      available_shipping_methods:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            title:
                              type: string
                              example: Standard Shipping
                            price:
                              type:
                                - number
                                - string
                              example: 5.99
                            price_label:
                              type: string
                              example: $5.99
                            delivery_time_estimate:
                              type: string
                              example: 3-5 business days
                      available_payment_methods:
                        type: array
                        items:
                          oneOf:
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - credit_card
                                name:
                                  type: string
                                  example: Credit Card
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                                apple_pay:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method supports
                                    ApplePay or not 
                                bogus_gateway:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is a Bogus
                                    instance or not.
                                tokenize_path:
                                  type:
                                    - string
                                    - 'null'
                                  description: Path to tokenize, if applicable.
                                token_provider:
                                  type: string
                                  enum:
                                    - spreedly
                                    - vgs
                                  description: >-
                                    Determines if payment tokenization is via
                                    spreedly or VGS
                                apple_pay_merchant_identifier:
                                  type:
                                    - string
                                    - 'null'
                                  example: merchant.mycompany.com
                                  description: >-
                                    If ApplePay is supported, returns the
                                    merchant identifier registered with Apple,
                                    else returns nil
                                supported_brands:
                                  type: array
                                  items:
                                    type: string
                                  example:
                                    - visa
                                    - master
                                    - american_express
                                    - discover
                              required:
                                - id
                                - type
                                - name
                                - supported_brands
                                - test
                                - sandbox
                                - apple_pay
                                - apple_pay_merchant_identifier
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - klarna
                                name:
                                  type: string
                                  example: Klarna
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                      country:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          iso:
                            type: string
                            example: US
                          name:
                            type: string
                            example: United States
                          province_required:
                            type: boolean
                            example: false
                      type:
                        type: string
                        enum:
                          - regular
                          - enrollment
                        example: regular
                      enrollment_pack_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      enrollment_pack:
                        type:
                          - object
                          - 'null'
                        properties:
                          enrollment_pack_id:
                            type: integer
                            example: 1
                          additional_volume:
                            type:
                              - integer
                              - 'null'
                            example: 10
                          description:
                            type:
                              - object
                              - 'null'
                              - string
                            properties:
                              id:
                                type: integer
                                example: 111
                              name:
                                type: string
                                example: description
                              body:
                                type: string
                                example: >-
                                  <div>Try the latest and greatest of our sugar
                                  zip packs. Guaranteed to make you skinner and
                                  cure cancer.</div>
                              record_type:
                                type: string
                                example: EnrollmentPack
                              record_id:
                                type: integer
                                example: 1
                              created_at:
                                type: string
                                format: date_time
                                example: '2025-01-16T04:22:43.809Z'
                              updated_at:
                                type: string
                                format: date_time
                                example: '2025-01-22T10:23:52.941Z'
                              locale:
                                type: string
                                example: en
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: 10
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.00
                          images:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 2
                                relateable_type:
                                  type: string
                                  example: EnrollmentPack
                                relateable_id:
                                  type: integer
                                  example: 1
                                image_url:
                                  type: string
                                  example: >-
                                    https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                image_path:
                                  type: string
                                  example: jITWaU14QGe0y5AFgY7P_00179.svg
                                position:
                                  type: integer
                                  example: 1
                                shopify_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                                created_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                updated_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                external_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 625
                                allow_subscription:
                                  type: boolean
                                  example: true
                                cv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                cv_in_currency:
                                  type: string
                                  example: $0.00
                                enrollment:
                                  type: boolean
                                  example: true
                                enrollment_pack_id:
                                  type: integer
                                  example: 1
                                price:
                                  type: string
                                  example: '11.13'
                                price_in_currency:
                                  type: string
                                  example: $11.13
                                product_title:
                                  type: string
                                  example: Zip Pack Sample Pack (30)
                                quantity:
                                  type: integer
                                  example: 1
                                qv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                qv_in_currency:
                                  type: string
                                  example: $0.00
                                subscribe_and_save:
                                  type:
                                    - string
                                    - 'null'
                                  example: '-1988.87'
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $-1,988.87
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $-1,988.87
                                subscription:
                                  type: boolean
                                  example: false
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_only:
                                  type: boolean
                                  example: false
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_price:
                                  type: string
                                  example: '2000.0'
                                subscription_price_in_currency:
                                  type: string
                                  example: $2,000.00
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                  example: '2025-02-28'
                                tax:
                                  type: string
                                  example: '0.0'
                                tax_in_currency:
                                  type: string
                                  example: $0.00
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: null
                                display_to_customer:
                                  type: boolean
                                  example: false
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          price:
                            type:
                              - string
                              - integer
                            example: 11.13
                          price_in_currency:
                            type: string
                            example: $11.13
                          subscription_price:
                            type:
                              - string
                              - integer
                            example: 2000
                          subscription_price_in_currency:
                            type: string
                            example: $2,000.00
                          title:
                            type: string
                            example: enroll product
                          token:
                            type: string
                            example: NxL22AqLRRisfyF9LqxxWRak
                      recurring:
                        oneOf:
                          - type: array
                            items:
                              type: object
                              properties:
                                subtotal:
                                  type: string
                                  example: '10.0'
                                subtotal_in_currency:
                                  type: string
                                  example: $10.0
                                interval:
                                  type: integer
                                  example: 1
                                interval_unit:
                                  type: string
                                  example: month
                                subtotal_for_display:
                                  type: string
                                  example: $10.00 every 1 month
                                start_date:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-05-27'
                          - type: 'null'
                        default:
                          - subtotal: '10.0'
                            subtotal_in_currency: $10.0
                            interval: 1
                            interval_unit: month
                            subtotal_for_display: $10.00 every 1 month
                            start_date: '2025-05-27'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '404':
          description: cart not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                      example:
                        - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '410':
          description: cart is processed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Cart is processed
                  errors:
                    type: object
                    example:
                      cart: Cart is processed
                  meta:
                    type: object
                    properties:
                      shop_url:
                        type: string
                        example: https://example.myshopify.com
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      cart:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 123
                          state:
                            type: string
                            example: start
                          processed:
                            type: boolean
                            example: false
                            description: >-
                              Determines if a cart payment has been processed or
                              not.
                          valid_for_checkout:
                            type: boolean
                            example: true
                          buyer_rep_id:
                            type:
                              - integer
                              - 'null'
                            example: 1
                          currency_symbol:
                            type: string
                            example: $
                          currency_code:
                            type: string
                            example: USD
                          shipping_total_for_display:
                            type: string
                            example: Free
                          phone:
                            type:
                              - string
                              - 'null'
                            example: '4035551212'
                          payment_method_auto_assignable:
                            type: boolean
                            example: true
                            description: >-
                              Determines if a payment method can be
                              auto-assigned to the cart.
                          attribution:
                            oneOf:
                              - type: object
                                oneOf:
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      share_guid:
                                        type: string
                                        example: james-bond007
                                    required:
                                      - id
                                      - share_guid
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      email:
                                        type: string
                                        example: james.bond@gmail.com
                                    required:
                                      - id
                                      - email
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      username:
                                        type: string
                                        example: jaamball234
                                    required:
                                      - id
                                      - username
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      fluid_rep_id:
                                        type: integer
                                        example: 23493
                                    required:
                                      - id
                                      - fluid_rep_id
                                  - properties:
                                      id:
                                        type:
                                          - integer
                                          - 'null'
                                        example: 456
                                      external_id:
                                        type:
                                          - string
                                          - 'null'
                                        example: w3sdf92
                                    required:
                                      - id
                              - type: 'null'
                            default:
                              id: 456
                              share_guid: james-bond007
                          agreements:
                            type: array
                            items:
                              type:
                                - object
                                - 'null'
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                required:
                                  type: boolean
                                  example: true
                                title:
                                  type: string
                                  example: Terms and Conditions
                                show_path:
                                  type: string
                                  example: /terms
                                enrollment_pack_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                          amount_total:
                            type: string
                            example: '121.65'
                          amount_total_in_currency:
                            type: string
                            example: $121.65 (USD)
                          sub_total:
                            type: string
                            example: '100.00'
                          sub_total_in_currency:
                            type: string
                            example: $100.00 (USD)
                          tax_total:
                            type: string
                            example: '20.00'
                          tax_total_in_currency:
                            type: string
                            example: $20.00 (USD)
                          shipping_total:
                            type: string
                            example: '1.65'
                          shipping_total_in_currency:
                            type: string
                            example: $1.65 (USD)
                          discount_total:
                            type: string
                            example: '2.99'
                          discount_total_in_currency:
                            type: string
                            example: $2.99 (USD)
                          transaction_fee:
                            type:
                              - number
                              - string
                            example: '1.90'
                          transaction_fee_in_currency:
                            type: string
                            example: $1.90 (USD)
                          cv_total:
                            type: integer
                            example: 10
                          qv_total:
                            type: integer
                            example: 15
                          company:
                            type: object
                            properties:
                              id:
                                type: integer
                              name:
                                type: string
                              primary_domain_hostname:
                                type:
                                  - string
                                  - 'null'
                                example: fluid.com
                              subdomain:
                                type:
                                  - string
                                  - 'null'
                                example: myco
                              logo_url:
                                type:
                                  - string
                                  - 'null'
                                example: https://example.com/logo.png
                              fluid_shop:
                                type:
                                  - string
                                  - 'null'
                                example: https://fluid-sample-shop.fluid.com
                              collect_phone:
                                type: boolean
                                example: true
                              require_phone:
                                type: boolean
                                example: false
                              require_billing_zip:
                                type: boolean
                                example: false
                              checkout_primary_button_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#000000'
                              checkout_primary_text_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#FFFFFF'
                              checkout_secondary_button_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#FFFFFF'
                              checkout_secondary_text_color:
                                type:
                                  - string
                                  - 'null'
                                example: '#000000'
                          payment_method:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              cart_type:
                                type: string
                                example: credit_card
                              last_four:
                                type: string
                                example: '1234'
                              exp_month:
                                type: integer
                                example: 12
                              exp_year:
                                type: integer
                                example: 2025
                              logo_url:
                                type: string
                                example: https://example.com/image.svg
                          email:
                            type:
                              - string
                              - 'null'
                            example: user@example.com
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: '10.45'
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.45
                          discount_code:
                            type:
                              - string
                              - 'null'
                            example: DISCOUNT10
                          language_iso:
                            type:
                              - string
                              - 'null'
                            example: en
                          cart_token:
                            type: string
                            example: abc123
                          immutable_items:
                            type: boolean
                            example: false
                          digital_only:
                            type: boolean
                            example: false
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 101
                                price:
                                  type: string
                                  example: '43.41'
                                price_in_currency:
                                  type: string
                                  example: $43.41
                                tax:
                                  type: string
                                  example: '2.99'
                                tax_in_currency:
                                  type: string
                                  example: $2.99
                                cv:
                                  type: integer
                                  example: 5
                                qv:
                                  type: integer
                                  example: 7
                                discount_amount:
                                  type: string
                                  example: '10'
                                discount_amount_in_currency:
                                  type: string
                                  example: $10.00
                                enrollment_pack_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                display_to_customer:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                product_title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Sample Product
                                quantity:
                                  type: integer
                                  example: 3
                                subscription:
                                  type: boolean
                                  example: true
                                enrollment:
                                  type: boolean
                                  example: false
                                allow_subscription:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_only:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_price:
                                  type:
                                    - number
                                    - string
                                    - 'null'
                                  example: 10.5
                                subscription_price_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $10.50
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-02-12'
                                subscribe_and_save:
                                  type:
                                    - number
                                    - string
                                    - 'null'
                                  example: 2.99
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $2.99
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $2.99
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Surcharge
                                product:
                                  oneOf:
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 1
                                        title:
                                          type: string
                                          example: Sample Product
                                        cv:
                                          type: integer
                                          example: 10
                                        image_path:
                                          type:
                                            - string
                                            - 'null'
                                          example: /images/product.png
                                        image_url:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/product.png
                                        price:
                                          type: string
                                          example: '29.99'
                                        price_in_currency:
                                          type: string
                                          example: $29.99
                                        sku:
                                          type:
                                            - string
                                            - 'null'
                                          example: SKU12345
                                        tax:
                                          type: string
                                          example: '2.99'
                                        tax_in_currency:
                                          type: string
                                          example: $2.99
                                    - type: 'null'
                                variant:
                                  oneOf:
                                    - type: object
                                      properties:
                                        id:
                                          type: integer
                                          example: 1
                                        title:
                                          type:
                                            - string
                                            - 'null'
                                          example: Sample Variant
                                        image_path:
                                          type:
                                            - string
                                            - 'null'
                                          example: /images/sample.png
                                        image_url:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/sample.png
                                        primary_image:
                                          type:
                                            - string
                                            - 'null'
                                          example: https://example.com/images/primary.png
                                        price:
                                          type:
                                            - string
                                            - 'null'
                                          example: '34.44'
                                        price_in_currency:
                                          type:
                                            - string
                                            - 'null'
                                          example: $34.44
                                        sku:
                                          type:
                                            - string
                                            - 'null'
                                          example: SKU12345
                                        options:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              title:
                                                type: string
                                                example: Size
                                              value:
                                                type: string
                                                example: XL
                                    - type: 'null'
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          ship_to:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          bill_to:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          shipping_method:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type: string
                                example: Standard Shipping
                          available_shipping_methods:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type: string
                                  example: Standard Shipping
                                price:
                                  type:
                                    - number
                                    - string
                                  example: 5.99
                                price_label:
                                  type: string
                                  example: $5.99
                                delivery_time_estimate:
                                  type: string
                                  example: 3-5 business days
                          available_payment_methods:
                            type: array
                            items:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1337
                                    type:
                                      type: string
                                      enum:
                                        - credit_card
                                    name:
                                      type: string
                                      example: Credit Card
                                    test:
                                      type: boolean
                                      example: true
                                      description: >-
                                        Determines if payment method is test
                                        instance or not. By default, set to
                                        `true`
                                    sandbox:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is sandbox
                                        instance or not. By default, set to
                                        `false`
                                    apple_pay:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method supports
                                        ApplePay or not 
                                    bogus_gateway:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is a Bogus
                                        instance or not.
                                    tokenize_path:
                                      type:
                                        - string
                                        - 'null'
                                      description: Path to tokenize, if applicable.
                                    token_provider:
                                      type: string
                                      enum:
                                        - spreedly
                                        - vgs
                                      description: >-
                                        Determines if payment tokenization is
                                        via spreedly or VGS
                                    apple_pay_merchant_identifier:
                                      type:
                                        - string
                                        - 'null'
                                      example: merchant.mycompany.com
                                      description: >-
                                        If ApplePay is supported, returns the
                                        merchant identifier registered with
                                        Apple, else returns nil
                                    supported_brands:
                                      type: array
                                      items:
                                        type: string
                                      example:
                                        - visa
                                        - master
                                        - american_express
                                        - discover
                                  required:
                                    - id
                                    - type
                                    - name
                                    - supported_brands
                                    - test
                                    - sandbox
                                    - apple_pay
                                    - apple_pay_merchant_identifier
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1337
                                    type:
                                      type: string
                                      enum:
                                        - klarna
                                    name:
                                      type: string
                                      example: Klarna
                                    test:
                                      type: boolean
                                      example: true
                                      description: >-
                                        Determines if payment method is test
                                        instance or not. By default, set to
                                        `true`
                                    sandbox:
                                      type: boolean
                                      example: false
                                      description: >-
                                        Determines if payment method is sandbox
                                        instance or not. By default, set to
                                        `false`
                          country:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              iso:
                                type: string
                                example: US
                              name:
                                type: string
                                example: United States
                              province_required:
                                type: boolean
                                example: false
                          type:
                            type: string
                            enum:
                              - regular
                              - enrollment
                            example: regular
                          enrollment_pack_id:
                            type:
                              - integer
                              - 'null'
                            example: 1
                          enrollment_pack:
                            type:
                              - object
                              - 'null'
                            properties:
                              enrollment_pack_id:
                                type: integer
                                example: 1
                              additional_volume:
                                type:
                                  - integer
                                  - 'null'
                                example: 10
                              description:
                                type:
                                  - object
                                  - 'null'
                                  - string
                                properties:
                                  id:
                                    type: integer
                                    example: 111
                                  name:
                                    type: string
                                    example: description
                                  body:
                                    type: string
                                    example: >-
                                      <div>Try the latest and greatest of our
                                      sugar zip packs. Guaranteed to make you
                                      skinner and cure cancer.</div>
                                  record_type:
                                    type: string
                                    example: EnrollmentPack
                                  record_id:
                                    type: integer
                                    example: 1
                                  created_at:
                                    type: string
                                    format: date_time
                                    example: '2025-01-16T04:22:43.809Z'
                                  updated_at:
                                    type: string
                                    format: date_time
                                    example: '2025-01-22T10:23:52.941Z'
                                  locale:
                                    type: string
                                    example: en
                              enrollment_fee:
                                type:
                                  - number
                                  - string
                                example: 10
                              enrollment_fee_in_currency:
                                type: string
                                example: $10.00
                              images:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 2
                                    relateable_type:
                                      type: string
                                      example: EnrollmentPack
                                    relateable_id:
                                      type: integer
                                      example: 1
                                    image_url:
                                      type: string
                                      example: >-
                                        https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                    image_path:
                                      type: string
                                      example: jITWaU14QGe0y5AFgY7P_00179.svg
                                    position:
                                      type: integer
                                      example: 1
                                    shopify_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: null
                                    created_at:
                                      type: string
                                      format: date_time
                                      example: '2025-01-16T04:22:44.870Z'
                                    updated_at:
                                      type: string
                                      format: date_time
                                      example: '2025-01-16T04:22:44.870Z'
                                    external_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: null
                              items:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 625
                                    allow_subscription:
                                      type: boolean
                                      example: true
                                    cv:
                                      type:
                                        - number
                                        - string
                                      example: 0
                                    cv_in_currency:
                                      type: string
                                      example: $0.00
                                    enrollment:
                                      type: boolean
                                      example: true
                                    enrollment_pack_id:
                                      type: integer
                                      example: 1
                                    price:
                                      type: string
                                      example: '11.13'
                                    price_in_currency:
                                      type: string
                                      example: $11.13
                                    product_title:
                                      type: string
                                      example: Zip Pack Sample Pack (30)
                                    quantity:
                                      type: integer
                                      example: 1
                                    qv:
                                      type:
                                        - number
                                        - string
                                      example: 0
                                    qv_in_currency:
                                      type: string
                                      example: $0.00
                                    subscribe_and_save:
                                      type:
                                        - string
                                        - 'null'
                                      example: '-1988.87'
                                    subscribe_and_save_for_display:
                                      type:
                                        - string
                                        - 'null'
                                      example: Subscribe and save $-1,988.87
                                    subscribe_and_save_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $-1,988.87
                                    subscription:
                                      type: boolean
                                      example: false
                                    subscription_interval:
                                      type:
                                        - integer
                                        - 'null'
                                      example: 1
                                    subscription_interval_unit:
                                      type:
                                        - string
                                        - 'null'
                                      example: month
                                    subscription_only:
                                      type: boolean
                                      example: false
                                    subscription_plan_id:
                                      type:
                                        - integer
                                        - 'null'
                                      example: 1
                                    subscription_plans:
                                      oneOf:
                                        - type: array
                                          items:
                                            title: Commerce::SubscriptionPlan
                                            type: object
                                            properties:
                                              id:
                                                type: integer
                                              name:
                                                example: Test Subscription Plan
                                                type: string
                                              billing_interval:
                                                example: 1
                                                type: integer
                                                default: 1
                                                minimum: 1
                                              billing_interval_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type: string
                                                default: month
                                              shipping_interval:
                                                example: 1
                                                type: integer
                                                default: 1
                                                minimum: 1
                                              shipping_interval_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type: string
                                                default: month
                                              trial_period:
                                                example: 1
                                                type:
                                                  - integer
                                                  - 'null'
                                                minimum: 1
                                              trial_period_unit:
                                                description: >-
                                                  Possible values: `day`, `week`, `month`,
                                                  `year`
                                                example: day
                                                type:
                                                  - string
                                                  - 'null'
                                              split_volume:
                                                example: true
                                                type: boolean
                                                default: false
                                              max_quantity:
                                                example: 100
                                                type:
                                                  - integer
                                                  - 'null'
                                                minimum: 1
                                              company_default:
                                                example: false
                                                type:
                                                  - boolean
                                                  - 'null'
                                                default: false
                                              products_count:
                                                example: 10
                                                type:
                                                  - integer
                                                  - 'null'
                                              subscribers_count:
                                                example: 10
                                                type:
                                                  - integer
                                                  - 'null'
                                              price:
                                                type: string
                                              price_in_currency:
                                                type: string
                                              subscription_start:
                                                type: string
                                              subscribe_and_save:
                                                type: string
                                              subscribe_and_save_in_currency:
                                                type: string
                                              subscribe_and_save_for_display:
                                                type: string
                                            required:
                                              - id
                                              - name
                                              - billing_interval
                                              - billing_interval_unit
                                              - shipping_interval
                                              - shipping_interval_unit
                                              - split_volume
                                              - price
                                              - price_in_currency
                                              - subscription_start
                                              - subscribe_and_save
                                              - subscribe_and_save_in_currency
                                              - subscribe_and_save_for_display
                                        - type: 'null'
                                    subscription_price:
                                      type: string
                                      example: '2000.0'
                                    subscription_price_in_currency:
                                      type: string
                                      example: $2,000.00
                                    subscription_start:
                                      type:
                                        - string
                                        - 'null'
                                      format: date
                                      example: '2025-02-28'
                                    tax:
                                      type: string
                                      example: '0.0'
                                    tax_in_currency:
                                      type: string
                                      example: $0.00
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: null
                                    display_to_customer:
                                      type: boolean
                                      example: false
                                    errors:
                                      oneOf:
                                        - type: 'null'
                                        - type: array
                                          items:
                                            type: object
                                            example:
                                              country:
                                                - >-
                                                  This product is not available for this
                                                  country. Please change your country
                              price:
                                type:
                                  - string
                                  - integer
                                example: 11.13
                              price_in_currency:
                                type: string
                                example: $11.13
                              subscription_price:
                                type:
                                  - string
                                  - integer
                                example: 2000
                              subscription_price_in_currency:
                                type: string
                                example: $2,000.00
                              title:
                                type: string
                                example: enroll product
                              token:
                                type: string
                                example: NxL22AqLRRisfyF9LqxxWRak
                          recurring:
                            oneOf:
                              - type: array
                                items:
                                  type: object
                                  properties:
                                    subtotal:
                                      type: string
                                      example: '10.0'
                                    subtotal_in_currency:
                                      type: string
                                      example: $10.0
                                    interval:
                                      type: integer
                                      example: 1
                                    interval_unit:
                                      type: string
                                      example: month
                                    subtotal_for_display:
                                      type: string
                                      example: $10.00 every 1 month
                                    start_date:
                                      type:
                                        - string
                                        - 'null'
                                      example: '2025-05-27'
                              - type: 'null'
                            default:
                              - subtotal: '10.0'
                                subtotal_in_currency: $10.0
                                interval: 1
                                interval_unit: month
                                subtotal_for_display: $10.00 every 1 month
                                start_date: '2025-05-27'
        '422':
          description: invalid attribution
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                attribution:
                  type: object
                  oneOf:
                    - properties:
                        share_guid:
                          type: string
                          example: james-bond007
                      required:
                        - share_guid
                    - properties:
                        email:
                          type: string
                          format: email
                          example: user@example.com
                      required:
                        - email
                    - properties:
                        external_id:
                          type:
                            - string
                            - 'null'
                          example: ext_12345
                    - properties:
                        username:
                          type: string
                          example: username123
                      required:
                        - username
              required:
                - attribution
  /api/carts/{cart_token}/buyer_rep:
    patch:
      summary: Updates the buyer rep for the cart
      tags:
        - Carts
      description: Updates the buyer rep of a cart based on the provided customer_id
      operationId: updateCartBuyerRep
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: buyer rep updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  cart:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123
                      state:
                        type: string
                        example: start
                      processed:
                        type: boolean
                        example: false
                        description: >-
                          Determines if a cart payment has been processed or
                          not.
                      valid_for_checkout:
                        type: boolean
                        example: true
                      buyer_rep_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      currency_symbol:
                        type: string
                        example: $
                      currency_code:
                        type: string
                        example: USD
                      shipping_total_for_display:
                        type: string
                        example: Free
                      phone:
                        type:
                          - string
                          - 'null'
                        example: '4035551212'
                      payment_method_auto_assignable:
                        type: boolean
                        example: true
                        description: >-
                          Determines if a payment method can be auto-assigned to
                          the cart.
                      attribution:
                        oneOf:
                          - type: object
                            oneOf:
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  share_guid:
                                    type: string
                                    example: james-bond007
                                required:
                                  - id
                                  - share_guid
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  email:
                                    type: string
                                    example: james.bond@gmail.com
                                required:
                                  - id
                                  - email
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  username:
                                    type: string
                                    example: jaamball234
                                required:
                                  - id
                                  - username
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  fluid_rep_id:
                                    type: integer
                                    example: 23493
                                required:
                                  - id
                                  - fluid_rep_id
                              - properties:
                                  id:
                                    type:
                                      - integer
                                      - 'null'
                                    example: 456
                                  external_id:
                                    type:
                                      - string
                                      - 'null'
                                    example: w3sdf92
                                required:
                                  - id
                          - type: 'null'
                        default:
                          id: 456
                          share_guid: james-bond007
                      agreements:
                        type: array
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                              example: 1
                            required:
                              type: boolean
                              example: true
                            title:
                              type: string
                              example: Terms and Conditions
                            show_path:
                              type: string
                              example: /terms
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                      amount_total:
                        type: string
                        example: '121.65'
                      amount_total_in_currency:
                        type: string
                        example: $121.65 (USD)
                      sub_total:
                        type: string
                        example: '100.00'
                      sub_total_in_currency:
                        type: string
                        example: $100.00 (USD)
                      tax_total:
                        type: string
                        example: '20.00'
                      tax_total_in_currency:
                        type: string
                        example: $20.00 (USD)
                      shipping_total:
                        type: string
                        example: '1.65'
                      shipping_total_in_currency:
                        type: string
                        example: $1.65 (USD)
                      discount_total:
                        type: string
                        example: '2.99'
                      discount_total_in_currency:
                        type: string
                        example: $2.99 (USD)
                      transaction_fee:
                        type:
                          - number
                          - string
                        example: '1.90'
                      transaction_fee_in_currency:
                        type: string
                        example: $1.90 (USD)
                      cv_total:
                        type: integer
                        example: 10
                      qv_total:
                        type: integer
                        example: 15
                      company:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          primary_domain_hostname:
                            type:
                              - string
                              - 'null'
                            example: fluid.com
                          subdomain:
                            type:
                              - string
                              - 'null'
                            example: myco
                          logo_url:
                            type:
                              - string
                              - 'null'
                            example: https://example.com/logo.png
                          fluid_shop:
                            type:
                              - string
                              - 'null'
                            example: https://fluid-sample-shop.fluid.com
                          collect_phone:
                            type: boolean
                            example: true
                          require_phone:
                            type: boolean
                            example: false
                          require_billing_zip:
                            type: boolean
                            example: false
                          checkout_primary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                          checkout_primary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                      payment_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          cart_type:
                            type: string
                            example: credit_card
                          last_four:
                            type: string
                            example: '1234'
                          exp_month:
                            type: integer
                            example: 12
                          exp_year:
                            type: integer
                            example: 2025
                          logo_url:
                            type: string
                            example: https://example.com/image.svg
                      email:
                        type:
                          - string
                          - 'null'
                        example: user@example.com
                      enrollment_fee:
                        type:
                          - number
                          - string
                        example: '10.45'
                      enrollment_fee_in_currency:
                        type: string
                        example: $10.45
                      discount_code:
                        type:
                          - string
                          - 'null'
                        example: DISCOUNT10
                      language_iso:
                        type:
                          - string
                          - 'null'
                        example: en
                      cart_token:
                        type: string
                        example: abc123
                      immutable_items:
                        type: boolean
                        example: false
                      digital_only:
                        type: boolean
                        example: false
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 101
                            price:
                              type: string
                              example: '43.41'
                            price_in_currency:
                              type: string
                              example: $43.41
                            tax:
                              type: string
                              example: '2.99'
                            tax_in_currency:
                              type: string
                              example: $2.99
                            cv:
                              type: integer
                              example: 5
                            qv:
                              type: integer
                              example: 7
                            discount_amount:
                              type: string
                              example: '10'
                            discount_amount_in_currency:
                              type: string
                              example: $10.00
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            display_to_customer:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            product_title:
                              type:
                                - string
                                - 'null'
                              example: Sample Product
                            quantity:
                              type: integer
                              example: 3
                            subscription:
                              type: boolean
                              example: true
                            enrollment:
                              type: boolean
                              example: false
                            allow_subscription:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_plan_id:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_plans:
                              oneOf:
                                - type: array
                                  items:
                                    title: Commerce::SubscriptionPlan
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      name:
                                        example: Test Subscription Plan
                                        type: string
                                      billing_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      billing_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      shipping_interval:
                                        example: 1
                                        type: integer
                                        default: 1
                                        minimum: 1
                                      shipping_interval_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type: string
                                        default: month
                                      trial_period:
                                        example: 1
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      trial_period_unit:
                                        description: >-
                                          Possible values: `day`, `week`, `month`,
                                          `year`
                                        example: day
                                        type:
                                          - string
                                          - 'null'
                                      split_volume:
                                        example: true
                                        type: boolean
                                        default: false
                                      max_quantity:
                                        example: 100
                                        type:
                                          - integer
                                          - 'null'
                                        minimum: 1
                                      company_default:
                                        example: false
                                        type:
                                          - boolean
                                          - 'null'
                                        default: false
                                      products_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      subscribers_count:
                                        example: 10
                                        type:
                                          - integer
                                          - 'null'
                                      price:
                                        type: string
                                      price_in_currency:
                                        type: string
                                      subscription_start:
                                        type: string
                                      subscribe_and_save:
                                        type: string
                                      subscribe_and_save_in_currency:
                                        type: string
                                      subscribe_and_save_for_display:
                                        type: string
                                    required:
                                      - id
                                      - name
                                      - billing_interval
                                      - billing_interval_unit
                                      - shipping_interval
                                      - shipping_interval_unit
                                      - split_volume
                                      - price
                                      - price_in_currency
                                      - subscription_start
                                      - subscribe_and_save
                                      - subscribe_and_save_in_currency
                                      - subscribe_and_save_for_display
                                - type: 'null'
                            subscription_only:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            subscription_interval:
                              type:
                                - integer
                                - 'null'
                              example: 1
                            subscription_interval_unit:
                              type:
                                - string
                                - 'null'
                              example: month
                            subscription_price:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 10.5
                            subscription_price_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $10.50
                            subscription_start:
                              type:
                                - string
                                - 'null'
                              example: '2025-02-12'
                            subscribe_and_save:
                              type:
                                - number
                                - string
                                - 'null'
                              example: 2.99
                            subscribe_and_save_in_currency:
                              type:
                                - string
                                - 'null'
                              example: $2.99
                            subscribe_and_save_for_display:
                              type:
                                - string
                                - 'null'
                              example: Subscribe and save $2.99
                            title:
                              type:
                                - string
                                - 'null'
                              example: Surcharge
                            product:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type: string
                                      example: Sample Product
                                    cv:
                                      type: integer
                                      example: 10
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/product.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/product.png
                                    price:
                                      type: string
                                      example: '29.99'
                                    price_in_currency:
                                      type: string
                                      example: $29.99
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    tax:
                                      type: string
                                      example: '2.99'
                                    tax_in_currency:
                                      type: string
                                      example: $2.99
                                - type: 'null'
                            variant:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: Sample Variant
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/sample.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/sample.png
                                    primary_image:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/primary.png
                                    price:
                                      type:
                                        - string
                                        - 'null'
                                      example: '34.44'
                                    price_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $34.44
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    options:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          title:
                                            type: string
                                            example: Size
                                          value:
                                            type: string
                                            example: XL
                                - type: 'null'
                            errors:
                              oneOf:
                                - type: 'null'
                                - type: array
                                  items:
                                    type: object
                                    example:
                                      country:
                                        - >-
                                          This product is not available for this
                                          country. Please change your country
                      ship_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      bill_to:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      shipping_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type: string
                            example: Standard Shipping
                      available_shipping_methods:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            title:
                              type: string
                              example: Standard Shipping
                            price:
                              type:
                                - number
                                - string
                              example: 5.99
                            price_label:
                              type: string
                              example: $5.99
                            delivery_time_estimate:
                              type: string
                              example: 3-5 business days
                      available_payment_methods:
                        type: array
                        items:
                          oneOf:
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - credit_card
                                name:
                                  type: string
                                  example: Credit Card
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                                apple_pay:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method supports
                                    ApplePay or not 
                                bogus_gateway:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is a Bogus
                                    instance or not.
                                tokenize_path:
                                  type:
                                    - string
                                    - 'null'
                                  description: Path to tokenize, if applicable.
                                token_provider:
                                  type: string
                                  enum:
                                    - spreedly
                                    - vgs
                                  description: >-
                                    Determines if payment tokenization is via
                                    spreedly or VGS
                                apple_pay_merchant_identifier:
                                  type:
                                    - string
                                    - 'null'
                                  example: merchant.mycompany.com
                                  description: >-
                                    If ApplePay is supported, returns the
                                    merchant identifier registered with Apple,
                                    else returns nil
                                supported_brands:
                                  type: array
                                  items:
                                    type: string
                                  example:
                                    - visa
                                    - master
                                    - american_express
                                    - discover
                              required:
                                - id
                                - type
                                - name
                                - supported_brands
                                - test
                                - sandbox
                                - apple_pay
                                - apple_pay_merchant_identifier
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1337
                                type:
                                  type: string
                                  enum:
                                    - klarna
                                name:
                                  type: string
                                  example: Klarna
                                test:
                                  type: boolean
                                  example: true
                                  description: >-
                                    Determines if payment method is test
                                    instance or not. By default, set to `true`
                                sandbox:
                                  type: boolean
                                  example: false
                                  description: >-
                                    Determines if payment method is sandbox
                                    instance or not. By default, set to `false`
                      country:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          iso:
                            type: string
                            example: US
                          name:
                            type: string
                            example: United States
                          province_required:
                            type: boolean
                            example: false
                      type:
                        type: string
                        enum:
                          - regular
                          - enrollment
                        example: regular
                      enrollment_pack_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                      enrollment_pack:
                        type:
                          - object
                          - 'null'
                        properties:
                          enrollment_pack_id:
                            type: integer
                            example: 1
                          additional_volume:
                            type:
                              - integer
                              - 'null'
                            example: 10
                          description:
                            type:
                              - object
                              - 'null'
                              - string
                            properties:
                              id:
                                type: integer
                                example: 111
                              name:
                                type: string
                                example: description
                              body:
                                type: string
                                example: >-
                                  <div>Try the latest and greatest of our sugar
                                  zip packs. Guaranteed to make you skinner and
                                  cure cancer.</div>
                              record_type:
                                type: string
                                example: EnrollmentPack
                              record_id:
                                type: integer
                                example: 1
                              created_at:
                                type: string
                                format: date_time
                                example: '2025-01-16T04:22:43.809Z'
                              updated_at:
                                type: string
                                format: date_time
                                example: '2025-01-22T10:23:52.941Z'
                              locale:
                                type: string
                                example: en
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: 10
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.00
                          images:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 2
                                relateable_type:
                                  type: string
                                  example: EnrollmentPack
                                relateable_id:
                                  type: integer
                                  example: 1
                                image_url:
                                  type: string
                                  example: >-
                                    https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                image_path:
                                  type: string
                                  example: jITWaU14QGe0y5AFgY7P_00179.svg
                                position:
                                  type: integer
                                  example: 1
                                shopify_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                                created_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                updated_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                external_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 625
                                allow_subscription:
                                  type: boolean
                                  example: true
                                cv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                cv_in_currency:
                                  type: string
                                  example: $0.00
                                enrollment:
                                  type: boolean
                                  example: true
                                enrollment_pack_id:
                                  type: integer
                                  example: 1
                                price:
                                  type: string
                                  example: '11.13'
                                price_in_currency:
                                  type: string
                                  example: $11.13
                                product_title:
                                  type: string
                                  example: Zip Pack Sample Pack (30)
                                quantity:
                                  type: integer
                                  example: 1
                                qv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                qv_in_currency:
                                  type: string
                                  example: $0.00
                                subscribe_and_save:
                                  type:
                                    - string
                                    - 'null'
                                  example: '-1988.87'
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $-1,988.87
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $-1,988.87
                                subscription:
                                  type: boolean
                                  example: false
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_only:
                                  type: boolean
                                  example: false
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_price:
                                  type: string
                                  example: '2000.0'
                                subscription_price_in_currency:
                                  type: string
                                  example: $2,000.00
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                  example: '2025-02-28'
                                tax:
                                  type: string
                                  example: '0.0'
                                tax_in_currency:
                                  type: string
                                  example: $0.00
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: null
                                display_to_customer:
                                  type: boolean
                                  example: false
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          price:
                            type:
                              - string
                              - integer
                            example: 11.13
                          price_in_currency:
                            type: string
                            example: $11.13
                          subscription_price:
                            type:
                              - string
                              - integer
                            example: 2000
                          subscription_price_in_currency:
                            type: string
                            example: $2,000.00
                          title:
                            type: string
                            example: enroll product
                          token:
                            type: string
                            example: NxL22AqLRRisfyF9LqxxWRak
                      recurring:
                        oneOf:
                          - type: array
                            items:
                              type: object
                              properties:
                                subtotal:
                                  type: string
                                  example: '10.0'
                                subtotal_in_currency:
                                  type: string
                                  example: $10.0
                                interval:
                                  type: integer
                                  example: 1
                                interval_unit:
                                  type: string
                                  example: month
                                subtotal_for_display:
                                  type: string
                                  example: $10.00 every 1 month
                                start_date:
                                  type:
                                    - string
                                    - 'null'
                                  example: '2025-05-27'
                          - type: 'null'
                        default:
                          - subtotal: '10.0'
                            subtotal_in_currency: $10.0
                            interval: 1
                            interval_unit: month
                            subtotal_for_display: $10.00 every 1 month
                            start_date: '2025-05-27'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '410':
          description: Cart is processed and cannot be modified
        '422':
          description: invalid record
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unprocessable entity
                  errors:
                    type: object
                    example:
                      customer:
                        - is not a rep
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                customer_id:
                  type: integer
                  example: 123
                  description: ID of the customer to set as buyer rep
              required:
                - customer_id
  /api/orders/{id}:
    patch:
      summary: Update an order
      tags:
        - Commerce Orders
      operationId: updateOrder
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Order ID
          schema:
            type: integer
      responses:
        '200':
          description: Order updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  order:
                    type: object
                    description: Updated order object with associations
                  meta:
                    type: object
                    properties:
                      shop_url:
                        type: string
                        description: Company base URL
                        example: https://test-company.fluid.com
                      request_id:
                        type: string
                        description: Request identifier
                      timestamp:
                        type: string
                        description: Response timestamp in ISO8601 format
        '401':
          description: Unauthorized
        '404':
          description: Order not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                order:
                  type: object
                  properties:
                    note:
                      type: string
                      description: Order note
                      example: Customer requested expedited shipping
                    external_id:
                      type:
                        - string
                        - 'null'
                      description: External system identifier for the order (optional)
                      example: EXT-12345
                    metadata:
                      type: object
                      description: Additional order metadata
                      example:
                        source: mobile_app
                        campaign_id: summer2024
        required: true
    put:
      summary: Update an order (PUT method)
      tags:
        - Commerce Orders
      operationId: updateOrderPut
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Order ID
          schema:
            type: integer
      responses:
        '200':
          description: Order updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  order:
                    type: object
                    description: Updated order object with associations
                  meta:
                    type: object
                    properties:
                      shop_url:
                        type: string
                        description: Company base URL
                        example: https://test-company.fluid.com
                      request_id:
                        type: string
                        description: Request identifier
                      timestamp:
                        type: string
                        description: Response timestamp in ISO8601 format
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                order:
                  type: object
                  properties:
                    note:
                      type: string
                      description: Order note
                      example: Customer requested expedited shipping
                    external_id:
                      type:
                        - string
                        - 'null'
                      description: External system identifier for the order (optional)
                      example: EXT-12345
                    metadata:
                      type: object
                      description: Additional order metadata
                      example:
                        source: mobile_app
                        campaign_id: summer2024
        required: true
  /api/companies:
    get:
      summary: Get the current company
      tags:
        - Companies
      operationId: getCurrentCompany
      security:
        - bearer_auth: []
      responses:
        '200':
          description: company retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  company:
                    title: Company
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        example: Acme, Inc.
                        type: string
                      active:
                        type:
                          - boolean
                          - 'null'
                        default: true
                      fluid_shop:
                        example: acme.fluid.app
                        type: string
                      tax_class:
                        description: Tax class for the company
                        example: fluid
                        type: string
                        enum:
                          - fluid
                          - custom
                          - droplet
                    required:
                      - id
                      - name
                      - fluid_shop
                      - tax_class
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
  /api/companies/set_shipping:
    post:
      summary: Set the shipping method for a company
      tags:
        - Companies
      operationId: setShippingMethod
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: shipping method set
          content:
            application/json:
              schema:
                type: object
                properties:
                  company:
                    title: Company
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        example: Acme, Inc.
                        type: string
                      active:
                        type:
                          - boolean
                          - 'null'
                        default: true
                      shipping:
                        example: fluid-rates
                        type:
                          - string
                          - 'null'
                    required:
                      - id
                      - name
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: invalid shipping value
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unprocessable_entity
                  errors:
                    type: object
                    example:
                      shipping:
                        - Invalid Shipping value
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - errors
                  - meta
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                settings:
                  type: object
                  properties:
                    shipping:
                      type: string
                      example: manual
                      description: Shipping calculation mode
                  required:
                    - shipping
              required:
                - settings
  /api/companies/set_tax_option:
    patch:
      summary: Set the tax option for a company
      tags:
        - Companies
      operationId: setCompanyTaxOption
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: Tax option set
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Tax option for the company successfully updated.
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - success
                  - message
                  - meta
        '422':
          description: Invalid tax_option value
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Failed to update the company tax option.
                  errors:
                    type: object
                    example:
                      tax_option:
                        - is not included in the list
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - error_message
                  - errors
                  - meta
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                tax_option:
                  type: string
                  example: avalara
                  description: Choose service for taxation.
                  enum:
                    - manual_calculation
                    - avalara
                    - webhook
                    - custom_avalara
              required:
                - tax_option
  /api/companies/set_tax_class:
    patch:
      summary: Set the tax class for a company
      tags:
        - Companies
      operationId: setCompanyTaxClass
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: Tax class set
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Tax option for the company successfully updated.
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - success
                  - message
                  - meta
        '422':
          description: Invalid tax_class value
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Failed to update the company tax class.
                  errors:
                    type: object
                    example:
                      tax_class:
                        - is not included in the list
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - error_message
                  - errors
                  - meta
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                tax_class:
                  type: string
                  example: droplet
                  description: Choose service class to be used for taxation.
                  enum:
                    - fluid
                    - custom
                    - droplet
              required:
                - tax_class
  /api/company/custom_catch_ups:
    get:
      summary: List custom catch ups
      tags:
        - Company Custom Catch Ups
      security:
        - bearer_auth: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  catch_ups:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        company_id:
                          type: integer
                        user_company_id:
                          type: integer
                        suggestion_title:
                          type: string
                        suggestion_description:
                          type: string
                        catch_up_class:
                          type: string
                          enum:
                            - CUSTOM_CATCH_UP
                        catch_up_actions:
                          type: array
                        created_at:
                          type: string
                          format: datetime
                        updated_at:
                          type: string
                          format: datetime
                      required:
                        - id
                        - company_id
                        - user_company_id
                        - suggestion_title
                        - catch_up_class
                        - created_at
                        - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                        format: datetime
                    required:
                      - request_id
                      - timestamp
        '401':
          description: unauthorized
    post:
      summary: Create custom catch up
      tags:
        - Company Custom Catch Ups
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  catch_up:
                    type: object
                    properties:
                      id:
                        type: integer
                      company_id:
                        type: integer
                      user_company_id:
                        type: integer
                      suggestion_title:
                        type: string
                      suggestion_description:
                        type: string
                      catch_up_class:
                        type: string
                      catch_up_actions:
                        type: array
                      created_at:
                        type: string
                        format: datetime
                      updated_at:
                        type: string
                        format: datetime
                    required:
                      - id
                      - company_id
                      - catch_up_class
                      - created_at
                      - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                        format: date-time
                    required:
                      - request_id
                      - timestamp
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                affiliate_id:
                  type: integer
                  description: >-
                    ID of the UserCompany record for the affiliate creating the
                    catch-up
                title:
                  type: string
                description:
                  type: string
                type:
                  type: string
                  description: Type identifier for the catch-up
                contact_id:
                  type: integer
                actions:
                  type: object
                  description: Structured actions data
                  additionalProperties: true
              required:
                - affiliate_id
                - title
                - type
  /api/company/custom_catch_ups/{id}:
    patch:
      summary: Update custom catch up
      tags:
        - Company Custom Catch Ups
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  catch_up:
                    type: object
                    properties:
                      id:
                        type: integer
                      company_id:
                        type: integer
                      user_company_id:
                        type: integer
                      suggestion_title:
                        type: string
                      suggestion_description:
                        type: string
                      catch_up_class:
                        type: string
                        enum:
                          - CUSTOM_CATCH_UP
                      catch_up_actions:
                        type: array
                      created_at:
                        type: string
                        format: datetime
                      updated_at:
                        type: string
                        format: datetime
                    required:
                      - id
                      - company_id
                      - user_company_id
                      - suggestion_title
                      - catch_up_class
                      - created_at
                      - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                        format: datetime
                    required:
                      - request_id
                      - timestamp
        '401':
          description: unauthorized
        '404':
          description: not found
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                suggestion_title:
                  type: string
                suggestion_description:
                  type: string
              required: []
    delete:
      summary: Delete custom catch up
      tags:
        - Company Custom Catch Ups
      security:
        - bearer_auth: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  catch_up:
                    type: object
                    properties:
                      id:
                        type: integer
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                        format: date-time
        '401':
          description: unauthorized
        '404':
          description: not found
    parameters:
      - name: id
        in: path
        description: CatchUp ID
        required: true
        schema:
          type: string
  /api/company/discounts:
    get:
      summary: Retrieve a list of company discounts
      description: Get all company discounts for the current company.
      tags:
        - Company Discounts
      operationId: listDiscounts
      security:
        - bearer_auth: []
      parameters:
        - name: page
          in: query
          schema:
            type: integer
            default: 1
          required: false
          description: Page number for pagination
        - name: per_page
          in: query
          schema:
            type: integer
            default: 10
          required: false
          description: Number of records per page
        - name: search_query
          in: query
          schema:
            type: string
          required: false
          description: Search term to filter discounts
        - name: active
          in: query
          schema:
            type: boolean
          required: false
          description: Filter by active status
        - name: apply_type
          in: query
          schema:
            type: string
          required: false
          description: Filter by discount type
      responses:
        '200':
          description: discounts retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  discounts:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: Summer Sale
                        code:
                          type: string
                          example: SUMMER20
                        price_discount_type:
                          type: string
                          example: percentage
                        price_discount_amount:
                          type: integer
                          example: 0
                        price_discount_percent:
                          type: number
                          example: 20
                        start_date_time:
                          type:
                            - string
                            - 'null'
                          format: date_time
                          example: '2023-06-01T00:00:00Z'
                        end_date_time:
                          type:
                            - string
                            - 'null'
                          format: date_time
                          example: '2023-08-31T23:59:59Z'
                        customer_usage_limit:
                          type: integer
                          example: 1
                        minimum_amount_cents:
                          type: integer
                          example: 1000
                        collection_ids:
                          type: array
                          items:
                            type: integer
                          example:
                            - 1
                            - 2
                            - 3
                        product_ids:
                          type: array
                          items:
                            type: integer
                          example:
                            - 4
                            - 5
                            - 6
                        active:
                          type: boolean
                          example: true
                        customer_ids:
                          type: array
                          items:
                            type: integer
                          example:
                            - 7
                            - 8
                            - 9
                        country_codes:
                          type: array
                          items:
                            type: string
                          example:
                            - US
                            - CA
                        created_at:
                          type: string
                          format: date_time
                          example: '2023-06-01T00:00:00Z'
                        updated_at:
                          type: string
                          format: date_time
                          example: '2023-06-01T00:00:00Z'
                        discount_type:
                          type: string
                          example: product_discount
                        description:
                          type:
                            - string
                            - 'null'
                          example: 20% off your entire order
                        total_usage:
                          type: integer
                          example: 42
                  meta:
                    type: object
    post:
      summary: Create a new company discount
      description: Create a new company discount
      tags:
        - Company Discounts
      operationId: createDiscount
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: discount created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: Summer Sale
                  code:
                    type: string
                    example: SUMMER20
                  price_discount_type:
                    type: string
                    example: percentage
                  price_discount_amount:
                    type: integer
                    example: 0
                  price_discount_percent:
                    type: number
                    example: 20
                  start_date_time:
                    type:
                      - string
                      - 'null'
                    format: date_time
                    example: '2023-06-01T00:00:00Z'
                  end_date_time:
                    type:
                      - string
                      - 'null'
                    format: date_time
                    example: '2023-08-31T23:59:59Z'
                  customer_usage_limit:
                    type: integer
                    example: 1
                  minimum_amount_cents:
                    type: integer
                    example: 1000
                  collection_ids:
                    type: array
                    items:
                      type: integer
                    example:
                      - 1
                      - 2
                      - 3
                  product_ids:
                    type: array
                    items:
                      type: integer
                    example:
                      - 4
                      - 5
                      - 6
                  active:
                    type: boolean
                    example: true
                  customer_ids:
                    type: array
                    items:
                      type: integer
                    example:
                      - 7
                      - 8
                      - 9
                  country_codes:
                    type: array
                    items:
                      type: string
                    example:
                      - US
                      - CA
                  created_at:
                    type: string
                    format: date_time
                    example: '2023-06-01T00:00:00Z'
                  updated_at:
                    type: string
                    format: date_time
                    example: '2023-06-01T00:00:00Z'
                  discount_type:
                    type: string
                    example: product_discount
                  description:
                    type:
                      - string
                      - 'null'
                    example: 20% off your entire order
                  total_usage:
                    type: integer
                    example: 42
                  meta:
                    type: object
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                  meta:
                    type: object
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                discount:
                  type: object
                  properties:
                    name:
                      type: string
                      example: Summer Sale
                    code:
                      type: string
                      example: SUMMER20
                    apply_type:
                      type: string
                      example: product_discount
                    price_discount_type:
                      type: string
                      example: percentage
                    price_discount_amount:
                      type: integer
                      example: 0
                    price_discount_percent:
                      type: number
                      example: 20
                    application_rule:
                      type: string
                      example: everything
                    description:
                      type: string
                      example: 20% off your entire order
                    active:
                      type: boolean
                      example: true
                  required:
                    - name
                    - code
                    - apply_type
                    - price_discount_type
  /api/company/discounts/{id}:
    get:
      summary: Retrieve a single company discount
      description: Fetch a specific discount by its ID for the current company.
      tags:
        - Company Discounts
      operationId: showDiscount
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          description: Discount's Id
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: discount retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: Summer Sale
                  code:
                    type: string
                    example: SUMMER20
                  price_discount_type:
                    type: string
                    example: percentage
                  price_discount_amount:
                    type: integer
                    example: 0
                  price_discount_percent:
                    type: number
                    example: 20
                  start_date_time:
                    type:
                      - string
                      - 'null'
                    format: date_time
                    example: '2023-06-01T00:00:00Z'
                  end_date_time:
                    type:
                      - string
                      - 'null'
                    format: date_time
                    example: '2023-08-31T23:59:59Z'
                  customer_usage_limit:
                    type: integer
                    example: 1
                  minimum_amount_cents:
                    type: integer
                    example: 1000
                  collection_ids:
                    type: array
                    items:
                      type: integer
                    example:
                      - 1
                      - 2
                      - 3
                  product_ids:
                    type: array
                    items:
                      type: integer
                    example:
                      - 4
                      - 5
                      - 6
                  active:
                    type: boolean
                    example: true
                  customer_ids:
                    type: array
                    items:
                      type: integer
                    example:
                      - 7
                      - 8
                      - 9
                  country_codes:
                    type: array
                    items:
                      type: string
                    example:
                      - US
                      - CA
                  created_at:
                    type: string
                    format: date_time
                    example: '2023-06-01T00:00:00Z'
                  updated_at:
                    type: string
                    format: date_time
                    example: '2023-06-01T00:00:00Z'
                  discount_type:
                    type: string
                    example: product_discount
                  description:
                    type:
                      - string
                      - 'null'
                    example: 20% off your entire order
                  total_usage:
                    type: integer
                    example: 42
                  meta:
                    type: object
        '404':
          description: discount not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
                  meta:
                    type: object
    put:
      summary: Update a company discount
      description: Update the details of a specific company discount.
      tags:
        - Company Discounts
      operationId: updateDiscount
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          description: Discount's Id
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: discount updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: Summer Sale
                  code:
                    type: string
                    example: SUMMER20
                  price_discount_type:
                    type: string
                    example: percentage
                  price_discount_amount:
                    type: integer
                    example: 0
                  price_discount_percent:
                    type: number
                    example: 20
                  start_date_time:
                    type:
                      - string
                      - 'null'
                    format: date_time
                    example: '2023-06-01T00:00:00Z'
                  end_date_time:
                    type:
                      - string
                      - 'null'
                    format: date_time
                    example: '2023-08-31T23:59:59Z'
                  customer_usage_limit:
                    type: integer
                    example: 1
                  minimum_amount_cents:
                    type: integer
                    example: 1000
                  collection_ids:
                    type: array
                    items:
                      type: integer
                    example:
                      - 1
                      - 2
                      - 3
                  product_ids:
                    type: array
                    items:
                      type: integer
                    example:
                      - 4
                      - 5
                      - 6
                  active:
                    type: boolean
                    example: true
                  customer_ids:
                    type: array
                    items:
                      type: integer
                    example:
                      - 7
                      - 8
                      - 9
                  country_codes:
                    type: array
                    items:
                      type: string
                    example:
                      - US
                      - CA
                  created_at:
                    type: string
                    format: date_time
                    example: '2023-06-01T00:00:00Z'
                  updated_at:
                    type: string
                    format: date_time
                    example: '2023-06-01T00:00:00Z'
                  discount_type:
                    type: string
                    example: product_discount
                  description:
                    type:
                      - string
                      - 'null'
                    example: 20% off your entire order
                  total_usage:
                    type: integer
                    example: 42
                  meta:
                    type: object
        '404':
          description: discount not found
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                discount:
                  type: object
                  properties:
                    name:
                      type: string
                      example: Updated Sale
                    code:
                      type: string
                      example: UPDATED20
                    active:
                      type: boolean
                      example: false
    delete:
      summary: Delete a company discount
      description: Delete a specific discount for the current company.
      tags:
        - Company Discounts
      operationId: deleteDiscount
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          description: Discount's Id
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: discount deleted
        '404':
          description: discount not found
  /api/company/mobile_widgets:
    get:
      summary: Retrieve a paginated list of mobile widgets
      description: Retrieves a paginated list of mobile widgets.
      tags:
        - Company Mobile Widgets
      operationId: listMobileWidgets
      security:
        - bearer_auth: []
      parameters:
        - name: page
          in: query
          schema:
            type: integer
            default: 1
          required: false
          description: Page number
        - name: per_page
          in: query
          schema:
            type: integer
            default: 20
          required: false
          description: Number of items per page
      responses:
        '200':
          description: mobile widgets retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  mobile_widgets:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 48
                        company_id:
                          type: integer
                          example: 298486374
                        name:
                          type: string
                          example: MWidget
                        embed_url:
                          type: string
                          example: https://unseenktm.com
                        height:
                          type: integer
                          example: 90
                        cover_image_url:
                          type: string
                          example: https://www.example.com/test.jpg
                        page_scope:
                          type: object
                          properties:
                            home:
                              type: boolean
                              example: true
                            explore:
                              type: boolean
                              example: false
                        droplet_installation_id:
                          type:
                            - integer
                            - 'null'
                          example: 825425119
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: fcca8c13-a8de-4632-a3ef-4374f0dee632
                      timestamp:
                        type: string
                        format: date-time
                        example: '2025-05-19T20:01:35Z'
                      total_count:
                        type: integer
                        example: 1
                      total_pages:
                        type: integer
                        example: 1
                      current_page:
                        type: integer
                        example: 1
        '401':
          description: unauthorized
    post:
      summary: Create a new mobile widget
      description: Creates a new mobile widget for the company.
      tags:
        - Company Mobile Widgets
      operationId: createMobileWidget
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: mobile widget created
          content:
            application/json:
              schema:
                type: object
                properties:
                  mobile_widget:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 48
                      company_id:
                        type: integer
                        example: 298486374
                      name:
                        type: string
                        example: MWidget
                      embed_url:
                        type: string
                        example: https://unseenktm.com
                      height:
                        type: integer
                        example: 90
                      cover_image_url:
                        type: string
                        example: https://www.example.com/test.jpg
                      page_scope:
                        type: object
                        properties:
                          home:
                            type: boolean
                            example: true
                          explore:
                            type: boolean
                            example: false
                      droplet_installation_id:
                        type:
                          - integer
                          - 'null'
                        example: 825425119
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 78559f54-b876-4a62-b69f-ed95355fe1d7
                      timestamp:
                        type: string
                        format: date-time
                        example: '2025-05-19T20:02:43Z'
        '401':
          description: unauthorized
        '422':
          description: invalid request
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  example: MWidget
                embed_url:
                  type: string
                  example: https://unseenktm.com
                height:
                  type: integer
                  example: 190
                cover_image_url:
                  type: string
                  example: https://www.example.com/test.jpg
                page_scope:
                  type: object
                  properties:
                    home:
                      type: boolean
                      example: true
                    explore:
                      type: boolean
                      example: false
              required:
                - name
                - embed_url
                - height
                - cover_image_url
  /api/company/mobile_widgets/{id}:
    get:
      summary: Retrieve a specific mobile widget
      description: Retrieves a specific mobile widget by ID.
      tags:
        - Company Mobile Widgets
      operationId: getMobileWidget
      security:
        - bearer_auth: []
      responses:
        '200':
          description: mobile widget found
        '401':
          description: unauthorized
        '404':
          description: not found
    put:
      summary: Update a mobile widget
      description: Updates an existing mobile widget.
      tags:
        - Company Mobile Widgets
      operationId: updateMobileWidget
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: mobile widget updated
        '401':
          description: unauthorized
        '404':
          description: not found
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  example: Updated Widget
                embed_url:
                  type: string
                  example: updated.com
                height:
                  type: integer
                  example: 200
                cover_image_url:
                  type: string
                  example: https://www.example.com/test.jpg
                page_scope:
                  type: object
                  properties:
                    home:
                      type: boolean
                      example: true
                    explore:
                      type: boolean
                      example: false
                droplet_installation_id:
                  type:
                    - integer
                    - 'null'
                  example: 825425119
              required: []
    delete:
      summary: Delete a mobile widget
      description: Deletes a mobile widget.
      tags:
        - Company Mobile Widgets
      operationId: deleteMobileWidget
      security:
        - bearer_auth: []
      responses:
        '200':
          description: mobile widget deleted
        '401':
          description: unauthorized
        '404':
          description: not found
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
  /api/company/pages:
    get:
      summary: Retrieve a list of company pages
      description: >-
        Get all company pages for the current company, filtered by the current
        language.
      tags:
        - Company Pages
      operationId: listPages
      security:
        - bearer_auth: []
      parameters:
        - name: page_number
          in: query
          schema:
            type: integer
            default: 1
          required: false
          description: Page number for pagination
        - name: per_page
          in: query
          schema:
            type: integer
            default: 10
          required: false
          description: Number of records per page
        - name: by_metadata
          in: query
          schema:
            type: string
            default: '{}'
            format: json
          required: false
          description: Search JSON meta data
      responses:
        '200':
          description: pages retrieved
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - type: object
                      properties:
                        pagination:
                          type: object
                          properties:
                            current:
                              type: integer
                            previous:
                              oneOf:
                                - type: integer
                                - type: 'null'
                            next:
                              oneOf:
                                - type: integer
                                - type: 'null'
                            per_page:
                              type: integer
                            pages:
                              type: integer
                            count:
                              type: integer
                    - type: object
                      properties:
                        items:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              title:
                                type: string
                                example: Page Title
                              slug:
                                type: string
                                example: page-title
                              label:
                                type:
                                  - string
                                  - 'null'
                                example: Trending
                              display_tag:
                                type:
                                  - string
                                  - 'null'
                                example: Display tag
                              share_link:
                                type:
                                  - string
                                  - 'null'
                                example: https://example.com/page-title
                              active:
                                type: boolean
                                example: true
                              metadata:
                                type: object
                                description: >-
                                  A JSON object that can store any custom data
                                  structure.
                              countries:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                    iso_name:
                                      type: string
                                    iso:
                                      type: string
                                    iso3:
                                      type: string
                                    name:
                                      type: string
                                    numcode:
                                      type: integer
                                    active:
                                      type: boolean
                                    currency_code:
                                      type: string
                                    currency_symbol:
                                      type: string
                                    separator:
                                      type: string
                                    delimiter:
                                      type: string
                                    address3:
                                      type: boolean
                                    default:
                                      type: boolean
                                    created_at:
                                      type: string
                                    updated_at:
                                      type: string
                                    geo_entity_id:
                                      type:
                                        - integer
                                        - 'null'
                                    settings:
                                      type:
                                        - object
                                        - 'null'
                                    tax_enabled:
                                      type:
                                        - boolean
                                        - 'null'
                                    tax_inclusive:
                                      type:
                                        - boolean
                                        - 'null'
                                    tax_standard_rate:
                                      type:
                                        - number
                                        - 'null'
                                    tax_name:
                                      type:
                                        - string
                                        - 'null'
                                    tax_local_name:
                                      type:
                                        - string
                                        - 'null'
                                    tax_local_abbreviation:
                                      type:
                                        - string
                                        - 'null'
                                    tax_provinces:
                                      type:
                                        - array
                                        - 'null'
                                    tax_rates:
                                      type:
                                        - array
                                        - 'null'
                                    tax_invoice_required:
                                      type:
                                        - boolean
                                        - 'null'
                                    checkout_requires_terms:
                                      type:
                                        - boolean
                                        - 'null'
                                    address_requires_province:
                                      type:
                                        - boolean
                                        - 'null'
                                    eu:
                                      type:
                                        - boolean
                                        - 'null'
                              stripped_description:
                                type:
                                  - string
                                  - 'null'
                                example: Page description
                              views:
                                type: integer
                                example: 100
                              leads:
                                type: integer
                                example: 10
                              image_url:
                                type:
                                  - string
                                  - 'null'
                                example: https://example.com/image.jpg
                              source:
                                type:
                                  - string
                                  - 'null'
                                example: builder
                              publish:
                                type: boolean
                                example: true
                              prompts:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                    title:
                                      type: string
                                    content:
                                      type: string
                              html_code:
                                type: string
                              prompts_enabled:
                                type: boolean
                              json:
                                type:
                                  - string
                                  - 'null'
                              application_theme_template:
                                type:
                                  - object
                                  - 'null'
                                properties:
                                  id:
                                    type: integer
                                  name:
                                    type: string
                                  themeable_type:
                                    type: string
                                  content:
                                    type: string
                                  stylesheet:
                                    type:
                                      - string
                                      - 'null'
                                  status:
                                    type: string
                                  created_at:
                                    type: string
                                  updated_at:
                                    type: string
                                  script:
                                    type: object
                                  schema:
                                    type: object
                                  content_without_schema:
                                    type: string
                                  images:
                                    type: array
                                  metadata:
                                    type: object
                                  category:
                                    type:
                                      - string
                                      - 'null'
                              search_engine_optimizer:
                                type:
                                  - object
                                  - 'null'
                                properties:
                                  id:
                                    type: integer
                                  title:
                                    type: string
                                  description:
                                    type: string
                                  image_url:
                                    type: string
                              use_search_engine:
                                type: boolean
                              show_on_site_search:
                                type: boolean
                              email:
                                type:
                                  - string
                                  - 'null'
                              versions:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    version:
                                      type: integer
                                    created_at:
                                      type: string
                                    published:
                                      type: boolean
                                    current:
                                      type: boolean
                                    author_id:
                                      type:
                                        - integer
                                        - 'null'
                                    author_name:
                                      type:
                                        - string
                                        - 'null'
                              open_graph:
                                type:
                                  - object
                                  - 'null'
                                properties:
                                  id:
                                    type: integer
                                  title:
                                    type: string
                                  description:
                                    type: string
                                  image_url:
                                    type: string
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  data:
                    type: object
                    properties:
                      error:
                        type: string
                        example: >-
                          The value `{referred_by: {user: 'John},}` in parameter
                          `by_metadata` is not a valid JSON
    post:
      summary: Create a new page
      description: Create a new page
      tags:
        - Pages
      operationId: createPages
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: page created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    example: 1
                  title:
                    type: string
                    example: Page Title
                  slug:
                    type: string
                    example: page-title
                  label:
                    type:
                      - string
                      - 'null'
                    example: Trending
                  display_tag:
                    type:
                      - string
                      - 'null'
                    example: Display tag
                  share_link:
                    type:
                      - string
                      - 'null'
                    example: https://example.com/page-title
                  active:
                    type: boolean
                    example: true
                  metadata:
                    type: object
                    description: A JSON object that can store any custom data structure.
                  countries:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        iso_name:
                          type: string
                        iso:
                          type: string
                        iso3:
                          type: string
                        name:
                          type: string
                        numcode:
                          type: integer
                        active:
                          type: boolean
                        currency_code:
                          type: string
                        currency_symbol:
                          type: string
                        separator:
                          type: string
                        delimiter:
                          type: string
                        address3:
                          type: boolean
                        default:
                          type: boolean
                        created_at:
                          type: string
                        updated_at:
                          type: string
                        geo_entity_id:
                          type:
                            - integer
                            - 'null'
                        settings:
                          type:
                            - object
                            - 'null'
                        tax_enabled:
                          type:
                            - boolean
                            - 'null'
                        tax_inclusive:
                          type:
                            - boolean
                            - 'null'
                        tax_standard_rate:
                          type:
                            - number
                            - 'null'
                        tax_name:
                          type:
                            - string
                            - 'null'
                        tax_local_name:
                          type:
                            - string
                            - 'null'
                        tax_local_abbreviation:
                          type:
                            - string
                            - 'null'
                        tax_provinces:
                          type:
                            - array
                            - 'null'
                        tax_rates:
                          type:
                            - array
                            - 'null'
                        tax_invoice_required:
                          type:
                            - boolean
                            - 'null'
                        checkout_requires_terms:
                          type:
                            - boolean
                            - 'null'
                        address_requires_province:
                          type:
                            - boolean
                            - 'null'
                        eu:
                          type:
                            - boolean
                            - 'null'
                  stripped_description:
                    type:
                      - string
                      - 'null'
                    example: Page description
                  views:
                    type: integer
                    example: 100
                  leads:
                    type: integer
                    example: 10
                  image_url:
                    type:
                      - string
                      - 'null'
                    example: https://example.com/image.jpg
                  source:
                    type:
                      - string
                      - 'null'
                    example: builder
                  publish:
                    type: boolean
                    example: true
                  prompts:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        title:
                          type: string
                        content:
                          type: string
                  html_code:
                    type: string
                  prompts_enabled:
                    type: boolean
                  json:
                    type:
                      - string
                      - 'null'
                  application_theme_template:
                    type:
                      - object
                      - 'null'
                    properties:
                      id:
                        type: integer
                      name:
                        type: string
                      themeable_type:
                        type: string
                      content:
                        type: string
                      stylesheet:
                        type:
                          - string
                          - 'null'
                      status:
                        type: string
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      script:
                        type: object
                      schema:
                        type: object
                      content_without_schema:
                        type: string
                      images:
                        type: array
                      metadata:
                        type: object
                      category:
                        type:
                          - string
                          - 'null'
                  search_engine_optimizer:
                    type:
                      - object
                      - 'null'
                    properties:
                      id:
                        type: integer
                      title:
                        type: string
                      description:
                        type: string
                      image_url:
                        type: string
                  use_search_engine:
                    type: boolean
                  show_on_site_search:
                    type: boolean
                  email:
                    type:
                      - string
                      - 'null'
                  versions:
                    type: array
                    items:
                      type: object
                      properties:
                        version:
                          type: integer
                        created_at:
                          type: string
                        published:
                          type: boolean
                        current:
                          type: boolean
                        author_id:
                          type:
                            - integer
                            - 'null'
                        author_name:
                          type:
                            - string
                            - 'null'
                  open_graph:
                    type:
                      - object
                      - 'null'
                    properties:
                      id:
                        type: integer
                      title:
                        type: string
                      description:
                        type: string
                      image_url:
                        type: string
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    properties:
                      title:
                        type: array
                        items:
                          type: string
                          example: can't be blank
                      slug:
                        type: array
                        items:
                          type: string
                          example: can't be blank
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                page:
                  type: object
                  properties:
                    title:
                      type: string
                      example: Page Title
                    html_code:
                      type: string
                      example: <p>Page content</p>
                    publish:
                      type: boolean
                      example: true
                    image_url:
                      type:
                        - string
                        - 'null'
                      example: https://example.com/image.jpg
                    available_countries:
                      type: array
                      items:
                        type: string
                      example:
                        - US
                    metadata:
                      type: object
                      description: Can hold JSON object of arbitrary structure
                  required:
                    - title
                    - html_code
  /api/company/pages/{id}:
    get:
      summary: Retrieve a single company page
      description: Fetch a specific page by its ID for the current company.
      tags:
        - Company Pages
      operationId: showPage
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          description: Page's Id
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: page retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    example: 1
                  title:
                    type: string
                    example: Page Title
                  slug:
                    type: string
                    example: page-title
                  label:
                    type:
                      - string
                      - 'null'
                    example: Trending
                  display_tag:
                    type:
                      - string
                      - 'null'
                    example: Display tag
                  share_link:
                    type:
                      - string
                      - 'null'
                    example: https://example.com/page-title
                  active:
                    type: boolean
                    example: true
                  metadata:
                    type: object
                    description: A JSON object that can store any custom data structure.
                  countries:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        iso_name:
                          type: string
                        iso:
                          type: string
                        iso3:
                          type: string
                        name:
                          type: string
                        numcode:
                          type: integer
                        active:
                          type: boolean
                        currency_code:
                          type: string
                        currency_symbol:
                          type: string
                        separator:
                          type: string
                        delimiter:
                          type: string
                        address3:
                          type: boolean
                        default:
                          type: boolean
                        created_at:
                          type: string
                        updated_at:
                          type: string
                        geo_entity_id:
                          type:
                            - integer
                            - 'null'
                        settings:
                          type:
                            - object
                            - 'null'
                        tax_enabled:
                          type:
                            - boolean
                            - 'null'
                        tax_inclusive:
                          type:
                            - boolean
                            - 'null'
                        tax_standard_rate:
                          type:
                            - number
                            - 'null'
                        tax_name:
                          type:
                            - string
                            - 'null'
                        tax_local_name:
                          type:
                            - string
                            - 'null'
                        tax_local_abbreviation:
                          type:
                            - string
                            - 'null'
                        tax_provinces:
                          type:
                            - array
                            - 'null'
                        tax_rates:
                          type:
                            - array
                            - 'null'
                        tax_invoice_required:
                          type:
                            - boolean
                            - 'null'
                        checkout_requires_terms:
                          type:
                            - boolean
                            - 'null'
                        address_requires_province:
                          type:
                            - boolean
                            - 'null'
                        eu:
                          type:
                            - boolean
                            - 'null'
                  stripped_description:
                    type:
                      - string
                      - 'null'
                    example: Page description
                  views:
                    type: integer
                    example: 100
                  leads:
                    type: integer
                    example: 10
                  image_url:
                    type:
                      - string
                      - 'null'
                    example: https://example.com/image.jpg
                  source:
                    type:
                      - string
                      - 'null'
                    example: builder
                  publish:
                    type: boolean
                    example: true
                  prompts:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        title:
                          type: string
                        content:
                          type: string
                  html_code:
                    type: string
                  prompts_enabled:
                    type: boolean
                  json:
                    type:
                      - string
                      - 'null'
                  application_theme_template:
                    type:
                      - object
                      - 'null'
                    properties:
                      id:
                        type: integer
                      name:
                        type: string
                      themeable_type:
                        type: string
                      content:
                        type: string
                      stylesheet:
                        type:
                          - string
                          - 'null'
                      status:
                        type: string
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      script:
                        type: object
                      schema:
                        type: object
                      content_without_schema:
                        type: string
                      images:
                        type: array
                      metadata:
                        type: object
                      category:
                        type:
                          - string
                          - 'null'
                  search_engine_optimizer:
                    type:
                      - object
                      - 'null'
                    properties:
                      id:
                        type: integer
                      title:
                        type: string
                      description:
                        type: string
                      image_url:
                        type: string
                  use_search_engine:
                    type: boolean
                  show_on_site_search:
                    type: boolean
                  email:
                    type:
                      - string
                      - 'null'
                  versions:
                    type: array
                    items:
                      type: object
                      properties:
                        version:
                          type: integer
                        created_at:
                          type: string
                        published:
                          type: boolean
                        current:
                          type: boolean
                        author_id:
                          type:
                            - integer
                            - 'null'
                        author_name:
                          type:
                            - string
                            - 'null'
                  open_graph:
                    type:
                      - object
                      - 'null'
                    properties:
                      id:
                        type: integer
                      title:
                        type: string
                      description:
                        type: string
                      image_url:
                        type: string
        '404':
          description: page not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
    put:
      summary: Update a company page
      description: Update the details of a specific company page.
      tags:
        - Company Pages
      operationId: updatePage
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          description: Page's Id
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: page updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    example: 1
                  title:
                    type: string
                    example: Page Title
                  slug:
                    type: string
                    example: page-title
                  label:
                    type:
                      - string
                      - 'null'
                    example: Trending
                  display_tag:
                    type:
                      - string
                      - 'null'
                    example: Display tag
                  share_link:
                    type:
                      - string
                      - 'null'
                    example: https://example.com/page-title
                  active:
                    type: boolean
                    example: true
                  metadata:
                    type: object
                    description: A JSON object that can store any custom data structure.
                  countries:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        iso_name:
                          type: string
                        iso:
                          type: string
                        iso3:
                          type: string
                        name:
                          type: string
                        numcode:
                          type: integer
                        active:
                          type: boolean
                        currency_code:
                          type: string
                        currency_symbol:
                          type: string
                        separator:
                          type: string
                        delimiter:
                          type: string
                        address3:
                          type: boolean
                        default:
                          type: boolean
                        created_at:
                          type: string
                        updated_at:
                          type: string
                        geo_entity_id:
                          type:
                            - integer
                            - 'null'
                        settings:
                          type:
                            - object
                            - 'null'
                        tax_enabled:
                          type:
                            - boolean
                            - 'null'
                        tax_inclusive:
                          type:
                            - boolean
                            - 'null'
                        tax_standard_rate:
                          type:
                            - number
                            - 'null'
                        tax_name:
                          type:
                            - string
                            - 'null'
                        tax_local_name:
                          type:
                            - string
                            - 'null'
                        tax_local_abbreviation:
                          type:
                            - string
                            - 'null'
                        tax_provinces:
                          type:
                            - array
                            - 'null'
                        tax_rates:
                          type:
                            - array
                            - 'null'
                        tax_invoice_required:
                          type:
                            - boolean
                            - 'null'
                        checkout_requires_terms:
                          type:
                            - boolean
                            - 'null'
                        address_requires_province:
                          type:
                            - boolean
                            - 'null'
                        eu:
                          type:
                            - boolean
                            - 'null'
                  stripped_description:
                    type:
                      - string
                      - 'null'
                    example: Page description
                  views:
                    type: integer
                    example: 100
                  leads:
                    type: integer
                    example: 10
                  image_url:
                    type:
                      - string
                      - 'null'
                    example: https://example.com/image.jpg
                  source:
                    type:
                      - string
                      - 'null'
                    example: builder
                  publish:
                    type: boolean
                    example: true
                  prompts:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        title:
                          type: string
                        content:
                          type: string
                  html_code:
                    type: string
                  prompts_enabled:
                    type: boolean
                  json:
                    type:
                      - string
                      - 'null'
                  application_theme_template:
                    type:
                      - object
                      - 'null'
                    properties:
                      id:
                        type: integer
                      name:
                        type: string
                      themeable_type:
                        type: string
                      content:
                        type: string
                      stylesheet:
                        type:
                          - string
                          - 'null'
                      status:
                        type: string
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      script:
                        type: object
                      schema:
                        type: object
                      content_without_schema:
                        type: string
                      images:
                        type: array
                      metadata:
                        type: object
                      category:
                        type:
                          - string
                          - 'null'
                  search_engine_optimizer:
                    type:
                      - object
                      - 'null'
                    properties:
                      id:
                        type: integer
                      title:
                        type: string
                      description:
                        type: string
                      image_url:
                        type: string
                  use_search_engine:
                    type: boolean
                  show_on_site_search:
                    type: boolean
                  email:
                    type:
                      - string
                      - 'null'
                  versions:
                    type: array
                    items:
                      type: object
                      properties:
                        version:
                          type: integer
                        created_at:
                          type: string
                        published:
                          type: boolean
                        current:
                          type: boolean
                        author_id:
                          type:
                            - integer
                            - 'null'
                        author_name:
                          type:
                            - string
                            - 'null'
                  open_graph:
                    type:
                      - object
                      - 'null'
                    properties:
                      id:
                        type: integer
                      title:
                        type: string
                      description:
                        type: string
                      image_url:
                        type: string
        '400':
          description: invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    example:
                      title:
                        - can't be blank
                      html_code:
                        - can't be blank
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                page:
                  type: object
                  properties:
                    title:
                      type: string
                      example: Updated Title
                    html_code:
                      type: string
                      example: <p>Updated content</p>
                    publish:
                      type: boolean
                      example: true
                    metadata:
                      type: object
                      description: Can hold JSON object of arbitrary structure
                  required:
                    - title
    delete:
      summary: Delete a company page
      description: Delete a specific page for the current company.
      tags:
        - Company Pages
      operationId: deletePage
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          description: Page's Id
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: page deleted
        '404':
          description: page not found
  /api/company/pages/{id}/send_to_top:
    get:
      summary: Send a page to the top
      description: >-
        Mark a specific company page as prioritized and send it to the top of
        the list.
      tags:
        - Company Pages
      operationId: sendToTopPage
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          description: Page's Id
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: page sent to top
        '500':
          description: server error
  /api/company/pages/{id}/duplicate:
    get:
      summary: Duplicate a page
      description: Create a duplicate of an existing company page.
      tags:
        - Company Pages
      operationId: duplicatePage
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          description: Page's Id
          required: true
          schema:
            type: integer
        - name: lang
          in: query
          description: Language code for the duplicated page
          schema:
            type: string
      responses:
        '200':
          description: page duplicated
        '400':
          description: missing language parameter
  /api/company/pages/{id}/append_metadata:
    patch:
      summary: Append metadata field
      tags:
        - Company Pages
      operationId: pageAppendMetadataField
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Page's Id
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  data:
                    type: object
                    properties:
                      page:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          title:
                            type: string
                            example: Page Title
                          slug:
                            type: string
                            example: page-title
                          label:
                            type:
                              - string
                              - 'null'
                            example: Trending
                          display_tag:
                            type:
                              - string
                              - 'null'
                            example: Display tag
                          share_link:
                            type:
                              - string
                              - 'null'
                            example: https://example.com/page-title
                          active:
                            type: boolean
                            example: true
                          metadata:
                            type: object
                            description: >-
                              A JSON object that can store any custom data
                              structure.
                          countries:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                iso_name:
                                  type: string
                                iso:
                                  type: string
                                iso3:
                                  type: string
                                name:
                                  type: string
                                numcode:
                                  type: integer
                                active:
                                  type: boolean
                                currency_code:
                                  type: string
                                currency_symbol:
                                  type: string
                                separator:
                                  type: string
                                delimiter:
                                  type: string
                                address3:
                                  type: boolean
                                default:
                                  type: boolean
                                created_at:
                                  type: string
                                updated_at:
                                  type: string
                                geo_entity_id:
                                  type:
                                    - integer
                                    - 'null'
                                settings:
                                  type:
                                    - object
                                    - 'null'
                                tax_enabled:
                                  type:
                                    - boolean
                                    - 'null'
                                tax_inclusive:
                                  type:
                                    - boolean
                                    - 'null'
                                tax_standard_rate:
                                  type:
                                    - number
                                    - 'null'
                                tax_name:
                                  type:
                                    - string
                                    - 'null'
                                tax_local_name:
                                  type:
                                    - string
                                    - 'null'
                                tax_local_abbreviation:
                                  type:
                                    - string
                                    - 'null'
                                tax_provinces:
                                  type:
                                    - array
                                    - 'null'
                                tax_rates:
                                  type:
                                    - array
                                    - 'null'
                                tax_invoice_required:
                                  type:
                                    - boolean
                                    - 'null'
                                checkout_requires_terms:
                                  type:
                                    - boolean
                                    - 'null'
                                address_requires_province:
                                  type:
                                    - boolean
                                    - 'null'
                                eu:
                                  type:
                                    - boolean
                                    - 'null'
                          stripped_description:
                            type:
                              - string
                              - 'null'
                            example: Page description
                          views:
                            type: integer
                            example: 100
                          leads:
                            type: integer
                            example: 10
                          image_url:
                            type:
                              - string
                              - 'null'
                            example: https://example.com/image.jpg
                          source:
                            type:
                              - string
                              - 'null'
                            example: builder
                          publish:
                            type: boolean
                            example: true
                          prompts:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                title:
                                  type: string
                                content:
                                  type: string
                          html_code:
                            type: string
                          prompts_enabled:
                            type: boolean
                          json:
                            type:
                              - string
                              - 'null'
                          application_theme_template:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                              name:
                                type: string
                              themeable_type:
                                type: string
                              content:
                                type: string
                              stylesheet:
                                type:
                                  - string
                                  - 'null'
                              status:
                                type: string
                              created_at:
                                type: string
                              updated_at:
                                type: string
                              script:
                                type: object
                              schema:
                                type: object
                              content_without_schema:
                                type: string
                              images:
                                type: array
                              metadata:
                                type: object
                              category:
                                type:
                                  - string
                                  - 'null'
                          search_engine_optimizer:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              description:
                                type: string
                              image_url:
                                type: string
                          use_search_engine:
                            type: boolean
                          show_on_site_search:
                            type: boolean
                          email:
                            type:
                              - string
                              - 'null'
                          versions:
                            type: array
                            items:
                              type: object
                              properties:
                                version:
                                  type: integer
                                created_at:
                                  type: string
                                published:
                                  type: boolean
                                current:
                                  type: boolean
                                author_id:
                                  type:
                                    - integer
                                    - 'null'
                                author_name:
                                  type:
                                    - string
                                    - 'null'
                          open_graph:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              description:
                                type: string
                              image_url:
                                type: string
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                metadata:
                  type: object
                  description: >-
                    A JSON object that can store any custom data structure. When
                    provided, merges with existing metadata data.
              required:
                - metadata
  /api/company/popups:
    get:
      summary: Get a list of popups
      tags:
        - Company Popups
      security:
        - bearer_auth: []
      operationId: listCompanyPopups
      parameters:
        - name: filterrific[sorted_by]
          in: query
          required: false
          description: Sort option (created_at_desc, title_asc, etc.)
          schema:
            type: string
        - name: filterrific[search_query]
          in: query
          required: false
          description: Search term
          schema:
            type: string
        - name: filterrific[by_status]
          in: query
          required: false
          description: Filter by status (active/inactive)
          schema:
            type: string
        - name: filterrific[by_type]
          in: query
          required: false
          description: Filter by popup type
          schema:
            type: string
        - name: filterrific[by_event]
          in: query
          required: false
          description: Filter by event
          schema:
            type: string
        - name: page
          in: query
          required: false
          description: Page number for pagination
          schema:
            type: integer
        - name: per_page
          in: query
          required: false
          description: Items per page for pagination
          schema:
            type: integer
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: array
        '401':
          description: unauthorized
    post:
      summary: Create a popup
      tags:
        - Company Popups
      security:
        - bearer_auth: []
      operationId: createCompanyPopup
      parameters: []
      responses:
        '201':
          description: popup created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  title:
                    type: string
                  description:
                    type: object
                  header:
                    type:
                      - string
                      - 'null'
                  image_url:
                    type:
                      - string
                      - 'null'
                  image_path:
                    type:
                      - string
                      - 'null'
                  event:
                    type: string
                  popup_type:
                    type: string
                  seconds:
                    type: integer
                  global:
                    type: boolean
                  active:
                    type: boolean
                  button_text:
                    type: string
                  button_redirect:
                    type:
                      - string
                      - 'null'
                  email_subject:
                    type:
                      - string
                      - 'null'
                  email_body:
                    type: object
                  background_color:
                    type: string
                  text_color:
                    type: string
                  button_color:
                    type: string
                  button_text_color:
                    type: string
                  button_action:
                    type: string
                  token:
                    type: string
                  class_name_trigger:
                    type: string
                  display_success_message:
                    type: boolean
                  success_message_type:
                    type:
                      - string
                      - 'null'
                  message_title:
                    type:
                      - string
                      - 'null'
                  message_body:
                    type:
                      - string
                      - 'null'
                  company:
                    type: object
                  followable:
                    type:
                      - object
                      - 'null'
                  paths:
                    type: array
                  leads:
                    type: array
        '401':
          description: unauthorized
        '422':
          description: unprocessable entity
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                popup:
                  type: object
                  properties:
                    title:
                      type: string
                      example: Welcome Popup
                    description:
                      type: string
                      example: <p>Welcome to our site!</p>
                    event:
                      type: string
                      example: page_load
                    popup_type:
                      type: string
                      example: modal
                    seconds:
                      type: integer
                      example: 5
                    global:
                      type: boolean
                      example: true
                    active:
                      type: boolean
                      example: true
                    button_text:
                      type: string
                      example: Close
                    button_redirect:
                      type: string
                      example: https://example.com
                    background_color:
                      type: string
                      example: '#ffffff'
                    text_color:
                      type: string
                      example: '#000000'
                    button_color:
                      type: string
                      example: '#007bff'
                    button_text_color:
                      type: string
                      example: '#ffffff'
                    button_action:
                      type: string
                      example: redirect
                    display_success_message:
                      type: boolean
                      example: true
                    success_message_type:
                      type: string
                      example: system_message
                    message_title:
                      type: string
                      example: Thank you!
                    message_body:
                      type: string
                      example: Your information has been submitted.
                  required:
                    - title
                    - event
                    - popup_type
                    - button_text
                    - background_color
                    - text_color
                    - button_color
                    - button_text_color
              required:
                - popup
  /api/company/popups/{id}:
    get:
      summary: Get a specific popup
      tags:
        - Company Popups
      security:
        - bearer_auth: []
      operationId: showCompanyPopup
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  title:
                    type: string
                  description:
                    type: object
                  header:
                    type:
                      - string
                      - 'null'
                  image_url:
                    type:
                      - string
                      - 'null'
                  image_path:
                    type:
                      - string
                      - 'null'
                  event:
                    type: string
                  popup_type:
                    type: string
                  seconds:
                    type: integer
                  global:
                    type: boolean
                  active:
                    type: boolean
                  button_text:
                    type: string
                  button_redirect:
                    type:
                      - string
                      - 'null'
                  email_subject:
                    type:
                      - string
                      - 'null'
                  email_body:
                    type: object
                  background_color:
                    type: string
                  text_color:
                    type: string
                  button_color:
                    type: string
                  button_text_color:
                    type: string
                  button_action:
                    type: string
                  token:
                    type: string
                  class_name_trigger:
                    type: string
                  display_success_message:
                    type: boolean
                  success_message_type:
                    type:
                      - string
                      - 'null'
                  message_title:
                    type:
                      - string
                      - 'null'
                  message_body:
                    type:
                      - string
                      - 'null'
                  company:
                    type: object
                  followable:
                    type:
                      - object
                      - 'null'
                  paths:
                    type: array
                  leads:
                    type: array
        '400':
          description: not found
        '401':
          description: unauthorized
    put:
      summary: Update a popup
      tags:
        - Company Popups
      security:
        - bearer_auth: []
      operationId: updateCompanyPopup
      parameters: []
      responses:
        '200':
          description: popup updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  title:
                    type: string
                  description:
                    type: object
                  header:
                    type:
                      - string
                      - 'null'
                  image_url:
                    type:
                      - string
                      - 'null'
                  image_path:
                    type:
                      - string
                      - 'null'
                  event:
                    type: string
                  popup_type:
                    type: string
                  seconds:
                    type: integer
                  global:
                    type: boolean
                  active:
                    type: boolean
                  button_text:
                    type: string
                  button_redirect:
                    type:
                      - string
                      - 'null'
                  email_subject:
                    type:
                      - string
                      - 'null'
                  email_body:
                    type: object
                  background_color:
                    type: string
                  text_color:
                    type: string
                  button_color:
                    type: string
                  button_text_color:
                    type: string
                  button_action:
                    type: string
                  token:
                    type: string
                  class_name_trigger:
                    type: string
                  display_success_message:
                    type: boolean
                  success_message_type:
                    type:
                      - string
                      - 'null'
                  message_title:
                    type:
                      - string
                      - 'null'
                  message_body:
                    type:
                      - string
                      - 'null'
                  company:
                    type: object
                  followable:
                    type:
                      - object
                      - 'null'
                  paths:
                    type: array
                  leads:
                    type: array
        '400':
          description: not found
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                popup:
                  type: object
                  properties:
                    title:
                      type: string
                      example: Updated Popup
                    description:
                      type: string
                      example: <p>Updated content!</p>
                    active:
                      type: boolean
                      example: false
                    global:
                      type: boolean
                      example: false
              required:
                - popup
    delete:
      summary: Delete a popup
      tags:
        - Company Popups
      security:
        - bearer_auth: []
      operationId: deleteCompanyPopup
      responses:
        '200':
          description: popup deleted
          content:
            application/json:
              schema:
                type: string
        '400':
          description: not found
        '401':
          description: unauthorized
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
  /api/settings/checkout:
    get:
      summary: Show a checkout settings
      tags:
        - Company Settings - Checkout
      security:
        - bearer_auth: []
      operationId: showCheckoutSettings
      description: Show the current checkout settings for the company.
      responses:
        '200':
          description: checkout settings shown
          content:
            application/json:
              schema:
                title: Company
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  primary_domain_hostname:
                    example: acme.com
                    type:
                      - string
                      - 'null'
                  subdomain:
                    example: acme
                    type:
                      - string
                      - 'null'
                  logo_url:
                    example: https://acme.com/logo.png
                    type:
                      - string
                      - 'null'
                  fluid_shop:
                    example: true
                    type:
                      - boolean
                      - 'null'
                  collect_phone:
                    example: true
                    type:
                      - boolean
                      - 'null'
                  require_phone:
                    example: true
                    type:
                      - boolean
                      - 'null'
                  require_billing_zip:
                    example: true
                    type:
                      - boolean
                      - 'null'
                  checkout_primary_button_color:
                    example: '#000000'
                    type:
                      - string
                      - 'null'
                  checkout_primary_text_color:
                    example: '#FFFFFF'
                    type:
                      - string
                      - 'null'
                  checkout_secondary_button_color:
                    example: '#000000'
                    type:
                      - string
                      - 'null'
                  checkout_secondary_text_color:
                    example: '#FFFFFF'
                    type:
                      - string
                      - 'null'
                required:
                  - id
                  - name
    put:
      summary: Update a checkout settings
      tags:
        - Company Settings - Checkout
      security:
        - bearer_auth: []
      operationId: updateCheckoutSettings
      description: Update the current checkout settings for the company.
      parameters: []
      responses:
        '200':
          description: checkout settings updated
          content:
            application/json:
              schema:
                title: Company
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  primary_domain_hostname:
                    example: acme.com
                    type:
                      - string
                      - 'null'
                  subdomain:
                    example: acme
                    type:
                      - string
                      - 'null'
                  logo_url:
                    example: https://acme.com/logo.png
                    type:
                      - string
                      - 'null'
                  fluid_shop:
                    example: true
                    type:
                      - boolean
                      - 'null'
                  collect_phone:
                    example: true
                    type:
                      - boolean
                      - 'null'
                  require_phone:
                    example: true
                    type:
                      - boolean
                      - 'null'
                  require_billing_zip:
                    example: true
                    type:
                      - boolean
                      - 'null'
                  checkout_primary_button_color:
                    example: '#000000'
                    type:
                      - string
                      - 'null'
                  checkout_primary_text_color:
                    example: '#FFFFFF'
                    type:
                      - string
                      - 'null'
                  checkout_secondary_button_color:
                    example: '#000000'
                    type:
                      - string
                      - 'null'
                  checkout_secondary_text_color:
                    example: '#FFFFFF'
                    type:
                      - string
                      - 'null'
                required:
                  - id
                  - name
        '422':
          description: checkout settings update failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                required:
                  - errors
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                checkout:
                  type: object
                  properties:
                    collect_phone:
                      type: boolean
                    require_phone:
                      type: boolean
                    require_billing_zip:
                      type: boolean
                    checkout_primary_button_color:
                      type: string
                    checkout_primary_text_color:
                      type: string
                    checkout_secondary_button_color:
                      type: string
                    checkout_secondary_text_color:
                      type: string
              required:
                - checkout
  /api/settings/company_countries:
    get:
      summary: List company countries
      tags:
        - Company Settings - Countries
      security:
        - bearer_auth: []
      operationId: listCompanyCountries
      description: List all countries configured for the company
      responses:
        '200':
          description: Company countries retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  company_countries:
                    type: array
                    items:
                      title: CompanyCountry
                      type: object
                      properties:
                        id:
                          type: integer
                        currency:
                          example: USD
                          type: string
                        base_shipping:
                          example: 0
                          type:
                            - number
                            - string
                            - 'null'
                          default: '0.0'
                        default:
                          example: false
                          type: boolean
                        pause_incomplete_enrollment:
                          example: false
                          type:
                            - boolean
                            - 'null'
                        handling_fee:
                          example: 5.99
                          type:
                            - number
                            - 'null'
                        updated_at:
                          example: '2021-01-01T00:00:00Z'
                          type: string
                          format: date-time
                        country:
                          title: Country
                          type: object
                          properties:
                            id:
                              type: integer
                            name:
                              example: United States
                              type: string
                            iso:
                              description: 2-letter country code (ISO 3166-1 alpha-2)
                              example: US
                              type: string
                            iso_name:
                              example: UNITED STATES
                              type: string
                            iso3:
                              description: 3-letter country code (ISO 3166-1 alpha-3)
                              example: USA
                              type: string
                            currency_code:
                              example: USD
                              type: string
                            currency_symbol:
                              example: $
                              type: string
                            tax_enabled:
                              example: true
                              type:
                                - boolean
                                - 'null'
                          required:
                            - id
                            - name
                            - iso
                            - iso_name
                            - iso3
                            - currency_code
                            - currency_symbol
                        tax_apply:
                          example: false
                          type:
                            - boolean
                            - 'null'
                        tax_business_id:
                          example: '123456789'
                          type:
                            - string
                            - 'null'
                        tax_apply_discounted_rates:
                          example: false
                          type:
                            - boolean
                            - 'null'
                        tax_auto_send_invoice:
                          example: false
                          type:
                            - boolean
                            - 'null'
                        apply_shipping_tax:
                          example: false
                          type:
                            - boolean
                            - 'null'
                        avalara_shipping_tax_code:
                          example: FR030000
                          type:
                            - string
                            - 'null'
                        customs:
                          description: >-
                            DDP = Delivery Duty Paid, DAP = Delivered at Place
                            (customer pays VAT/customs on delivery)
                          example: DDP
                          type:
                            - string
                            - 'null'
                        use_company_default_tax_settings:
                          example: true
                          type:
                            - boolean
                            - 'null'
                        use_company_avalara_tax_settings:
                          example: false
                          type:
                            - boolean
                            - 'null'
                        use_company_manual_tax_settings:
                          example: false
                          type:
                            - boolean
                            - 'null'
                        use_company_webhook_tax_settings:
                          example: false
                          type:
                            - boolean
                            - 'null'
                        use_custom_avalara_tax_settings:
                          example: false
                          type:
                            - boolean
                            - 'null'
                        custom_avalara_user_name:
                          example: avalara_user
                          type:
                            - string
                            - 'null'
                        custom_avalara_password:
                          example: password123
                          type:
                            - string
                            - 'null'
                        use_custom_avalara_product_tax_code:
                          example: false
                          type:
                            - boolean
                            - 'null'
                        tax_option:
                          example: avalara
                          type:
                            - string
                            - 'null'
                        warehouse:
                          title: Warehouse
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                            name:
                              example: Central Distribution Center
                              type: string
                            active:
                              example: true
                              type: boolean
                            external_id:
                              example: WH-12345
                              type:
                                - string
                                - 'null'
                            metadata:
                              example:
                                capacity:
                                  total_square_feet: 50000
                                operations:
                                  staff_count: 15
                                  security_level: high
                              type: object
                            country:
                              title: Country
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  example: United States
                                  type: string
                                iso:
                                  description: 2-letter country code (ISO 3166-1 alpha-2)
                                  example: US
                                  type: string
                                iso_name:
                                  example: UNITED STATES
                                  type: string
                                iso3:
                                  description: 3-letter country code (ISO 3166-1 alpha-3)
                                  example: USA
                                  type: string
                                currency_code:
                                  example: USD
                                  type: string
                                currency_symbol:
                                  example: $
                                  type: string
                                tax_enabled:
                                  example: true
                                  type:
                                    - boolean
                                    - 'null'
                                currency_details:
                                  example:
                                    currency_name: US Dollar
                                    currency_symbol: $
                                    currency_iso_code: USD
                                  type: object
                              required:
                                - id
                                - name
                                - iso
                                - iso_name
                                - iso3
                                - currency_code
                                - currency_symbol
                                - currency_details
                            address:
                              title: Address
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  example: John Doe
                                  type: string
                                address1:
                                  example: 123 Main St
                                  type: string
                                address2:
                                  example: Apt 4B
                                  type:
                                    - string
                                    - 'null'
                                address3:
                                  example: Building 5
                                  type:
                                    - string
                                    - 'null'
                                city:
                                  example: New York
                                  type: string
                                state:
                                  example: NY
                                  type: string
                                subdivision_code:
                                  example: NY
                                  type:
                                    - string
                                    - 'null'
                                postal_code:
                                  example: '10001'
                                  type: string
                                country_code:
                                  example: US
                                  type:
                                    - string
                                    - 'null'
                                default:
                                  description: >-
                                    Use this address by default when there are
                                    multiple addresses
                                  example: true
                                  type:
                                    - boolean
                                    - 'null'
                                  default: false
                                first_name:
                                  example: John
                                  type: string
                                last_name:
                                  example: Doe
                                  type: string
                              required:
                                - id
                                - name
                                - address1
                                - city
                                - state
                                - postal_code
                                - first_name
                                - last_name
                          required:
                            - id
                            - name
                            - active
                            - metadata
                            - country
                            - address
                        company:
                          title: Company
                          type: object
                          properties:
                            id:
                              type: integer
                          required:
                            - id
                      required:
                        - id
                        - currency
                        - default
                        - updated_at
                        - country
                        - company
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - company_countries
                  - meta
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
    post:
      summary: Create a company country
      tags:
        - Company Settings - Countries
      security:
        - bearer_auth: []
      operationId: createCompanyCountry
      description: Add a new country to the company configuration
      parameters: []
      responses:
        '200':
          description: No tax settings provided
          content:
            application/json:
              schema:
                type: object
                properties:
                  company_country:
                    title: CompanyCountry
                    type: object
                    properties:
                      id:
                        type: integer
                      currency:
                        example: USD
                        type: string
                      base_shipping:
                        example: 0
                        type:
                          - number
                          - string
                          - 'null'
                        default: '0.0'
                      default:
                        example: false
                        type: boolean
                      pause_incomplete_enrollment:
                        example: false
                        type:
                          - boolean
                          - 'null'
                      handling_fee:
                        example: 5.99
                        type:
                          - number
                          - 'null'
                      updated_at:
                        example: '2021-01-01T00:00:00Z'
                        type: string
                        format: date-time
                      country:
                        title: Country
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: United States
                            type: string
                          iso:
                            description: 2-letter country code (ISO 3166-1 alpha-2)
                            example: US
                            type: string
                          iso_name:
                            example: UNITED STATES
                            type: string
                          iso3:
                            description: 3-letter country code (ISO 3166-1 alpha-3)
                            example: USA
                            type: string
                          currency_code:
                            example: USD
                            type: string
                          currency_symbol:
                            example: $
                            type: string
                          tax_enabled:
                            example: true
                            type:
                              - boolean
                              - 'null'
                        required:
                          - id
                          - name
                          - iso
                          - iso_name
                          - iso3
                          - currency_code
                          - currency_symbol
                      tax_apply:
                        example: false
                        type:
                          - boolean
                          - 'null'
                      tax_business_id:
                        example: '123456789'
                        type:
                          - string
                          - 'null'
                      tax_apply_discounted_rates:
                        example: false
                        type:
                          - boolean
                          - 'null'
                      tax_auto_send_invoice:
                        example: false
                        type:
                          - boolean
                          - 'null'
                      apply_shipping_tax:
                        example: false
                        type:
                          - boolean
                          - 'null'
                      avalara_shipping_tax_code:
                        example: FR030000
                        type:
                          - string
                          - 'null'
                      customs:
                        description: >-
                          DDP = Delivery Duty Paid, DAP = Delivered at Place
                          (customer pays VAT/customs on delivery)
                        example: DDP
                        type:
                          - string
                          - 'null'
                      use_company_default_tax_settings:
                        example: true
                        type:
                          - boolean
                          - 'null'
                      use_company_avalara_tax_settings:
                        example: false
                        type:
                          - boolean
                          - 'null'
                      use_company_manual_tax_settings:
                        example: false
                        type:
                          - boolean
                          - 'null'
                      use_company_webhook_tax_settings:
                        example: false
                        type:
                          - boolean
                          - 'null'
                      use_custom_avalara_tax_settings:
                        example: false
                        type:
                          - boolean
                          - 'null'
                      custom_avalara_user_name:
                        example: avalara_user
                        type:
                          - string
                          - 'null'
                      custom_avalara_password:
                        example: password123
                        type:
                          - string
                          - 'null'
                      use_custom_avalara_product_tax_code:
                        example: false
                        type:
                          - boolean
                          - 'null'
                      tax_option:
                        example: avalara
                        type:
                          - string
                          - 'null'
                      warehouse:
                        title: Warehouse
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          name:
                            example: Central Distribution Center
                            type: string
                          active:
                            example: true
                            type: boolean
                          external_id:
                            example: WH-12345
                            type:
                              - string
                              - 'null'
                          metadata:
                            example:
                              capacity:
                                total_square_feet: 50000
                              operations:
                                staff_count: 15
                                security_level: high
                            type: object
                          country:
                            title: Country
                            type: object
                            properties:
                              id:
                                type: integer
                              name:
                                example: United States
                                type: string
                              iso:
                                description: 2-letter country code (ISO 3166-1 alpha-2)
                                example: US
                                type: string
                              iso_name:
                                example: UNITED STATES
                                type: string
                              iso3:
                                description: 3-letter country code (ISO 3166-1 alpha-3)
                                example: USA
                                type: string
                              currency_code:
                                example: USD
                                type: string
                              currency_symbol:
                                example: $
                                type: string
                              tax_enabled:
                                example: true
                                type:
                                  - boolean
                                  - 'null'
                              currency_details:
                                example:
                                  currency_name: US Dollar
                                  currency_symbol: $
                                  currency_iso_code: USD
                                type: object
                            required:
                              - id
                              - name
                              - iso
                              - iso_name
                              - iso3
                              - currency_code
                              - currency_symbol
                              - currency_details
                          address:
                            title: Address
                            type: object
                            properties:
                              id:
                                type: integer
                              name:
                                example: John Doe
                                type: string
                              address1:
                                example: 123 Main St
                                type: string
                              address2:
                                example: Apt 4B
                                type:
                                  - string
                                  - 'null'
                              address3:
                                example: Building 5
                                type:
                                  - string
                                  - 'null'
                              city:
                                example: New York
                                type: string
                              state:
                                example: NY
                                type: string
                              subdivision_code:
                                example: NY
                                type:
                                  - string
                                  - 'null'
                              postal_code:
                                example: '10001'
                                type: string
                              country_code:
                                example: US
                                type:
                                  - string
                                  - 'null'
                              default:
                                description: >-
                                  Use this address by default when there are
                                  multiple addresses
                                example: true
                                type:
                                  - boolean
                                  - 'null'
                                default: false
                              first_name:
                                example: John
                                type: string
                              last_name:
                                example: Doe
                                type: string
                            required:
                              - id
                              - name
                              - address1
                              - city
                              - state
                              - postal_code
                              - first_name
                              - last_name
                        required:
                          - id
                          - name
                          - active
                          - metadata
                          - country
                          - address
                      company:
                        title: Company
                        type: object
                        properties:
                          id:
                            type: integer
                        required:
                          - id
                    required:
                      - id
                      - currency
                      - default
                      - updated_at
                      - country
                      - company
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - company_country
                  - meta
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '422':
          description: Invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                company_country:
                  type: object
                  properties:
                    country_id:
                      type: integer
                    currency:
                      type: string
                    warehouse_id:
                      type: integer
                    handling_fee:
                      type: number
                    default:
                      type: boolean
                    tax_business_id:
                      type: string
                    use_company_default_tax_settings:
                      type: boolean
                    use_company_avalara_tax_settings:
                      type: boolean
                    use_custom_avalara_tax_settings:
                      type: boolean
                    use_company_webhook_tax_settings:
                      type: boolean
                    use_company_manual_tax_settings:
                      type: boolean
                    custom_avalara_user_name:
                      type: string
                    custom_avalara_password:
                      type: string
                    use_custom_avalara_product_tax_code:
                      type: boolean
                    tax_option:
                      type: string
                  required:
                    - country_id
              required:
                - company_country
  /api/settings/company_countries/{id}:
    put:
      summary: Update a company country
      tags:
        - Company Settings - Countries
      security:
        - bearer_auth: []
      operationId: updateCompanyCountry
      description: Update an existing country configuration for the company
      parameters: []
      responses:
        '200':
          description: Company country updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  company_country:
                    title: CompanyCountry
                    type: object
                    properties:
                      id:
                        type: integer
                      currency:
                        example: USD
                        type: string
                      base_shipping:
                        example: 0
                        type:
                          - number
                          - string
                          - 'null'
                        default: '0.0'
                      default:
                        example: false
                        type: boolean
                      pause_incomplete_enrollment:
                        example: false
                        type:
                          - boolean
                          - 'null'
                      handling_fee:
                        example: 5.99
                        type:
                          - number
                          - 'null'
                      updated_at:
                        example: '2021-01-01T00:00:00Z'
                        type: string
                        format: date-time
                      country:
                        title: Country
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: United States
                            type: string
                          iso:
                            description: 2-letter country code (ISO 3166-1 alpha-2)
                            example: US
                            type: string
                          iso_name:
                            example: UNITED STATES
                            type: string
                          iso3:
                            description: 3-letter country code (ISO 3166-1 alpha-3)
                            example: USA
                            type: string
                          currency_code:
                            example: USD
                            type: string
                          currency_symbol:
                            example: $
                            type: string
                          tax_enabled:
                            example: true
                            type:
                              - boolean
                              - 'null'
                        required:
                          - id
                          - name
                          - iso
                          - iso_name
                          - iso3
                          - currency_code
                          - currency_symbol
                      tax_apply:
                        example: false
                        type:
                          - boolean
                          - 'null'
                      tax_business_id:
                        example: '123456789'
                        type:
                          - string
                          - 'null'
                      tax_apply_discounted_rates:
                        example: false
                        type:
                          - boolean
                          - 'null'
                      tax_auto_send_invoice:
                        example: false
                        type:
                          - boolean
                          - 'null'
                      apply_shipping_tax:
                        example: false
                        type:
                          - boolean
                          - 'null'
                      avalara_shipping_tax_code:
                        example: FR030000
                        type:
                          - string
                          - 'null'
                      customs:
                        description: >-
                          DDP = Delivery Duty Paid, DAP = Delivered at Place
                          (customer pays VAT/customs on delivery)
                        example: DDP
                        type:
                          - string
                          - 'null'
                      use_company_default_tax_settings:
                        example: true
                        type:
                          - boolean
                          - 'null'
                      use_company_avalara_tax_settings:
                        example: false
                        type:
                          - boolean
                          - 'null'
                      use_company_manual_tax_settings:
                        example: false
                        type:
                          - boolean
                          - 'null'
                      use_company_webhook_tax_settings:
                        example: false
                        type:
                          - boolean
                          - 'null'
                      use_custom_avalara_tax_settings:
                        example: false
                        type:
                          - boolean
                          - 'null'
                      custom_avalara_user_name:
                        example: avalara_user
                        type:
                          - string
                          - 'null'
                      custom_avalara_password:
                        example: password123
                        type:
                          - string
                          - 'null'
                      use_custom_avalara_product_tax_code:
                        example: false
                        type:
                          - boolean
                          - 'null'
                      tax_option:
                        example: avalara
                        type:
                          - string
                          - 'null'
                      warehouse:
                        title: Warehouse
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          name:
                            example: Central Distribution Center
                            type: string
                          active:
                            example: true
                            type: boolean
                          external_id:
                            example: WH-12345
                            type:
                              - string
                              - 'null'
                          metadata:
                            example:
                              capacity:
                                total_square_feet: 50000
                              operations:
                                staff_count: 15
                                security_level: high
                            type: object
                          country:
                            title: Country
                            type: object
                            properties:
                              id:
                                type: integer
                              name:
                                example: United States
                                type: string
                              iso:
                                description: 2-letter country code (ISO 3166-1 alpha-2)
                                example: US
                                type: string
                              iso_name:
                                example: UNITED STATES
                                type: string
                              iso3:
                                description: 3-letter country code (ISO 3166-1 alpha-3)
                                example: USA
                                type: string
                              currency_code:
                                example: USD
                                type: string
                              currency_symbol:
                                example: $
                                type: string
                              tax_enabled:
                                example: true
                                type:
                                  - boolean
                                  - 'null'
                              currency_details:
                                example:
                                  currency_name: US Dollar
                                  currency_symbol: $
                                  currency_iso_code: USD
                                type: object
                            required:
                              - id
                              - name
                              - iso
                              - iso_name
                              - iso3
                              - currency_code
                              - currency_symbol
                              - currency_details
                          address:
                            title: Address
                            type: object
                            properties:
                              id:
                                type: integer
                              name:
                                example: John Doe
                                type: string
                              address1:
                                example: 123 Main St
                                type: string
                              address2:
                                example: Apt 4B
                                type:
                                  - string
                                  - 'null'
                              address3:
                                example: Building 5
                                type:
                                  - string
                                  - 'null'
                              city:
                                example: New York
                                type: string
                              state:
                                example: NY
                                type: string
                              subdivision_code:
                                example: NY
                                type:
                                  - string
                                  - 'null'
                              postal_code:
                                example: '10001'
                                type: string
                              country_code:
                                example: US
                                type:
                                  - string
                                  - 'null'
                              default:
                                description: >-
                                  Use this address by default when there are
                                  multiple addresses
                                example: true
                                type:
                                  - boolean
                                  - 'null'
                                default: false
                              first_name:
                                example: John
                                type: string
                              last_name:
                                example: Doe
                                type: string
                            required:
                              - id
                              - name
                              - address1
                              - city
                              - state
                              - postal_code
                              - first_name
                              - last_name
                        required:
                          - id
                          - name
                          - active
                          - metadata
                          - country
                          - address
                      company:
                        title: Company
                        type: object
                        properties:
                          id:
                            type: integer
                        required:
                          - id
                    required:
                      - id
                      - currency
                      - default
                      - updated_at
                      - country
                      - company
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - company_country
                  - meta
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '404':
          description: Company country not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: Invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                company_country:
                  type: object
                  properties:
                    currency:
                      type: string
                    warehouse_id:
                      type: integer
                    handling_fee:
                      type: number
                    default:
                      type: boolean
                    tax_business_id:
                      type: string
                    use_company_default_tax_settings:
                      type: boolean
                    use_company_avalara_tax_settings:
                      type: boolean
                    use_custom_avalara_tax_settings:
                      type: boolean
                    use_company_webhook_tax_settings:
                      type: boolean
                    use_company_manual_tax_settings:
                      type: boolean
                    custom_avalara_user_name:
                      type: string
                    custom_avalara_password:
                      type: string
                    use_custom_avalara_product_tax_code:
                      type: boolean
                    tax_option:
                      type: string
                  required: []
              required:
                - id
                - company_country
    delete:
      summary: Delete a company country
      tags:
        - Company Settings - Countries
      security:
        - bearer_auth: []
      operationId: deleteCompanyCountry
      description: Remove a country from the company configuration
      responses:
        '200':
          description: Company country deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Company country deleted successfully
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - success
                  - meta
                  - message
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '404':
          description: Company country not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: Unprocessable
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
    parameters:
      - name: id
        in: path
        required: true
        description: Company country ID
        schema:
          type: integer
  /api/settings/company_countries/tax_options:
    get:
      summary: Get valid tax options for the company country
      tags:
        - Company Settings - Countries
      security:
        - bearer_auth: []
      operationId: getCompanyCountryTaxOptions
      description: Get valid tax options for the company country
      responses:
        '200':
          description: Company country tax options retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  tax_options:
                    type: array
                    items:
                      type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - tax_options
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
  /api/settings/languages:
    get:
      summary: List company languages
      tags:
        - Company Settings - Languages
      security:
        - bearer_auth: []
      operationId: listCompanyLanguages
      description: >-
        List all available languages and their configuration status for the
        company. Shows which languages are active for the company.
      parameters:
        - name: active
          in: query
          schema:
            type: boolean
          required: false
          description: Filter by active status
      responses:
        '200':
          description: Available languages retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  languages:
                    type: array
                    items:
                      title: Language
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          example: English
                          type:
                            - string
                            - 'null'
                        iso:
                          example: en
                          type:
                            - string
                            - 'null'
                        company_users_count:
                          example: 100
                          type: integer
                        active_in_company:
                          example: true
                          type: boolean
                      required:
                        - id
                        - company_users_count
                        - active_in_company
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - languages
                  - meta
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
    post:
      summary: Configure company language
      tags:
        - Company Settings - Languages
      security:
        - bearer_auth: []
      operationId: configureCompanyLanguage
      description: >-
        Add a new language to the company's configuration. This will enable the
        language for use within the company.
      parameters: []
      responses:
        '200':
          description: Language added successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  language:
                    title: Language
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        example: English
                        type:
                          - string
                          - 'null'
                      iso:
                        example: en
                        type:
                          - string
                          - 'null'
                      company_users_count:
                        example: 100
                        type: integer
                      active_in_company:
                        example: true
                        type: boolean
                    required:
                      - id
                      - company_users_count
                      - active_in_company
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - language
                  - meta
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '422':
          description: Invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
              required:
                - id
  /api/settings/languages/{id}:
    delete:
      summary: Remove company language
      tags:
        - Company Settings - Languages
      security:
        - bearer_auth: []
      operationId: removeCompanyLanguage
      description: >-
        Remove a language from the company's configuration. This will disable
        the language for use within the company.
      responses:
        '200':
          description: Language removed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Language removed successfully
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - success
                  - meta
                  - message
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '404':
          description: Language not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
    parameters:
      - name: id
        in: path
        required: true
        description: Language ID to be removed from company configuration
        schema:
          type: integer
  /api/settings/social_media:
    get:
      summary: Retrieves social media settings
      tags:
        - Company Settings - Social Media
      description: Retrieve the social media settings for the company.
      security:
        - bearer_auth: []
      parameters:
        - name: Authorization
          in: header
          schema:
            type: string
      responses:
        '200':
          description: Social media settings found
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    example: 123
                  facebook:
                    type:
                      - string
                      - 'null'
                    example: https://facebook.com/company
                  instagram:
                    type:
                      - string
                      - 'null'
                    example: https://instagram.com/company
                  linkedin:
                    type:
                      - string
                      - 'null'
                    example: https://linkedin.com/company
                  pinterest:
                    type:
                      - string
                      - 'null'
                    example: https://pinterest.com/company
                  tiktok:
                    type:
                      - string
                      - 'null'
                    example: https://tiktok.com/@company
                  twitter:
                    type:
                      - string
                      - 'null'
                    example: https://twitter.com/company
                  youtube:
                    type:
                      - string
                      - 'null'
                    example: https://youtube.com/company
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                        format: date_time
                required:
                  - id
    put:
      summary: Updates social media settings
      tags:
        - Company Settings - Social Media
      parameters:
        - name: Authorization
          in: header
          schema:
            type: string
      responses:
        '200':
          description: Social media settings updated with a new social media account
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  facebook:
                    type:
                      - string
                      - 'null'
                  twitter:
                    type:
                      - string
                      - 'null'
                  instagram:
                    type:
                      - string
                      - 'null'
                  linkedin:
                    type:
                      - string
                      - 'null'
                  pinterest:
                    type:
                      - string
                      - 'null'
                  tiktok:
                    type:
                      - string
                      - 'null'
                  youtube:
                    type:
                      - string
                      - 'null'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                        format: date_time
                required:
                  - id
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                social_media:
                  type: object
                  properties:
                    facebook:
                      type:
                        - string
                        - 'null'
                      example: https://facebook.com/updated
                    twitter:
                      type:
                        - string
                        - 'null'
                      example: https://twitter.com/updated
                    instagram:
                      type:
                        - string
                        - 'null'
                      example: https://instagram.com/new
                    linkedin:
                      type:
                        - string
                        - 'null'
                      example: https://linkedin.com/updated
                    pinterest:
                      type:
                        - string
                        - 'null'
                      example: https://pinterest.com/updated
                    tiktok:
                      type:
                        - string
                        - 'null'
                      example: https://tiktok.com/@updated
                    youtube:
                      type:
                        - string
                        - 'null'
                      example: https://youtube.com/updated
              required:
                - social_media
  /api/settings/warehouses:
    get:
      summary: List warehouses
      tags:
        - Company Settings - Warehouses
      security:
        - bearer_auth: []
      operationId: listWarehouses
      description: List all warehouses for the company.
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  warehouses:
                    type: array
                    items:
                      title: Warehouse
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          example: Central Distribution Center
                          type: string
                        active:
                          example: true
                          type: boolean
                        external_id:
                          example: WH-12345
                          type:
                            - string
                            - 'null'
                        metadata:
                          example:
                            capacity:
                              total_square_feet: 50000
                            operations:
                              staff_count: 15
                              security_level: high
                          type: object
                        country:
                          example:
                            id: 1
                            iso: US
                          type: object
                        address:
                          example:
                            id: 123
                            name: Main Warehouse
                            address1: 123 Logistics Way
                            address2: Building A
                            address3: null
                            city: Portland
                            state: OR
                            postal_code: '97201'
                          type: object
                      required:
                        - id
                        - name
                        - active
                        - metadata
                        - country
                        - address
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
    post:
      summary: Create a warehouse
      tags:
        - Company Settings - Warehouses
      security:
        - bearer_auth: []
      operationId: createWarehouseSettings
      description: Create a new warehouse for the company.
      parameters: []
      responses:
        '201':
          description: warehouse created
          content:
            application/json:
              schema:
                type: object
                properties:
                  warehouse:
                    title: Warehouse
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        example: Central Distribution Center
                        type: string
                      active:
                        example: true
                        type: boolean
                      external_id:
                        example: WH-12345
                        type:
                          - string
                          - 'null'
                      metadata:
                        example:
                          capacity:
                            total_square_feet: 50000
                          operations:
                            staff_count: 15
                            security_level: high
                        type: object
                      country:
                        example:
                          id: 1
                          iso: US
                        type: object
                      address:
                        example:
                          id: 123
                          name: Main Warehouse
                          address1: 123 Logistics Way
                          address2: Building A
                          address3: null
                          city: Portland
                          state: OR
                          postal_code: '97201'
                        type: object
                    required:
                      - id
                      - name
                      - active
                      - metadata
                      - country
                      - address
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                active:
                  type: boolean
                  not:
                    type: 'null'
                default:
                  type: boolean
                  not:
                    type: 'null'
                country:
                  type: object
                  properties:
                    id:
                      type: integer
                      not:
                        type: 'null'
                    iso:
                      type: string
                      minLength: 1
                  required: []
                address:
                  type: object
                  properties:
                    address1:
                      type: string
                      minLength: 1
                    city:
                      type: string
                      minLength: 1
                    state:
                      type: string
                      minLength: 1
                    postal_code:
                      type: string
                      minLength: 1
                    address2:
                      type: string
                      minLength: 1
                  required: []
              required: []
  /api/settings/warehouses/{id}:
    get:
      summary: Show a warehouse
      tags:
        - Company Settings - Warehouses
      security:
        - bearer_auth: []
      operationId: showWarehouseSettings
      description: Show a warehouse by ID.
      responses:
        '200':
          description: warehouse shown
          content:
            application/json:
              schema:
                type: object
                properties:
                  warehouse:
                    title: Warehouse
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        example: Central Distribution Center
                        type: string
                      active:
                        example: true
                        type: boolean
                      external_id:
                        example: WH-12345
                        type:
                          - string
                          - 'null'
                      metadata:
                        example:
                          capacity:
                            total_square_feet: 50000
                          operations:
                            staff_count: 15
                            security_level: high
                        type: object
                      country:
                        example:
                          id: 1
                          iso: US
                        type: object
                      address:
                        example:
                          id: 123
                          name: Main Warehouse
                          address1: 123 Logistics Way
                          address2: Building A
                          address3: null
                          city: Portland
                          state: OR
                          postal_code: '97201'
                        type: object
                    required:
                      - id
                      - name
                      - active
                      - metadata
                      - country
                      - address
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '404':
          description: warehouse not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
    put:
      summary: Update a warehouse
      tags:
        - Company Settings - Warehouses
      security:
        - bearer_auth: []
      operationId: updateWarehouseSettings
      description: Update a warehouse by ID.
      parameters: []
      responses:
        '200':
          description: warehouse updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  warehouse:
                    title: Warehouse
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        example: Central Distribution Center
                        type: string
                      active:
                        example: true
                        type: boolean
                      external_id:
                        example: WH-12345
                        type:
                          - string
                          - 'null'
                      metadata:
                        example:
                          capacity:
                            total_square_feet: 50000
                          operations:
                            staff_count: 15
                            security_level: high
                        type: object
                      country:
                        example:
                          id: 1
                          iso: US
                        type: object
                      address:
                        example:
                          id: 123
                          name: Main Warehouse
                          address1: 123 Logistics Way
                          address2: Building A
                          address3: null
                          city: Portland
                          state: OR
                          postal_code: '97201'
                        type: object
                    required:
                      - id
                      - name
                      - active
                      - metadata
                      - country
                      - address
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '404':
          description: warehouse not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - error_message
                  - errors
                  - meta
        '422':
          description: invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  not:
                    type: 'null'
                name:
                  type: string
                  minLength: 1
                active:
                  type: boolean
                  not:
                    type: 'null'
                default:
                  type: boolean
                  not:
                    type: 'null'
                country:
                  type: object
                  properties:
                    id:
                      type: integer
                      not:
                        type: 'null'
                    iso:
                      type: string
                      minLength: 1
                  required: []
                address:
                  type: object
                  properties:
                    address1:
                      type: string
                      minLength: 1
                    city:
                      type: string
                      minLength: 1
                    state:
                      type: string
                      minLength: 1
                    postal_code:
                      type: string
                      minLength: 1
                    address2:
                      type: string
                      minLength: 1
                  required: []
              required:
                - id
    delete:
      summary: Delete a warehouse
      tags:
        - Company Settings - Warehouses
      security:
        - bearer_auth: []
      operationId: deleteWarehouseSettings
      description: Delete a warehouse by ID.
      responses:
        '200':
          description: warehouse deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '404':
          description: warehouse not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: cannot delete warehouse
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
  /api/settings/warehouses/{id}/assign_to_country:
    patch:
      summary: Assign warehouse to country
      tags:
        - Company Settings - Warehouses
      security:
        - bearer_auth: []
      operationId: assignWarehouseToCountry
      description: Assign a warehouse to a country.
      parameters: []
      responses:
        '200':
          description: warehouse assigned to country with customs option
          content:
            application/json:
              schema:
                type: object
                properties:
                  warehouse:
                    title: Warehouse
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        example: Central Distribution Center
                        type: string
                      active:
                        example: true
                        type: boolean
                      external_id:
                        example: WH-12345
                        type:
                          - string
                          - 'null'
                      metadata:
                        example:
                          capacity:
                            total_square_feet: 50000
                          operations:
                            staff_count: 15
                            security_level: high
                        type: object
                      country:
                        example:
                          id: 1
                          iso: US
                        type: object
                      address:
                        example:
                          id: 123
                          name: Main Warehouse
                          address1: 123 Logistics Way
                          address2: Building A
                          address3: null
                          city: Portland
                          state: OR
                          postal_code: '97201'
                        type: object
                    required:
                      - id
                      - name
                      - active
                      - metadata
                      - country
                      - address
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '404':
          description: country not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: cannot assign warehouse to country
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  not:
                    type: 'null'
                country_code:
                  type: string
                  minLength: 1
                customs:
                  type: string
                  minLength: 1
              required:
                - id
                - country_code
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
  /api/settings/warehouses/{id}/append_metadata:
    patch:
      summary: Append metadata field
      tags:
        - Company Settings - Warehouses
      security:
        - bearer_auth: []
      operationId: appendMetadataField
      description: Append a metadata field to a warehouse.
      parameters:
        - name: id
          in: path
          required: true
          description: Warehouse's Id
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  warehouse:
                    title: Warehouse
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        example: Central Distribution Center
                        type: string
                      active:
                        example: true
                        type: boolean
                      external_id:
                        example: WH-12345
                        type:
                          - string
                          - 'null'
                      metadata:
                        example:
                          capacity:
                            total_square_feet: 50000
                          operations:
                            staff_count: 15
                            security_level: high
                        type: object
                      country:
                        example:
                          id: 1
                          iso: US
                        type: object
                      address:
                        example:
                          id: 123
                          name: Main Warehouse
                          address1: 123 Logistics Way
                          address2: Building A
                          address3: null
                          city: Portland
                          state: OR
                          postal_code: '97201'
                        type: object
                    required:
                      - id
                      - name
                      - active
                      - metadata
                      - country
                      - address
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - Warehouse not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                metadata:
                  type: object
                  description: >-
                    A JSON object that can store any custom data structure. When
                    provided, merges with existing metadata data.
                  example:
                    capacity:
                      total_square_feet: 50000
                    operations:
                      staff_count: 15
                      security_level: high
              required:
                - metadata
  /api/company/webhook_events:
    get:
      summary: List webhook events
      tags:
        - Company Webhook Events
      security:
        - bearer_auth: []
      parameters:
        - name: page
          in: query
          required: false
          description: Page number
          schema:
            type: integer
        - name: per_page
          in: query
          required: false
          description: Items per page
          schema:
            type: integer
        - name: status
          in: query
          required: false
          description: Filter by response status
          schema:
            type: string
        - name: name
          in: query
          required: false
          description: Filter by event name
          schema:
            type: string
        - name: start_date
          in: query
          required: false
          description: Filter events after this date
          schema:
            type: string
        - name: end_date
          in: query
          required: false
          description: Filter events before this date
          schema:
            type: string
      responses:
        '200':
          description: webhook events found
          content:
            application/json:
              schema:
                type: object
                properties:
                  webhook_events:
                    type: array
                    items:
                      title: WebhookEvent
                      type: object
                      properties:
                        id:
                          type: integer
                        identifier:
                          description: Unique identifier for the webhook event
                          example: cart_1234567890
                          type:
                            - string
                            - 'null'
                        name:
                          description: The name/type of the webhook event
                          example: cart_updated
                          type:
                            - string
                            - 'null'
                        response_status:
                          description: HTTP response status from the webhook call
                          example: '200'
                          type:
                            - string
                            - 'null'
                        eventable_type:
                          description: The type of object that triggered the event
                          example: Cart
                          type: string
                        eventable_id:
                          description: The ID of the object that triggered the event
                          example: 123
                          type: integer
                        company_id:
                          description: The ID of the company that the event belongs to
                          example: 1
                          type:
                            - integer
                            - 'null'
                        payload:
                          description: The payload sent to the webhook
                          example:
                            cart_id: 123
                            total: 99.99
                          type:
                            - object
                            - 'null'
                        response:
                          description: The response received from the webhook
                          example:
                            status: success
                            message: Webhook received
                          type:
                            - object
                            - 'null'
                        created_at:
                          description: The date and time the webhook event was created
                          example: '2021-01-01T00:00:00Z'
                          type: string
                          format: date-time
                        updated_at:
                          description: The date and time the webhook event was last updated
                          example: '2021-01-01T00:00:00Z'
                          type: string
                          format: date-time
                        status:
                          description: Derived status based on response_status
                          example: success
                          type: string
                        eventable_display_name:
                          description: Human-readable name for the eventable object
                          example: 'Cart #123'
                          type:
                            - string
                            - 'null'
                      required:
                        - id
                        - eventable_type
                        - eventable_id
                        - created_at
                        - updated_at
                        - status
                  meta:
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                          next_page:
                            type:
                              - integer
                              - 'null'
                          prev_page:
                            type:
                              - integer
                              - 'null'
                          total_pages:
                            type: integer
                          total_count:
                            type: integer
                          per_page:
                            type: integer
                      request_id:
                        type: string
                      timestamp:
                        type: string
  /api/company/webhook_events/{id}:
    get:
      summary: Show webhook event
      tags:
        - Company Webhook Events
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Webhook event ID
          schema:
            type: string
      responses:
        '200':
          description: webhook event found
          content:
            application/json:
              schema:
                type: object
                properties:
                  webhook_event:
                    title: WebhookEvent
                    type: object
                    properties:
                      id:
                        type: integer
                      identifier:
                        description: Unique identifier for the webhook event
                        example: cart_1234567890
                        type:
                          - string
                          - 'null'
                      name:
                        description: The name/type of the webhook event
                        example: cart_updated
                        type:
                          - string
                          - 'null'
                      response_status:
                        description: HTTP response status from the webhook call
                        example: '200'
                        type:
                          - string
                          - 'null'
                      eventable_type:
                        description: The type of object that triggered the event
                        example: Cart
                        type: string
                      eventable_id:
                        description: The ID of the object that triggered the event
                        example: 123
                        type: integer
                      company_id:
                        description: The ID of the company that the event belongs to
                        example: 1
                        type:
                          - integer
                          - 'null'
                      payload:
                        description: The payload sent to the webhook
                        example:
                          cart_id: 123
                          total: 99.99
                        type:
                          - object
                          - 'null'
                      response:
                        description: The response received from the webhook
                        example:
                          status: success
                          message: Webhook received
                        type:
                          - object
                          - 'null'
                      created_at:
                        description: The date and time the webhook event was created
                        example: '2021-01-01T00:00:00Z'
                        type: string
                        format: date-time
                      updated_at:
                        description: The date and time the webhook event was last updated
                        example: '2021-01-01T00:00:00Z'
                        type: string
                        format: date-time
                      status:
                        description: Derived status based on response_status
                        example: success
                        type: string
                      eventable_display_name:
                        description: Human-readable name for the eventable object
                        example: 'Cart #123'
                        type:
                          - string
                          - 'null'
                    required:
                      - id
                      - eventable_type
                      - eventable_id
                      - created_at
                      - updated_at
                      - status
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
        '404':
          description: webhook event not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
  /api/company/webhook_events/{id}/retrigger:
    post:
      summary: Retrigger webhook event
      tags:
        - Company Webhook Events
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Webhook event ID
          schema:
            type: string
      responses:
        '200':
          description: webhook retriggered successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
        '404':
          description: webhook event not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
        '422':
          description: webhook configuration not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    properties:
                      webhook:
                        type: array
                        items:
                          type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
  /api/company/contacts:
    get:
      summary: Get contacts with optional filters
      tags:
        - Contacts
      operationId: indexCompanyContact
      security:
        - bearer_auth: []
      parameters:
        - name: search_query
          in: query
          required: false
          description: >-
            Filter contacts with search query that matches with their first
            name, last name, email, or phone
          schema:
            type: string
        - name: sorted_by
          in: query
          required: false
          example: id_asc
          description: >
            Sort the records by one of the supported attributes:

              - created_at
              - first_name
              - user_name
              - activities

            The sort attribute should be followed by one of the order
            directives: '_asc', '_desc'
          schema:
            type: string
        - name: page
          in: query
          schema:
            type: integer
            default: 1
          required: false
          description: Page number for pagination
        - name: per_page
          in: query
          schema:
            type: integer
            default: 10
          required: false
          description: Number of records per page
        - name: by_metadata
          in: query
          schema:
            type: string
            default: '{}'
            format: json
          required: false
          description: Search JSON meta data
        - name: has_affiliate
          in: query
          schema:
            type: string
            default: assigned
            format: json
          required: false
          description: Filter contacts with or without associated affiliates
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  contacts:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: '13423'
                        token:
                          type:
                            - string
                            - 'null'
                          example: aF1VXFfkjMi9bhCXaE8u5a3B
                        first_name:
                          type:
                            - string
                            - 'null'
                          example: John
                        last_name:
                          type:
                            - string
                            - 'null'
                          example: Nash
                        full_name:
                          type:
                            - string
                            - 'null'
                          example: ''
                        avatar_url:
                          type:
                            - string
                            - 'null'
                          example: https://example.com/images/product.png
                        status:
                          type:
                            - string
                            - 'null'
                          example: new
                        email:
                          type:
                            - string
                            - 'null'
                          example: email@example.com
                        email2:
                          type:
                            - string
                            - 'null'
                          example: email@example.com
                        phone:
                          type: string
                          example: +1-1234567890
                        phone2:
                          type:
                            - string
                            - 'null'
                          example: +1-1234567890
                        phone_id:
                          type:
                            - string
                            - 'null'
                          example: ''
                        address:
                          type:
                            - string
                            - 'null'
                          example: 123 Main St
                        address2:
                          type:
                            - string
                            - 'null'
                          example: Apt 4B
                        city:
                          type:
                            - string
                            - 'null'
                          example: New York
                        state:
                          type:
                            - string
                            - 'null'
                          example: NY
                        postal_code:
                          type:
                            - string
                            - 'null'
                          example: '10001'
                        language_id:
                          type:
                            - integer
                            - 'null'
                          example: 234
                        country_id:
                          type:
                            - integer
                            - 'null'
                          example: 96
                        lead_type:
                          type:
                            - string
                            - 'null'
                          example: Web Chat
                        ip:
                          type:
                            - string
                            - 'null'
                          example: 1.1.1.1
                        requested_at:
                          type:
                            - string
                            - 'null'
                          format: date_time
                          example: '2025-01-16T04:22:43.809Z'
                        best_time:
                          type:
                            - string
                            - 'null'
                          example: Afternoon
                        time_zone:
                          type:
                            - string
                            - 'null'
                          example: America/New_York
                        reason:
                          type:
                            - string
                            - 'null'
                          example: I enjoy working from home
                        income:
                          type:
                            - string
                            - 'null'
                          example: $2500-5000 per Month
                        hours:
                          type:
                            - string
                            - 'null'
                          example: 11-15 hours per week
                        invest:
                          type:
                            - string
                            - 'null'
                          example: $750 - $1000
                        interest:
                          type:
                            - string
                            - 'null'
                          example: Ready to get started!
                        discarded_at:
                          type:
                            - string
                            - 'null'
                          format: date_time
                          example: '2025-01-16T04:22:43.809Z'
                        metadata:
                          type: object
                          description: >-
                            A JSON object that can store any custom data
                            structure.
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                      total_count:
                        type: integer
                        example: 42
                      total_pages:
                        type: integer
                        example: 3
                      current_page:
                        type: integer
                        example: 1
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Invalid parameters
                  errors:
                    type: object
                    example:
                      by_metadata:
                        - >-
                          The value `{referred_by: {user: 'John},}` in parameter
                          `by_metadata` is not a valid JSON
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
    post:
      summary: Create a contact
      tags:
        - Contacts
      operationId: createCompanyContact
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: created
        '422':
          description: unprocessable entity
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                contact:
                  type: object
                  properties:
                    first_name:
                      type: string
                      minLength: 1
                    last_name:
                      type: string
                      minLength: 1
                    language_code:
                      type: string
                      minLength: 1
                    country_code:
                      type: string
                      minLength: 1
                    status:
                      type: string
                      minLength: 1
                    email:
                      type: string
                      minLength: 1
                    phone:
                      type:
                        - 'null'
                        - string
                    address:
                      type: string
                      minLength: 1
                    city:
                      type: string
                      minLength: 1
                    state:
                      type: string
                      minLength: 1
                    postal_code:
                      type: string
                      minLength: 1
                    affiliate:
                      type: object
                      not:
                        type: 'null'
                    metadata:
                      type: object
                  required:
                    - first_name
                    - last_name
              required:
                - contact
  /api/company/contacts/{id}:
    get:
      summary: Retrieves a Contact
      tags:
        - Contacts
      operationId: getContact
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: object
            properties:
              id:
                type: integer
                not:
                  type: 'null'
            required:
              - id
      responses:
        '200':
          description: successful
        '404':
          description: not found
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  not:
                    type: 'null'
              required:
                - id
    put:
      summary: Updates a contact
      tags:
        - Contacts
      operationId: updateContact
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: object
            properties:
              id:
                type: integer
                not:
                  type: 'null'
              contact:
                type: object
                properties:
                  first_name:
                    type: string
                    minLength: 1
                  last_name:
                    type: string
                    minLength: 1
                  language_code:
                    type: string
                    minLength: 1
                  country_code:
                    type: string
                    minLength: 1
                  status:
                    type: string
                    minLength: 1
                  email:
                    type: string
                    minLength: 1
                  phone:
                    type:
                      - 'null'
                      - string
                  address:
                    type: string
                    minLength: 1
                  city:
                    type: string
                    minLength: 1
                  state:
                    type: string
                    minLength: 1
                  postal_code:
                    type: string
                    minLength: 1
                  affiliate:
                    type: object
                    not:
                      type: 'null'
                  metadata:
                    type: object
                required: []
            required:
              - id
              - contact
      responses:
        '200':
          description: successful
        '404':
          description: not found
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  not:
                    type: 'null'
                contact:
                  type: object
                  properties:
                    first_name:
                      type: string
                      minLength: 1
                    last_name:
                      type: string
                      minLength: 1
                    language_code:
                      type: string
                      minLength: 1
                    country_code:
                      type: string
                      minLength: 1
                    status:
                      type: string
                      minLength: 1
                    email:
                      type: string
                      minLength: 1
                    phone:
                      type:
                        - 'null'
                        - string
                    address:
                      type: string
                      minLength: 1
                    city:
                      type: string
                      minLength: 1
                    state:
                      type: string
                      minLength: 1
                    postal_code:
                      type: string
                      minLength: 1
                    affiliate:
                      type: object
                      not:
                        type: 'null'
                    metadata:
                      type: object
                  required: []
              required:
                - id
                - contact
    delete:
      summary: Deletes a contact
      tags:
        - Contacts
      operationId: deleteCompanyContact
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: object
            properties:
              id:
                type: integer
                not:
                  type: 'null'
            required:
              - id
      responses:
        '200':
          description: successful
        '404':
          description: not found
  /api/company/contacts/find_by_email:
    get:
      summary: Get Company User Details by email
      tags:
        - Contacts
      operationId: findContactByEmail
      security:
        - bearer_auth: []
      parameters:
        - name: email
          in: query
          required: true
          schema:
            type: string
            format: email
      responses:
        '200':
          description: successful
        '404':
          description: not found
  /api/company/contacts/{id}/append_metadata:
    patch:
      summary: Append metadata field
      tags:
        - Contacts
      operationId: contactAppendMetadataField
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Contact's Id
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  contact:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: '13423'
                      token:
                        type:
                          - string
                          - 'null'
                        example: aF1VXFfkjMi9bhCXaE8u5a3B
                      first_name:
                        type:
                          - string
                          - 'null'
                        example: John
                      last_name:
                        type:
                          - string
                          - 'null'
                        example: Nash
                      full_name:
                        type:
                          - string
                          - 'null'
                        example: ''
                      avatar_url:
                        type:
                          - string
                          - 'null'
                        example: https://example.com/images/product.png
                      status:
                        type:
                          - string
                          - 'null'
                        example: new
                      email:
                        type:
                          - string
                          - 'null'
                        example: email@example.com
                      email2:
                        type:
                          - string
                          - 'null'
                        example: email@example.com
                      phone:
                        type: string
                        example: +1-1234567890
                      phone2:
                        type:
                          - string
                          - 'null'
                        example: +1-1234567890
                      phone_id:
                        type:
                          - string
                          - 'null'
                        example: ''
                      address:
                        type:
                          - string
                          - 'null'
                        example: 123 Main St
                      address2:
                        type:
                          - string
                          - 'null'
                        example: Apt 4B
                      city:
                        type:
                          - string
                          - 'null'
                        example: New York
                      state:
                        type:
                          - string
                          - 'null'
                        example: NY
                      postal_code:
                        type:
                          - string
                          - 'null'
                        example: '10001'
                      language_id:
                        type:
                          - integer
                          - 'null'
                        example: 234
                      country_id:
                        type:
                          - integer
                          - 'null'
                        example: 96
                      lead_type:
                        type:
                          - string
                          - 'null'
                        example: Web Chat
                      ip:
                        type:
                          - string
                          - 'null'
                        example: 1.1.1.1
                      requested_at:
                        type:
                          - string
                          - 'null'
                        format: date_time
                        example: '2025-01-16T04:22:43.809Z'
                      best_time:
                        type:
                          - string
                          - 'null'
                        example: Afternoon
                      time_zone:
                        type:
                          - string
                          - 'null'
                        example: America/New_York
                      reason:
                        type:
                          - string
                          - 'null'
                        example: I enjoy working from home
                      income:
                        type:
                          - string
                          - 'null'
                        example: $2500-5000 per Month
                      hours:
                        type:
                          - string
                          - 'null'
                        example: 11-15 hours per week
                      invest:
                        type:
                          - string
                          - 'null'
                        example: $750 - $1000
                      interest:
                        type:
                          - string
                          - 'null'
                        example: Ready to get started!
                      discarded_at:
                        type:
                          - string
                          - 'null'
                        format: date_time
                        example: '2025-01-16T04:22:43.809Z'
                      metadata:
                        type: object
                        description: >-
                          A JSON object that can store any custom data
                          structure.
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - Contact not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                metadata:
                  type: object
                  description: >-
                    A JSON object that can store any custom data structure. When
                    provided, merges with existing metadata data.
              required:
                - metadata
  /api/currencies:
    get:
      summary: List supported currencies
      tags:
        - Currencies
      description: List all supported currencies in the system
      operationId: listCurrencies
      security:
        - bearer_auth: []
      responses:
        '200':
          description: Currencies retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  currencies:
                    type: array
                    items:
                      title: Currency
                      type: object
                      properties:
                        name:
                          example: United States Dollar
                          type:
                            - string
                            - 'null'
                        code:
                          example: USD
                          type: string
                        symbol:
                          example: $
                          type:
                            - string
                            - 'null'
                      required:
                        - code
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - currencies
                  - meta
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
  /api/customer_orders:
    get:
      summary: List of customer orders
      tags:
        - Customer Orders
      description: >-
        List Customers Orders for a Rep, including orders with no buyer, given
        the Rep token as Authorization header.
      operationId: indexCustomerOrders
      security:
        - bearer_auth: []
      parameters:
        - name: pagination
          in: query
          schema:
            type: object
            properties:
              page:
                type: integer
                exclusiveMinimum: 0
              per_page:
                type: integer
                exclusiveMinimum: 0
                maximum: 100
            required: []
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  orders:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        billing_address:
                          type:
                            - object
                            - 'null'
                          example:
                            id: 1
                            address1: 123 Main St
                            address2: Apt 4B
                            city: New York
                            state: NY
                            postal_code: '10011'
                            subdivision_code: NW
                            country_code: US
                        notes:
                          type:
                            - array
                            - 'null'
                          example:
                            id: 1
                            note: This is a note
                            created_at: '2025-01-27T07:55:57Z'
                        created_at:
                          type: string
                          format: date_time
                          example: '2025-01-27T07:55:57Z'
                        currency_code:
                          type: string
                          example: USD
                        currency_symbol:
                          type: string
                          example: $
                        customer:
                          type:
                            - object
                            - 'null'
                          example:
                            id: 1
                            first_name: John
                            last_name: Doe
                            email: john.doe@example.com
                        rep:
                          type:
                            - object
                            - 'null'
                          example:
                            email:
                              type: string
                              example: john.doe@example.com
                            name:
                              type: string
                              example: John Doe
                            id:
                              type: integer
                              example: 1
                            image_url:
                              type: string
                              example: https://example.com/image.png
                            external_id:
                              type: string
                              example: '1234567890'
                        discount:
                          type: string
                          example: '0.0'
                        discount_in_currency:
                          type: string
                          example: $0.00 (USD)
                        dynamic_charges:
                          type: object
                          example: {}
                        dynamic_charges_in_currency:
                          type: object
                          example: {}
                        fulfillment_status:
                          type: string
                          example: Unfulfilled
                        cv:
                          type: integer
                          example: 100
                        qv:
                          type: integer
                          example: 100
                        items:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              hs_code:
                                type:
                                  - string
                                  - 'null'
                                example: '20091823'
                              price:
                                type:
                                  - number
                                  - string
                                example: 84.82
                              price_in_currency:
                                type: string
                                example: $84.82 (USD)
                              quantity:
                                type: integer
                                example: 2
                              sku:
                                type:
                                  - string
                                  - 'null'
                                example: 82738KH
                              tax:
                                type: string
                                example: '10.0'
                              cv:
                                type: integer
                                example: 100
                              qv:
                                type: integer
                                example: 100
                              tax_in_currency:
                                type: string
                                example: $10.00 (USD)
                              thumbnail:
                                type: string
                                example: >-
                                  https://cdn.filestackcontent.com/tJIUAm0Tlirjoz0B49mL
                              title:
                                type: string
                                example: Dr. Randolph Hills
                              total:
                                type:
                                  - number
                                  - string
                                example: 169.64
                              total_in_currency:
                                type: string
                                example: $169.64 (USD)
                              image_url:
                                type:
                                  - string
                                  - 'null'
                                example: https://example.com/test_image.jpg
                              display_price:
                                type: string
                                example: $10.00 USD
                              display_total:
                                type: string
                                example: $20.00 USD
                              ordered_variant:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    option_type:
                                      type: string
                                      example: size
                                    value:
                                      type: string
                                      example: medium
                              variant:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 1
                                  image_path:
                                    type:
                                      - string
                                      - 'null'
                                    example: >-
                                      https://cdn.filestackcontent.com/tJIUAm0Tlirjoz0B49mL
                                  image_url:
                                    type:
                                      - string
                                      - 'null'
                                    example: >-
                                      https://cdn.filestackcontent.com/tJIUAm0Tlirjoz0B49mL
                                  price:
                                    type:
                                      - number
                                      - string
                                      - 'null'
                                    example: 84.82
                                  price_in_currency:
                                    type: string
                                    example: $84.82 (USD)
                                  primary_image:
                                    type:
                                      - string
                                      - 'null'
                                    example: >-
                                      https://cdn.filestackcontent.com/tJIUAm0Tlirjoz0B49mL
                                  sku:
                                    type:
                                      - string
                                      - 'null'
                                    example: 82738KH
                                  title:
                                    type:
                                      - string
                                      - 'null'
                                    example: Dr. Randolph Hills
                                  options:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        title:
                                          type: string
                                          example: Size
                                        value:
                                          type: string
                                          example: XL
                        items_count:
                          type: integer
                          example: 1
                        note:
                          type:
                            - string
                            - 'null'
                          example: This is a note
                        order_number:
                          type: string
                          example: F2632818884
                        payment_method:
                          type:
                            - object
                            - 'null'
                          example: {}
                        payment_status:
                          type: string
                          example: Unpaid
                        refunds:
                          type: array
                          items:
                            type: object
                        shipping:
                          type: object
                          properties:
                            amount:
                              type: string
                              example: '0.0'
                            surcharge:
                              type: string
                              example: '0.0'
                            amount_in_currency:
                              type: string
                              example: $0.00 (USD)
                            surcharge_in_currency:
                              type: string
                              example: $0.00 (USD)
                        shipping_address:
                          type:
                            - object
                            - 'null'
                          example:
                            id: 1
                            address1: 123 Main St
                            address2: Apt 4B
                            city: New York
                            state: NY
                            postal_code: '10001'
                            subdivision_code: NW
                            country_code: US
                        sub_total:
                          type: string
                          example: '0.0'
                        sub_total_in_currency:
                          type: string
                          example: $0.00 (USD)
                        subtotal:
                          type: string
                          example: '0.0'
                        tax:
                          type: string
                          example: '0.0'
                        tax_in_currency:
                          type: string
                          example: $0.00 (USD)
                        total:
                          type: string
                          example: '0.0'
                        total_in_currency:
                          type: string
                          example: $0.00 (USD)
                        transaction_fee:
                          type:
                            - number
                            - string
                          example: 0
                        transaction_fee_in_currency:
                          type: string
                          example: $0.00 (USD)
                        enrollment_fee:
                          type:
                            - number
                            - string
                          example: 0
                        enrollment_fee_in_currency:
                          type: string
                          example: $0.00 (USD)
                        status:
                          type: string
                          example: awaiting_payment
                        metadata:
                          type: object
                          description: >-
                            A JSON object that can store any custom data
                            structure.
                        activities:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              company_id:
                                type: integer
                                example: 980190963
                              contact_id:
                                type:
                                  - integer
                                  - 'null'
                                example: 1019882
                              created_at:
                                type: string
                                format: date_time
                                example: '2025-01-27T07:55:57Z'
                              description:
                                type: string
                                example: hizo un pedido en Kuhlman Group 1
                              formatted_description:
                                type:
                                  - string
                                  - 'null'
                                example: hizo un pedido en Kuhlman Group 1
                              read_at:
                                type:
                                  - string
                                  - 'null'
                                format: date_time
                                example: '2025-01-27T07:55:57Z'
                              relation_id:
                                type: integer
                                example: 1
                              relation_type:
                                type: string
                                example: Order
                              slug:
                                type: string
                                example: order_placed
                              title:
                                type: string
                                example: Se ha realizado un nuevo pedido.
                              user_id:
                                type: integer
                                example: 1
                        company:
                          type: object
                          properties:
                            id:
                              type: integer
                            name:
                              type: string
                            primary_domain_hostname:
                              type:
                                - string
                                - 'null'
                              example: fluid.com
                            subdomain:
                              type:
                                - string
                                - 'null'
                              example: myco
                            logo_url:
                              type:
                                - string
                                - 'null'
                              example: https://example.com/logo.png
                            fluid_shop:
                              type:
                                - string
                                - 'null'
                              example: https://fluid-sample-shop.fluid.com
                            collect_phone:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            require_phone:
                              type:
                                - boolean
                                - 'null'
                              example: false
                            require_billing_zip:
                              type:
                                - boolean
                                - 'null'
                              example: false
                            checkout_primary_button_color:
                              type:
                                - string
                                - 'null'
                              example: '#000000'
                            checkout_primary_text_color:
                              type:
                                - string
                                - 'null'
                              example: '#FFFFFF'
                            checkout_secondary_button_color:
                              type:
                                - string
                                - 'null'
                              example: '#FFFFFF'
                            checkout_secondary_text_color:
                              type:
                                - string
                                - 'null'
                              example: '#000000'
                        external_id:
                          type:
                            - string
                            - 'null'
                          example: '1234567890'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 6260edc6-61e9-4cd7-950e-f72174cd1904
                      timestamp:
                        type: string
                        format: date_time
                        example: '2025-01-27T07:55:58Z'
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            example: 1
                          total_pages:
                            type: integer
                            example: 1
                          total_count:
                            type: integer
                            example: 1
                          per_page:
                            type: integer
                            example: 50
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unauthorized
                  errors:
                    type: object
                    example:
                      customer:
                        - Not authorized.
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
  /api/customer_notes:
    get:
      summary: List customer notes
      tags:
        - CustomerNotes
      security:
        - bearer_auth: []
      operationId: listCustomerNotes
      parameters:
        - name: customer_id
          in: query
          required: true
          description: Id of customer associated with the customer notes
          schema:
            type: integer
        - name: resource_type
          in: query
          required: false
          description: >-
            Type of Resource the customer note is attached to, for example
            `Product`, `Order`, etc. `SubscriptionOrder`
          schema:
            type: string
        - name: resource_id
          in: query
          required: false
          description: >-
            Id of Resource specified in the `resource_type` field. This can
            however be empty, even when the `resource_type` is specified.
          schema:
            type: integer
        - name: page
          in: query
          schema:
            type: integer
            default: 1
          required: false
          description: Page number for pagination
        - name: per_page
          in: query
          schema:
            type: integer
            default: 10
          required: false
          description: Number of records per page
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      customer_notes:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              description: Id of the customer note
                            user_company_id:
                              type:
                                - integer
                                - 'null'
                              description: Id of UserCompany who created the customer note
                            username:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Username of the User who created the customer
                                note
                            customer_id:
                              type: integer
                              description: Id of Customer associated with the customer note
                            note:
                              type: string
                              description: Note of the customer note
                            resource_type:
                              type:
                                - string
                                - 'null'
                              description: Type of Resource attached with the customer note
                            resource_id:
                              type:
                                - integer
                                - 'null'
                              description: >-
                                Id of Resource specified in the `resource_type`
                                field
                            created_at:
                              type: string
                              description: Time the customer note was created
        '404':
          description: customer not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: fail
                  data:
                    type: object
                    properties:
                      error:
                        type: string
                        example: Couldn't find Customer
    post:
      summary: Create a customer note
      tags:
        - CustomerNotes
      security:
        - bearer_auth: []
      operationId: createCustomerNote
      parameters: []
      responses:
        '201':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      customer_note:
                        type: object
                        properties:
                          id:
                            type: integer
                            description: Id of the customer note
                          user_company_id:
                            type:
                              - integer
                              - 'null'
                            description: Id of UserCompany who created the customer note
                          username:
                            type:
                              - string
                              - 'null'
                            description: Username of the User who created the customer note
                          customer_id:
                            type: integer
                            description: Id of Customer associated with the customer note
                          note:
                            type: string
                            description: Note of the customer note
                          resource_type:
                            type:
                              - string
                              - 'null'
                            description: Type of Resource attached with the customer note
                          resource_id:
                            type:
                              - integer
                              - 'null'
                            description: >-
                              Id of Resource specified in the `resource_type`
                              field
                          created_at:
                            type: string
                            description: Time the customer note was created
        '404':
          description: customer not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: fail
                  data:
                    type: object
                    properties:
                      error:
                        type: string
                        example: Couldn't find Customer
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: fail
                  data:
                    type: object
                    properties:
                      customer_note:
                        type: object
                        example:
                          note:
                            - can't be blank
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                user_company_id:
                  type: integer
                  description: UserCompany Id of the creator of the customer note.
                  example: 12
                customer_id:
                  type: integer
                  description: Customer Id for the customer note.
                  example: 1337
                note:
                  type: string
                  description: Note for the customer note.
                  example: >-
                    The customer has requested the delivery to happen before
                    Christmas
                resource_type:
                  type: string
                  example: SubscriptionOrder
                  description: Type of Resource to associate with the customer note.
                resource_id:
                  type: integer
                  example: 2345
                  description: Id of Resource to associate with the customer note.
              required:
                - customer_id
                - note
  /api/customers:
    get:
      summary: List customers
      description: Get all orders with optional filters
      tags:
        - Customers
      operationId: listCustomers
      security:
        - bearer_auth: []
      parameters:
        - name: search_query
          in: query
          required: false
          description: >-
            Filter customers with search query that matches with their email,
            first name or last name
          schema:
            type: string
        - name: sorted_by
          in: query
          required: false
          example: id_asc
          description: >
            Sort the records by one of the supported attributes:

              - id
              - email
              - created_at
              - updated_at
              - country
              - full_name
              - active_subscriptions_count
              - inactive_subscriptions_count
              - orders_count
              - last_ordered_at

            The sort attribute should be followed by one of the order
            directives: '_asc', '_desc'
          schema:
            type: string
        - name: has_subscription
          in: query
          schema:
            type: boolean
            default: false
          required: false
          description: Filter customers who have subscription
        - name: has_recent_orders
          in: query
          schema:
            type: boolean
            default: false
          required: false
          description: Filter customers who have recent orders made within last 30 days
        - name: has_failed_orders
          in: query
          schema:
            type: boolean
            default: false
          required: false
          description: Filter customers who have failed orders
        - name: purchased_more_than_once
          in: query
          schema:
            type: boolean
            default: false
          required: false
          description: Filter customers who have purchased more than once
        - name: us_customers
          in: query
          schema:
            type: boolean
            default: false
          required: false
          description: Filter customers from US
        - name: non_us_customers
          in: query
          schema:
            type: boolean
            default: false
          required: false
          description: Filter customers outside from US
        - name: abandoned_in_the_last_30_days
          in: query
          schema:
            type: boolean
            default: false
          required: false
          description: Filter customers who have abandoned cart within last 30 days
        - name: reps
          in: query
          schema:
            type: boolean
            default: false
          required: false
          description: Filter customers who are also Reps
        - name: order_status
          in: query
          required: false
          description: Filter customers by their order status
          schema:
            type: string
            enum:
              - fulfilled
              - unfulfilled
        - name: ordered_since
          in: query
          required: false
          description: >-
            Filter customers who have ordered since the specified date. Can be
            used for e.g. last 30 days, 90 days, etc.
          example: '2024-10-27'
          schema:
            type: string
        - name: location
          in: query
          required: false
          description: >-
            Filter customers based upon their default address country iso. `US`,
            `CA`, `UK`, etc.
          example: CA
          schema:
            type: string
        - name: subscription_status
          in: query
          required: false
          description: >-
            Filter customers by their subscription orders status. `active` or
            `inactive`
          schema:
            type: string
            enum:
              - active
              - inactive
        - name: created_between
          in: query
          required: false
          description: >-
            Filter customers by creation date range. Format:
            MM/DD/YYYY-MM/DD/YYYY. Example: 01/01/2024-12/31/2024
          example: 01/01/2024-12/31/2024
          schema:
            type: string
        - name: with_total_orders_between
          in: query
          required: false
          description: >-
            Filter customers by total number of orders range. Format: min-max.
            Example: 2-5
          example: 2-5
          schema:
            type: string
        - name: with_total_spent_between
          in: query
          required: false
          description: >-
            Filter customers by total amount spent range. Format: min-max.
            Example: 200-500
          example: 200-500
          schema:
            type: string
        - name: active_subscription_amount_between
          in: query
          required: false
          description: >-
            Filter customers by total amount of active subscription orders (e.g.
            '100-500' or '100-' or '-500')
          example: 100-500
          schema:
            type: string
        - name: inactive_subscription_amount_between
          in: query
          required: false
          description: >-
            Filter customers by total amount of inactive subscription orders
            (e.g. '100-500' or '100-' or '-500')
          example: 100-500
          schema:
            type: string
        - name: for_rep
          in: query
          required: false
          description: Filter customers by their rep id (user_company_id)
          schema:
            type: integer
        - name: page
          in: query
          schema:
            type: integer
            default: 1
          required: false
          description: Page number for pagination
        - name: per_page
          in: query
          schema:
            type: integer
            default: 10
          required: false
          description: Number of records per page
        - name: by_metadata
          in: query
          schema:
            type: string
            default: '{}'
            format: json
          required: false
          description: Search JSON meta data
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  customers:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        account_id:
                          type: string
                        first_name:
                          type: string
                        last_name:
                          type: string
                        full_name:
                          type: string
                        email:
                          type: string
                        verified_email:
                          type: boolean
                        phone:
                          type: string
                        orders_count:
                          type: integer
                        total_spent:
                          type:
                            - number
                            - string
                        display_total_spent:
                          type: string
                        last_order_id:
                          type:
                            - integer
                            - 'null'
                        notes:
                          type:
                            - string
                            - 'null'
                        user_company_id:
                          type:
                            - integer
                            - 'null'
                        created_at:
                          type: string
                        active:
                          type: boolean
                        active_subscriptions_count:
                          type: integer
                        inactive_subscriptions_count:
                          type: integer
                        is_rep:
                          type: boolean
                        external_id:
                          type:
                            - string
                            - 'null'
                        metadata:
                          type: object
                          description: >-
                            A JSON object that can store any custom data
                            structure.
                        default_address:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type:
                                - string
                                - 'null'
                              example: John Doe
                            first_name:
                              type:
                                - string
                                - 'null'
                              example: John
                            last_name:
                              type:
                                - string
                                - 'null'
                              example: Doe
                            address1:
                              type: string
                              example: 123 Main St
                            address2:
                              type:
                                - string
                                - 'null'
                              example: Apt 4B
                            address3:
                              type:
                                - string
                                - 'null'
                              example: Building 5
                            city:
                              type: string
                              example: New York
                            state:
                              type: string
                              example: NY
                            postal_code:
                              type: string
                              example: '10001'
                            country_code:
                              type: string
                              example: US
                            subdivision_code:
                              type:
                                - string
                                - 'null'
                              example: NY
                            default:
                              type: boolean
                              example: true
                        addresses:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                        customer_notes:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                              customer_id:
                                type: integer
                              user_company_id:
                                type:
                                  - integer
                                  - 'null'
                              note:
                                type: string
                              resource_type:
                                type:
                                  - string
                                  - 'null'
                              resource_id:
                                type:
                                  - integer
                                  - 'null'
                              created_at:
                                type: string
                        jwt:
                          type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                      total_count:
                        type: integer
                        example: 42
                      total_pages:
                        type: integer
                        example: 3
                      current_page:
                        type: integer
                        example: 1
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Invalid parameters
                  errors:
                    type: object
                    example:
                      by_metadata:
                        - >-
                          The value `{referred_by: {user: 'John},}` in parameter
                          `by_metadata` is not a valid JSON
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
    post:
      summary: Create a customer
      tags:
        - Customers
      operationId: createCustomer
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  customer:
                    type: object
                    properties:
                      id:
                        type: integer
                      account_id:
                        type: string
                      first_name:
                        type: string
                      last_name:
                        type: string
                      full_name:
                        type: string
                      email:
                        type: string
                      verified_email:
                        type: boolean
                      phone:
                        type: string
                      orders_count:
                        type: integer
                      total_spent:
                        type:
                          - number
                          - string
                      display_total_spent:
                        type: string
                      last_order_id:
                        type:
                          - integer
                          - 'null'
                      notes:
                        type:
                          - string
                          - 'null'
                      user_company_id:
                        type:
                          - integer
                          - 'null'
                      created_at:
                        type: string
                      active:
                        type: boolean
                      active_subscriptions_count:
                        type: integer
                      inactive_subscriptions_count:
                        type: integer
                      is_rep:
                        type: boolean
                      external_id:
                        type:
                          - string
                          - 'null'
                      metadata:
                        type: object
                        description: >-
                          A JSON object that can store any custom data
                          structure.
                      default_address:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      addresses:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type:
                                - string
                                - 'null'
                              example: John Doe
                            first_name:
                              type:
                                - string
                                - 'null'
                              example: John
                            last_name:
                              type:
                                - string
                                - 'null'
                              example: Doe
                            address1:
                              type: string
                              example: 123 Main St
                            address2:
                              type:
                                - string
                                - 'null'
                              example: Apt 4B
                            address3:
                              type:
                                - string
                                - 'null'
                              example: Building 5
                            city:
                              type: string
                              example: New York
                            state:
                              type: string
                              example: NY
                            postal_code:
                              type: string
                              example: '10001'
                            country_code:
                              type: string
                              example: US
                            subdivision_code:
                              type:
                                - string
                                - 'null'
                              example: NY
                            default:
                              type: boolean
                              example: true
                      customer_notes:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            customer_id:
                              type: integer
                            user_company_id:
                              type:
                                - integer
                                - 'null'
                            note:
                              type: string
                            resource_type:
                              type:
                                - string
                                - 'null'
                            resource_id:
                              type:
                                - integer
                                - 'null'
                            created_at:
                              type: string
                      jwt:
                        type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Invalid parameters
                  errors:
                    type: object
                    properties:
                      customer:
                        type: object
                        properties:
                          email:
                            type: array
                            items:
                              type: string
                            example:
                              - must be filled
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                first_name:
                  type: string
                  example: John
                  description: First name of customer
                last_name:
                  type: string
                  example: Nash
                  description: Last name of customer
                email:
                  type: string
                  example: john.nash@example.com
                  description: Email of customer
                phone:
                  type: string
                  example: 801-000-0000
                  description: Phone number of customer
                account_id:
                  type: string
                  example: VKHJSGHOHSOIZQCK
                  description: >-
                    A unique Account Id for customer. If empty, one is generated
                    by the system
                external_id:
                  type: string
                  example: '1234567890'
                  description: >-
                    A unique External Id for customer that is used to identify
                    them in external systems
                notes:
                  type: string
                  example: Note
                  description: Note for customer
                metadata:
                  type: object
                  description: Can hold JSON object of arbitrary structure
                default_address_attributes:
                  type: object
                  properties:
                    address1:
                      type: string
                      example: 234 Northern Drive
                    address2:
                      type: string
                      example: Apt 5
                    city:
                      type: string
                      example: Provo
                    state:
                      type: string
                      example: UT
                    postal_code:
                      type: string
                      example: '84604'
                    country_id:
                      type: integer
                      example: 1
                    country_code:
                      type: string
                      example: US
                    name:
                      type: string
                    default:
                      type: boolean
                      example: false
                      description: >-
                        Sets the address as the default address for the
                        customer; false by default
                  required:
                    - country_id
                    - city
                    - address1
                    - postal_code
                customer_notes_attributes:
                  type: array
                  items:
                    type: object
                    properties:
                      note:
                        type: string
                        description: Customer Note to be attached to the customer
                        example: Example customer note
                    required:
                      - note
              required:
                - email
  /api/customers/stats:
    get:
      summary: Get customers' stats
      tags:
        - Customers
      operationId: statsOfCustomers
      security:
        - bearer_auth: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_customers:
                    type: integer
                  total_active_subscriptions:
                    type: integer
                  cart_abandonment_rate:
                    type:
                      - number
                      - string
                  repeat_customers_count:
                    type: integer
                  repeat_customers_rate:
                    type:
                      - number
                      - string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
  /api/customers/{id}/update_addresses:
    patch:
      summary: Add customer addresses
      tags:
        - Customers
      operationId: updateCustomerAddresses
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Customer's Id
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  customer:
                    type: object
                    properties:
                      id:
                        type: integer
                      account_id:
                        type: string
                      first_name:
                        type: string
                      last_name:
                        type: string
                      full_name:
                        type: string
                      email:
                        type: string
                      verified_email:
                        type: boolean
                      phone:
                        type: string
                      orders_count:
                        type: integer
                      total_spent:
                        type:
                          - number
                          - string
                      display_total_spent:
                        type: string
                      last_order_id:
                        type:
                          - integer
                          - 'null'
                      notes:
                        type:
                          - string
                          - 'null'
                      user_company_id:
                        type:
                          - integer
                          - 'null'
                      created_at:
                        type: string
                      active:
                        type: boolean
                      active_subscriptions_count:
                        type: integer
                      inactive_subscriptions_count:
                        type: integer
                      is_rep:
                        type: boolean
                      external_id:
                        type:
                          - string
                          - 'null'
                      metadata:
                        type: object
                        description: >-
                          A JSON object that can store any custom data
                          structure.
                      default_address:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      addresses:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type:
                                - string
                                - 'null'
                              example: John Doe
                            first_name:
                              type:
                                - string
                                - 'null'
                              example: John
                            last_name:
                              type:
                                - string
                                - 'null'
                              example: Doe
                            address1:
                              type: string
                              example: 123 Main St
                            address2:
                              type:
                                - string
                                - 'null'
                              example: Apt 4B
                            address3:
                              type:
                                - string
                                - 'null'
                              example: Building 5
                            city:
                              type: string
                              example: New York
                            state:
                              type: string
                              example: NY
                            postal_code:
                              type: string
                              example: '10001'
                            country_code:
                              type: string
                              example: US
                            subdivision_code:
                              type:
                                - string
                                - 'null'
                              example: NY
                            default:
                              type: boolean
                              example: true
                      customer_notes:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            customer_id:
                              type: integer
                            user_company_id:
                              type:
                                - integer
                                - 'null'
                            note:
                              type: string
                            resource_type:
                              type:
                                - string
                                - 'null'
                            resource_id:
                              type:
                                - integer
                                - 'null'
                            created_at:
                              type: string
                      jwt:
                        type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unprocessable_entity
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - Customer not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                required:
                  - error_message
                  - errors
                  - meta
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                addresses_attributes:
                  type: object
                  properties:
                    address1:
                      type: string
                      example: 234 Northern Drive
                    address2:
                      type: string
                      example: Apt 5
                    city:
                      type: string
                      example: Provo
                    state:
                      type: string
                      example: UT
                    postal_code:
                      type: string
                      example: '84604'
                    country_id:
                      type: integer
                      example: 1
                    country_code:
                      type: string
                      example: US
                    name:
                      type: string
                    default:
                      type: boolean
                      example: false
                      description: >-
                        Sets the address as the default address for the
                        customer; false by default
                  required:
                    - country_id
                    - city
                    - address1
                    - postal_code
  /api/customers/{id}:
    get:
      summary: Get a customer
      tags:
        - Customers
      operationId: getCustomer
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Customer's Id
          schema:
            type: integer
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  customer:
                    type: object
                    properties:
                      id:
                        type: integer
                      account_id:
                        type: string
                      first_name:
                        type: string
                      last_name:
                        type: string
                      full_name:
                        type: string
                      email:
                        type: string
                      verified_email:
                        type: boolean
                      phone:
                        type: string
                      orders_count:
                        type: integer
                      total_spent:
                        type:
                          - number
                          - string
                      display_total_spent:
                        type: string
                      last_order_id:
                        type:
                          - integer
                          - 'null'
                      notes:
                        type:
                          - string
                          - 'null'
                      user_company_id:
                        type:
                          - integer
                          - 'null'
                      created_at:
                        type: string
                      active:
                        type: boolean
                      active_subscriptions_count:
                        type: integer
                      inactive_subscriptions_count:
                        type: integer
                      is_rep:
                        type: boolean
                      external_id:
                        type:
                          - string
                          - 'null'
                      metadata:
                        type: object
                        description: >-
                          A JSON object that can store any custom data
                          structure.
                      default_address:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      addresses:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type:
                                - string
                                - 'null'
                              example: John Doe
                            first_name:
                              type:
                                - string
                                - 'null'
                              example: John
                            last_name:
                              type:
                                - string
                                - 'null'
                              example: Doe
                            address1:
                              type: string
                              example: 123 Main St
                            address2:
                              type:
                                - string
                                - 'null'
                              example: Apt 4B
                            address3:
                              type:
                                - string
                                - 'null'
                              example: Building 5
                            city:
                              type: string
                              example: New York
                            state:
                              type: string
                              example: NY
                            postal_code:
                              type: string
                              example: '10001'
                            country_code:
                              type: string
                              example: US
                            subdivision_code:
                              type:
                                - string
                                - 'null'
                              example: NY
                            default:
                              type: boolean
                              example: true
                      customer_notes:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            customer_id:
                              type: integer
                            user_company_id:
                              type:
                                - integer
                                - 'null'
                            note:
                              type: string
                            resource_type:
                              type:
                                - string
                                - 'null'
                            resource_id:
                              type:
                                - integer
                                - 'null'
                            created_at:
                              type: string
                      attributable_rep:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          first_name:
                            type: string
                          last_name:
                            type: string
                          image_url:
                            type:
                              - string
                              - 'null'
                      sponsor:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          first_name:
                            type: string
                          last_name:
                            type: string
                          image_url:
                            type:
                              - string
                              - 'null'
                      jwt:
                        type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unprocessable_entity
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - Customer not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
                  - errors
                  - meta
    patch:
      summary: Update a customer
      tags:
        - Customers
      operationId: updateCustomer
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Customer's Id
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  customer:
                    type: object
                    properties:
                      id:
                        type: integer
                      account_id:
                        type: string
                      first_name:
                        type: string
                      last_name:
                        type: string
                      full_name:
                        type: string
                      email:
                        type: string
                      verified_email:
                        type: boolean
                      phone:
                        type: string
                      orders_count:
                        type: integer
                      total_spent:
                        type:
                          - number
                          - string
                      display_total_spent:
                        type: string
                      last_order_id:
                        type:
                          - integer
                          - 'null'
                      notes:
                        type:
                          - string
                          - 'null'
                      user_company_id:
                        type:
                          - integer
                          - 'null'
                      created_at:
                        type: string
                      active:
                        type: boolean
                      active_subscriptions_count:
                        type: integer
                      inactive_subscriptions_count:
                        type: integer
                      is_rep:
                        type: boolean
                      external_id:
                        type:
                          - string
                          - 'null'
                      metadata:
                        type: object
                        description: >-
                          A JSON object that can store any custom data
                          structure.
                      default_address:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      addresses:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type:
                                - string
                                - 'null'
                              example: John Doe
                            first_name:
                              type:
                                - string
                                - 'null'
                              example: John
                            last_name:
                              type:
                                - string
                                - 'null'
                              example: Doe
                            address1:
                              type: string
                              example: 123 Main St
                            address2:
                              type:
                                - string
                                - 'null'
                              example: Apt 4B
                            address3:
                              type:
                                - string
                                - 'null'
                              example: Building 5
                            city:
                              type: string
                              example: New York
                            state:
                              type: string
                              example: NY
                            postal_code:
                              type: string
                              example: '10001'
                            country_code:
                              type: string
                              example: US
                            subdivision_code:
                              type:
                                - string
                                - 'null'
                              example: NY
                            default:
                              type: boolean
                              example: true
                      customer_notes:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            customer_id:
                              type: integer
                            user_company_id:
                              type:
                                - integer
                                - 'null'
                            note:
                              type: string
                            resource_type:
                              type:
                                - string
                                - 'null'
                            resource_id:
                              type:
                                - integer
                                - 'null'
                            created_at:
                              type: string
                      attributable_rep:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          first_name:
                            type: string
                          last_name:
                            type: string
                          image_url:
                            type:
                              - string
                              - 'null'
                      jwt:
                        type:
                          - string
                          - 'null'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unprocessable_entity
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - Customer not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
                  - errors
                  - meta
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                first_name:
                  type: string
                  example: John
                  description: First name of customer
                last_name:
                  type: string
                  example: Nash
                  description: Last name of customer
                email:
                  type: string
                  example: john.nash@example.com
                  description: Email of customer
                phone:
                  type: string
                  example: 801-000-0000
                  description: Phone number of customer
                account_id:
                  type: string
                  example: VKHJSGHOHSOIZQCK
                  description: >-
                    A unique Account Id for customer. If empty, one is generated
                    by the system
                external_id:
                  type: string
                  example: '1234567890'
                  description: >-
                    A unique External Id for customer that is used to identify
                    them in external systems
                notes:
                  type: string
                  example: Note
                  description: Note for customer
                metadata:
                  type: object
                  description: >-
                    A JSON object that can store any custom data structure. When
                    provided, replaces all existing metadata data.
                default_address_attributes:
                  type: object
                  properties:
                    address1:
                      type: string
                      example: 234 Northern Drive
                    address2:
                      type: string
                      example: Apt 5
                    city:
                      type: string
                      example: Provo
                    state:
                      type: string
                      example: UT
                    postal_code:
                      type: string
                      example: '84604'
                    country_id:
                      type: integer
                      example: 1
                    country_code:
                      type: string
                      example: US
                    name:
                      type: string
                    default:
                      type: boolean
                      example: false
                      description: >-
                        Sets the address as the default address for the
                        customer; false by default
                  required:
                    - country_id
                    - city
                    - address1
                    - postal_code
                customer_notes_attributes:
                  type: array
                  items:
                    type: object
                    properties:
                      note:
                        type: string
                        description: Customer Note to be attached to the customer
                        example: Example customer note
                    required:
                      - note
    delete:
      summary: Delete a customer
      tags:
        - Customers
      operationId: deleteCustomer
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Customer's Id
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unprocessable_entity
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - Customer not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
                  - errors
                  - meta
  /api/customers/bulk_delete:
    delete:
      summary: Bulk delete customers
      tags:
        - Customers
      operationId: bulkDeleteCustomers
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  customer_ids:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                example:
                  customer_ids:
                    - id: 1
                    - id: 2
                    - id: 3
                  meta:
                    request_id: f5473a8c-8a86-4e0e-b3e8-95392003921b
                    timestamp: '2024-12-10T08:04:10Z'
        '422':
          description: invalid customer_ids
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    properties:
                      customer_ids:
                        type: array
                        items:
                          type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
                  - errors
                  - meta
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                customer_ids:
                  type: array
                  items:
                    type: integer
                  example:
                    - 1
                    - 2
                    - 3
                  description: Array of customer IDs to delete
              required:
                - customer_ids
  /api/customers/presigned_csv_url:
    post:
      summary: Generate a signed URL to upload csv for bulk importing customers
      description: >-
        Generate signed URL to allow users without credentials to perform upload
        (time-limited access to Cloud Storage)
      tags:
        - Customers
      operationId: getPresignedCsvUrlForCustomersImport
      security:
        - bearer_auth: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    example: https://path/to/file/sth.csv
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - url
        '400':
          description: error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: fail
                  data:
                    type: object
                    properties:
                      error:
                        type: string
                required:
                  - status
  /api/customers/import_csv:
    post:
      summary: Import customers via csv file in the url
      tags:
        - Customers
      operationId: importCustomersViaCSV
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  created:
                    type: integer
                    example: 10
                  failed:
                    type: integer
                    example: 2
                  invalid_rows:
                    type: integer
                    example: 1
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - created
                  - failed
                  - invalid_rows
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unprocessable_entity
                  errors:
                    type: object
                    properties:
                      import:
                        type: string
                        example: Bad Request
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
                  - errors
                  - meta
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  example: https://example.com/path/to/csv
              required:
                - url
  /api/customers/export_csv:
    post:
      summary: Export customers data in a CSV file
      description: Export customers data in a CSV file
      tags:
        - Customers
      operationId: exportCustomersinCSV
      security:
        - bearer_auth: []
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    example: https://fake-url.com/file.csv
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - url
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unprocessable_entity
                  errors:
                    type: object
                    properties:
                      export:
                        type: string
                        example: Bad Request
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
                  - errors
                  - meta
  /api/customers/{id}/append_metadata:
    patch:
      summary: Append metadata field
      tags:
        - Customers
      operationId: customerAppendMetadataField
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Customer's Id
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  customer:
                    type: object
                    properties:
                      id:
                        type: integer
                      account_id:
                        type: string
                      first_name:
                        type: string
                      last_name:
                        type: string
                      full_name:
                        type: string
                      email:
                        type: string
                      verified_email:
                        type: boolean
                      phone:
                        type: string
                      orders_count:
                        type: integer
                      total_spent:
                        type:
                          - number
                          - string
                      display_total_spent:
                        type: string
                      last_order_id:
                        type:
                          - integer
                          - 'null'
                      notes:
                        type:
                          - string
                          - 'null'
                      user_company_id:
                        type:
                          - integer
                          - 'null'
                      created_at:
                        type: string
                      active:
                        type: boolean
                      active_subscriptions_count:
                        type: integer
                      inactive_subscriptions_count:
                        type: integer
                      is_rep:
                        type: boolean
                      external_id:
                        type:
                          - string
                          - 'null'
                      metadata:
                        type: object
                        description: >-
                          A JSON object that can store any custom data
                          structure.
                      default_address:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      addresses:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type:
                                - string
                                - 'null'
                              example: John Doe
                            first_name:
                              type:
                                - string
                                - 'null'
                              example: John
                            last_name:
                              type:
                                - string
                                - 'null'
                              example: Doe
                            address1:
                              type: string
                              example: 123 Main St
                            address2:
                              type:
                                - string
                                - 'null'
                              example: Apt 4B
                            address3:
                              type:
                                - string
                                - 'null'
                              example: Building 5
                            city:
                              type: string
                              example: New York
                            state:
                              type: string
                              example: NY
                            postal_code:
                              type: string
                              example: '10001'
                            country_code:
                              type: string
                              example: US
                            subdivision_code:
                              type:
                                - string
                                - 'null'
                              example: NY
                            default:
                              type: boolean
                              example: true
                      customer_notes:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            customer_id:
                              type: integer
                            user_company_id:
                              type:
                                - integer
                                - 'null'
                            note:
                              type: string
                            resource_type:
                              type:
                                - string
                                - 'null'
                            resource_id:
                              type:
                                - integer
                                - 'null'
                            created_at:
                              type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - Customer not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                metadata:
                  type: object
                  description: >-
                    A JSON object that can store any custom data structure. When
                    provided, merges with existing metadata data.
              required:
                - metadata
  /api/customers/{id}/update_attributable_rep:
    patch:
      summary: Update attributable rep for customer
      tags:
        - Customers
      operationId: updateAttributableRep
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Customer's Id
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  customer:
                    type: object
                    properties:
                      id:
                        type: integer
                      account_id:
                        type: string
                      first_name:
                        type: string
                      last_name:
                        type: string
                      full_name:
                        type: string
                      email:
                        type: string
                      verified_email:
                        type: boolean
                      phone:
                        type: string
                      orders_count:
                        type: integer
                      total_spent:
                        type:
                          - number
                          - string
                      display_total_spent:
                        type: string
                      last_order_id:
                        type:
                          - integer
                          - 'null'
                      notes:
                        type:
                          - string
                          - 'null'
                      user_company_id:
                        type:
                          - integer
                          - 'null'
                      created_at:
                        type: string
                      active:
                        type: boolean
                      active_subscriptions_count:
                        type: integer
                      inactive_subscriptions_count:
                        type: integer
                      is_rep:
                        type: boolean
                      external_id:
                        type:
                          - string
                          - 'null'
                      metadata:
                        type: object
                        description: >-
                          A JSON object that can store any custom data
                          structure.
                      default_address:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      addresses:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type:
                                - string
                                - 'null'
                              example: John Doe
                            first_name:
                              type:
                                - string
                                - 'null'
                              example: John
                            last_name:
                              type:
                                - string
                                - 'null'
                              example: Doe
                            address1:
                              type: string
                              example: 123 Main St
                            address2:
                              type:
                                - string
                                - 'null'
                              example: Apt 4B
                            address3:
                              type:
                                - string
                                - 'null'
                              example: Building 5
                            city:
                              type: string
                              example: New York
                            state:
                              type: string
                              example: NY
                            postal_code:
                              type: string
                              example: '10001'
                            country_code:
                              type: string
                              example: US
                            subdivision_code:
                              type:
                                - string
                                - 'null'
                              example: NY
                            default:
                              type: boolean
                              example: true
                      customer_notes:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            customer_id:
                              type: integer
                            user_company_id:
                              type:
                                - integer
                                - 'null'
                            note:
                              type: string
                            resource_type:
                              type:
                                - string
                                - 'null'
                            resource_id:
                              type:
                                - integer
                                - 'null'
                            created_at:
                              type: string
                      attributable_rep:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          first_name:
                            type: string
                          last_name:
                            type: string
                          image_url:
                            type:
                              - string
                              - 'null'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: user company not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - Rep not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
                  - errors
                  - meta
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                customer:
                  type: object
                  properties:
                    user_company_id:
                      type: integer
                      example: 1
                      description: ID of the user company to be set as attributable rep
                  required:
                    - user_company_id
              required:
                - customer
  /api/customers/{customer_id}/address/{address_id}:
    patch:
      summary: Update specific fields of customer address
      tags:
        - Customers
      operationId: updateCustomerAddress
      security:
        - bearer_auth: []
      parameters:
        - name: customer_id
          in: path
          required: true
          description: Customer's Id
          schema:
            type: integer
        - name: address_id
          in: path
          required: true
          description: Address Id
          schema:
            type: integer
      responses:
        '200':
          description: success when updating address without changing default
          content:
            application/json:
              schema:
                type: object
                properties:
                  customer:
                    type: object
                    properties:
                      id:
                        type: integer
                      account_id:
                        type: string
                      first_name:
                        type: string
                      last_name:
                        type: string
                      full_name:
                        type: string
                      email:
                        type: string
                      verified_email:
                        type: boolean
                      phone:
                        type: string
                      orders_count:
                        type: integer
                      total_spent:
                        type:
                          - number
                          - string
                      display_total_spent:
                        type: string
                      last_order_id:
                        type:
                          - integer
                          - 'null'
                      notes:
                        type:
                          - string
                          - 'null'
                      user_company_id:
                        type:
                          - integer
                          - 'null'
                      created_at:
                        type: string
                      active:
                        type: boolean
                      active_subscriptions_count:
                        type: integer
                      inactive_subscriptions_count:
                        type: integer
                      is_rep:
                        type: boolean
                      external_id:
                        type:
                          - string
                          - 'null'
                      metadata:
                        type: object
                        description: >-
                          A JSON object that can store any custom data
                          structure.
                      default_address:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      addresses:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type:
                                - string
                                - 'null'
                              example: John Doe
                            first_name:
                              type:
                                - string
                                - 'null'
                              example: John
                            last_name:
                              type:
                                - string
                                - 'null'
                              example: Doe
                            address1:
                              type: string
                              example: 123 Main St
                            address2:
                              type:
                                - string
                                - 'null'
                              example: Apt 4B
                            address3:
                              type:
                                - string
                                - 'null'
                              example: Building 5
                            city:
                              type: string
                              example: New York
                            state:
                              type: string
                              example: NY
                            postal_code:
                              type: string
                              example: '10001'
                            country_code:
                              type: string
                              example: US
                            subdivision_code:
                              type:
                                - string
                                - 'null'
                              example: NY
                            default:
                              type: boolean
                              example: true
                      customer_notes:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            customer_id:
                              type: integer
                            user_company_id:
                              type:
                                - integer
                                - 'null'
                            note:
                              type: string
                            resource_type:
                              type:
                                - string
                                - 'null'
                            resource_id:
                              type:
                                - integer
                                - 'null'
                            created_at:
                              type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: address not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not_found
                  errors:
                    type: object
                    properties:
                      customer:
                        type: array
                        example:
                          - Resource not found.
                      address_id:
                        type: array
                        items:
                          type: string
                        example:
                          - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
                  - errors
                  - meta
        '422':
          description: address update fails due to database error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Something went wrong. Please try again later.
                  errors:
                    type: object
                    properties:
                      address_id:
                        type: array
                        items:
                          type: string
                        example:
                          - Address and Customer doesn't match.
                      base:
                        type: array
                        items:
                          type: string
                        example:
                          - 'Database error: violates foreign key constraint'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
                  - errors
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                customer:
                  type: object
                  properties:
                    address_details:
                      type: object
                      properties:
                        address1:
                          type: string
                          example: 234 Northern Drive
                        address2:
                          type: string
                          example: Apt 5
                        city:
                          type: string
                          example: Provo
                        state:
                          type: string
                          example: UT
                        postal_code:
                          type: string
                          example: '84604'
                        country_id:
                          type: integer
                          example: 1
                        country_code:
                          type: string
                          example: US
                        name:
                          type: string
                        default:
                          type: boolean
                          example: false
                          description: >-
                            Sets the address as the default address for the
                            customer; false by default
                  required:
                    - address_details
              required:
                - customer
    delete:
      summary: Delete customer address
      tags:
        - Customers
      operationId: deleteCustomerAddress
      security:
        - bearer_auth: []
      parameters:
        - name: customer_id
          in: path
          required: true
          description: Customer's Id
          schema:
            type: integer
        - name: address_id
          in: path
          required: true
          description: Address Id to delete
          schema:
            type: integer
      responses:
        '200':
          description: default address successfully deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  customer:
                    type: object
                    properties:
                      id:
                        type: integer
                      account_id:
                        type: string
                      first_name:
                        type: string
                      last_name:
                        type: string
                      full_name:
                        type: string
                      email:
                        type: string
                      verified_email:
                        type: boolean
                      phone:
                        type: string
                      orders_count:
                        type: integer
                      total_spent:
                        type:
                          - number
                          - string
                      display_total_spent:
                        type: string
                      last_order_id:
                        type:
                          - integer
                          - 'null'
                      notes:
                        type:
                          - string
                          - 'null'
                      user_company_id:
                        type:
                          - integer
                          - 'null'
                      created_at:
                        type: string
                      active:
                        type: boolean
                      active_subscriptions_count:
                        type: integer
                      inactive_subscriptions_count:
                        type: integer
                      is_rep:
                        type: boolean
                      external_id:
                        type:
                          - string
                          - 'null'
                      metadata:
                        type: object
                        description: >-
                          A JSON object that can store any custom data
                          structure.
                      default_address:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      addresses:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type:
                                - string
                                - 'null'
                              example: John Doe
                            first_name:
                              type:
                                - string
                                - 'null'
                              example: John
                            last_name:
                              type:
                                - string
                                - 'null'
                              example: Doe
                            address1:
                              type: string
                              example: 123 Main St
                            address2:
                              type:
                                - string
                                - 'null'
                              example: Apt 4B
                            address3:
                              type:
                                - string
                                - 'null'
                              example: Building 5
                            city:
                              type: string
                              example: New York
                            state:
                              type: string
                              example: NY
                            postal_code:
                              type: string
                              example: '10001'
                            country_code:
                              type: string
                              example: US
                            subdivision_code:
                              type:
                                - string
                                - 'null'
                              example: NY
                            default:
                              type: boolean
                              example: true
                      customer_notes:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            customer_id:
                              type: integer
                            user_company_id:
                              type:
                                - integer
                                - 'null'
                            note:
                              type: string
                            resource_type:
                              type:
                                - string
                                - 'null'
                            resource_id:
                              type:
                                - integer
                                - 'null'
                            created_at:
                              type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: address not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not_found
                  errors:
                    type: object
                    properties:
                      customer:
                        type: array
                        items:
                          type: string
                        example:
                          - not found
                      address_id:
                        type: array
                        items:
                          type: string
                        example:
                          - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
                  - errors
                  - meta
        '422':
          description: address does not belong to customer
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unprocessable_entity
                  errors:
                    type: object
                    properties:
                      address_id:
                        type: array
                        items:
                          type: string
                        example:
                          - Address and Customer doesn't match.
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
                  - errors
                  - meta
  /api/customers/{customer_id}/address/{address_id}/default:
    patch:
      summary: Set default address for customer
      tags:
        - Customers
      operationId: setDefaultAddressForCustomer
      security:
        - bearer_auth: []
      parameters:
        - name: customer_id
          in: path
          required: true
          description: Customer's Id
          schema:
            type: integer
        - name: address_id
          in: path
          required: true
          description: Address Id to set as default
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  customer:
                    type: object
                    properties:
                      id:
                        type: integer
                      account_id:
                        type: string
                      first_name:
                        type: string
                      last_name:
                        type: string
                      full_name:
                        type: string
                      email:
                        type: string
                      verified_email:
                        type: boolean
                      phone:
                        type: string
                      orders_count:
                        type: integer
                      total_spent:
                        type:
                          - number
                          - string
                      display_total_spent:
                        type: string
                      last_order_id:
                        type:
                          - integer
                          - 'null'
                      notes:
                        type:
                          - string
                          - 'null'
                      user_company_id:
                        type:
                          - integer
                          - 'null'
                      created_at:
                        type: string
                      active:
                        type: boolean
                      active_subscriptions_count:
                        type: integer
                      inactive_subscriptions_count:
                        type: integer
                      is_rep:
                        type: boolean
                      external_id:
                        type:
                          - string
                          - 'null'
                      metadata:
                        type: object
                        description: >-
                          A JSON object that can store any custom data
                          structure.
                      default_address:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      addresses:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type:
                                - string
                                - 'null'
                              example: John Doe
                            first_name:
                              type:
                                - string
                                - 'null'
                              example: John
                            last_name:
                              type:
                                - string
                                - 'null'
                              example: Doe
                            address1:
                              type: string
                              example: 123 Main St
                            address2:
                              type:
                                - string
                                - 'null'
                              example: Apt 4B
                            address3:
                              type:
                                - string
                                - 'null'
                              example: Building 5
                            city:
                              type: string
                              example: New York
                            state:
                              type: string
                              example: NY
                            postal_code:
                              type: string
                              example: '10001'
                            country_code:
                              type: string
                              example: US
                            subdivision_code:
                              type:
                                - string
                                - 'null'
                              example: NY
                            default:
                              type: boolean
                              example: true
                      customer_notes:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            customer_id:
                              type: integer
                            user_company_id:
                              type:
                                - integer
                                - 'null'
                            note:
                              type: string
                            resource_type:
                              type:
                                - string
                                - 'null'
                            resource_id:
                              type:
                                - integer
                                - 'null'
                            created_at:
                              type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: address not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    properties:
                      customer:
                        type: array
                        items:
                          type: string
                        example:
                          - Resource not found.
                      address_id:
                        type: array
                        items:
                          type: string
                        example:
                          - Address not found.
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
                  - errors
                  - meta
        '422':
          description: address not associated with customer
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unprocessable entity
                  errors:
                    type: object
                    properties:
                      address_id:
                        type: array
                        items:
                          type: string
                        example:
                          - Address and Customer doesn't match.
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
                  - errors
                  - meta
  /api/domains:
    get:
      summary: Lists domains
      tags:
        - Domains
      operationId: listDomains
      security:
        - bearer_auth: []
      parameters:
        - name: search_query
          in: query
          required: false
          description: Search by domain name or target
          schema:
            type: string
        - name: page
          in: query
          schema:
            type: integer
            default: 1
          required: false
          description: Page number for pagination
        - name: per_page
          in: query
          schema:
            type: integer
            default: 10
          required: false
          description: Number of records per page
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  domains:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 101
                        hostname:
                          type: string
                          example: example.com
                        created_at:
                          type: string
                          example: '2024-04-20T12:34:56.000Z'
                        updated_at:
                          type: string
                          example: '2024-08-20T12:34:56.000Z'
                        apex_domain:
                          type: string
                          example: example1.com
                        certificate_domain_id:
                          type:
                            - integer
                            - 'null'
                          example: 101
                        company_id:
                          type: integer
                          example: 101
                        dns_config:
                          type:
                            - object
                            - 'null'
                          example: {}
                        primary:
                          type: boolean
                          example: false
                        redirection_domain_id:
                          type:
                            - integer
                            - 'null'
                          example: 101
                        redirection_domain_hostname:
                          type:
                            - string
                            - 'null'
                          example: example2.com
                        verification_status:
                          type: string
                          example: pending_cname
                        wildcard_subdomain:
                          type: boolean
                          example: false
                        dns_fluid_verified:
                          type: string
                          example: 'no'
                        cert_created:
                          type: boolean
                          example: true
                        connected:
                          type: boolean
                          example: false
                        verifying_cname:
                          type:
                            - boolean
                            - 'null'
                          example: false
                        payment_account:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                              example: 1
                            active:
                              type: boolean
                              example: true
                            integration_class:
                              type: string
                              example: Paypal
                            adapter_class:
                              type:
                                - string
                                - 'null'
                              example: ActiveMerchant::Billing::SpreedlyCoreGateway
                            adapter_class_label:
                              type:
                                - string
                                - 'null'
                              example: SpreedlyCoreGateway
                            name:
                              type: string
                              example: Test Payment
                            settings:
                              type: object
                              example: {}
                            test:
                              type: boolean
                              example: false
                            auto_assign_to_cart:
                              type: boolean
                              example: false
                            countries:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 1
                                  name:
                                    type: string
                                    example: United States
                                  iso:
                                    type: string
                                    example: US
                  meta:
                    type: object
                    properties:
                      total_count:
                        type: integer
                        example: 20
                      total_pages:
                        type: integer
                        example: 2
                      current_page:
                        type: integer
                        example: 1
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-11T08:04:10Z'
    post:
      summary: Create domain
      description: Create a new domain
      tags:
        - Domains
      operationId: createDomain
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: created
          content:
            application/json:
              schema:
                type: object
                properties:
                  domain:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 101
                      hostname:
                        type: string
                        example: example.com
                      created_at:
                        type: string
                        example: '2024-04-20T12:34:56.000Z'
                      updated_at:
                        type: string
                        example: '2024-08-20T12:34:56.000Z'
                      apex_domain:
                        type: string
                        example: example1.com
                      certificate_domain_id:
                        type:
                          - integer
                          - 'null'
                        example: 101
                      company_id:
                        type: integer
                        example: 101
                      dns_config:
                        type:
                          - object
                          - 'null'
                        example: {}
                      primary:
                        type: boolean
                        example: false
                      redirection_domain_id:
                        type:
                          - integer
                          - 'null'
                        example: 101
                      redirection_domain_hostname:
                        type:
                          - string
                          - 'null'
                        example: example2.com
                      verification_status:
                        type: string
                        example: pending_cname
                      wildcard_subdomain:
                        type: boolean
                        example: false
                      dns_fluid_verified:
                        type: string
                        example: 'no'
                      cert_created:
                        type: boolean
                        example: true
                      connected:
                        type: boolean
                        example: false
                      verifying_cname:
                        type:
                          - boolean
                          - 'null'
                        example: false
                      payment_account:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          active:
                            type: boolean
                            example: true
                          integration_class:
                            type: string
                            example: Paypal
                          adapter_class:
                            type:
                              - string
                              - 'null'
                            example: ActiveMerchant::Billing::SpreedlyCoreGateway
                          adapter_class_label:
                            type:
                              - string
                              - 'null'
                            example: SpreedlyCoreGateway
                          name:
                            type: string
                            example: Test Payment
                          settings:
                            type: object
                            example: {}
                          test:
                            type: boolean
                            example: false
                          auto_assign_to_cart:
                            type: boolean
                            example: false
                          countries:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                name:
                                  type: string
                                  example: United States
                                iso:
                                  type: string
                                  example: US
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unprocessable entity
                  errors:
                    type: object
                    example:
                      hostname:
                        - 'param is missing or the value is empty: hostname'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                hostname:
                  type: string
                  example: newdomain.com
                redirection_domain_id:
                  type: integer
                  example: 101
                primary:
                  type: boolean
                  example: false
                wildcard_subdomain:
                  type: boolean
                  example: false
              required:
                - hostname
  /api/domains/{id}:
    get:
      summary: Retrieves a domain
      tags:
        - Domains
      operationId: getDomain
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  domain:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 101
                      hostname:
                        type: string
                        example: example.com
                      created_at:
                        type: string
                        example: '2024-04-20T12:34:56.000Z'
                      updated_at:
                        type: string
                        example: '2024-08-20T12:34:56.000Z'
                      apex_domain:
                        type: string
                        example: example1.com
                      certificate_domain_id:
                        type:
                          - integer
                          - 'null'
                        example: 101
                      company_id:
                        type: integer
                        example: 101
                      dns_config:
                        type:
                          - object
                          - 'null'
                        example: {}
                      primary:
                        type: boolean
                        example: false
                      redirection_domain_id:
                        type:
                          - integer
                          - 'null'
                        example: 101
                      redirection_domain_hostname:
                        type:
                          - string
                          - 'null'
                        example: example2.com
                      verification_status:
                        type: string
                        example: pending_cname
                      wildcard_subdomain:
                        type: boolean
                        example: false
                      dns_fluid_verified:
                        type: string
                        example: 'no'
                      cert_created:
                        type: boolean
                        example: true
                      connected:
                        type: boolean
                        example: false
                      verifying_cname:
                        type:
                          - boolean
                          - 'null'
                        example: false
                      payment_account:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          active:
                            type: boolean
                            example: true
                          integration_class:
                            type: string
                            example: Paypal
                          adapter_class:
                            type:
                              - string
                              - 'null'
                            example: ActiveMerchant::Billing::SpreedlyCoreGateway
                          adapter_class_label:
                            type:
                              - string
                              - 'null'
                            example: SpreedlyCoreGateway
                          name:
                            type: string
                            example: Test Payment
                          settings:
                            type: object
                            example: {}
                          test:
                            type: boolean
                            example: false
                          auto_assign_to_cart:
                            type: boolean
                            example: false
                          countries:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                name:
                                  type: string
                                  example: United States
                                iso:
                                  type: string
                                  example: US
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    example:
                      id:
                        - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
    put:
      summary: Updates a domain
      tags:
        - Domains
      operationId: updateDomain
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  domain:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 101
                      hostname:
                        type: string
                        example: example.com
                      created_at:
                        type: string
                        example: '2024-04-20T12:34:56.000Z'
                      updated_at:
                        type: string
                        example: '2024-08-20T12:34:56.000Z'
                      apex_domain:
                        type: string
                        example: example1.com
                      certificate_domain_id:
                        type:
                          - integer
                          - 'null'
                        example: 101
                      company_id:
                        type: integer
                        example: 101
                      dns_config:
                        type:
                          - object
                          - 'null'
                        example: {}
                      primary:
                        type: boolean
                        example: false
                      redirection_domain_id:
                        type:
                          - integer
                          - 'null'
                        example: 101
                      redirection_domain_hostname:
                        type:
                          - string
                          - 'null'
                        example: example2.com
                      verification_status:
                        type: string
                        example: pending_cname
                      wildcard_subdomain:
                        type: boolean
                        example: false
                      dns_fluid_verified:
                        type: string
                        example: 'no'
                      cert_created:
                        type: boolean
                        example: true
                      connected:
                        type: boolean
                        example: false
                      verifying_cname:
                        type:
                          - boolean
                          - 'null'
                        example: false
                      payment_account:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          active:
                            type: boolean
                            example: true
                          integration_class:
                            type: string
                            example: Paypal
                          adapter_class:
                            type:
                              - string
                              - 'null'
                            example: ActiveMerchant::Billing::SpreedlyCoreGateway
                          adapter_class_label:
                            type:
                              - string
                              - 'null'
                            example: SpreedlyCoreGateway
                          name:
                            type: string
                            example: Test Payment
                          settings:
                            type: object
                            example: {}
                          test:
                            type: boolean
                            example: false
                          auto_assign_to_cart:
                            type: boolean
                            example: false
                          countries:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                name:
                                  type: string
                                  example: United States
                                iso:
                                  type: string
                                  example: US
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    example:
                      domain:
                        - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                hostname:
                  type: string
                  example: updateddomain.com
    delete:
      summary: Deletes a domain
      tags:
        - Domains
      operationId: deleteDomain
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  domain:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 101
                      hostname:
                        type: string
                        example: example.com
                      created_at:
                        type: string
                        example: '2024-04-20T12:34:56.000Z'
                      updated_at:
                        type: string
                        example: '2024-08-20T12:34:56.000Z'
                      apex_domain:
                        type: string
                        example: example1.com
                      certificate_domain_id:
                        type:
                          - integer
                          - 'null'
                        example: 101
                      company_id:
                        type: integer
                        example: 101
                      dns_config:
                        type:
                          - object
                          - 'null'
                        example: {}
                      primary:
                        type: boolean
                        example: false
                      redirection_domain_id:
                        type:
                          - integer
                          - 'null'
                        example: 101
                      redirection_domain_hostname:
                        type:
                          - string
                          - 'null'
                        example: example2.com
                      verification_status:
                        type: string
                        example: pending_cname
                      wildcard_subdomain:
                        type: boolean
                        example: false
                      dns_fluid_verified:
                        type: string
                        example: 'no'
                      cert_created:
                        type: boolean
                        example: true
                      connected:
                        type: boolean
                        example: false
                      verifying_cname:
                        type:
                          - boolean
                          - 'null'
                        example: false
                      payment_account:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          active:
                            type: boolean
                            example: true
                          integration_class:
                            type: string
                            example: Paypal
                          adapter_class:
                            type:
                              - string
                              - 'null'
                            example: ActiveMerchant::Billing::SpreedlyCoreGateway
                          adapter_class_label:
                            type:
                              - string
                              - 'null'
                            example: SpreedlyCoreGateway
                          name:
                            type: string
                            example: Test Payment
                          settings:
                            type: object
                            example: {}
                          test:
                            type: boolean
                            example: false
                          auto_assign_to_cart:
                            type: boolean
                            example: false
                          countries:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                name:
                                  type: string
                                  example: United States
                                iso:
                                  type: string
                                  example: US
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unprocessable entity
                  errors:
                    type: object
                    example:
                      hostname:
                        - >-
                          is a Primary Domain and cannot be deleted. Please
                          change the Primary Domain before attempting to delete.
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
  /api/domains/{id}/verify_domain:
    patch:
      summary: Verify domain
      tags:
        - Domains
      operationId: verifyDomain
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Domain ID
          schema:
            type: integer
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  domain:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 101
                      hostname:
                        type: string
                        example: example.com
                      created_at:
                        type: string
                        example: '2024-04-20T12:34:56.000Z'
                      updated_at:
                        type: string
                        example: '2024-08-20T12:34:56.000Z'
                      apex_domain:
                        type: string
                        example: example1.com
                      certificate_domain_id:
                        type:
                          - integer
                          - 'null'
                        example: 101
                      company_id:
                        type: integer
                        example: 101
                      dns_config:
                        type:
                          - object
                          - 'null'
                        example: {}
                      primary:
                        type: boolean
                        example: false
                      redirection_domain_id:
                        type:
                          - integer
                          - 'null'
                        example: 101
                      redirection_domain_hostname:
                        type:
                          - string
                          - 'null'
                        example: example2.com
                      verification_status:
                        type: string
                        example: pending_cname
                      wildcard_subdomain:
                        type: boolean
                        example: false
                      dns_fluid_verified:
                        type: string
                        example: 'no'
                      cert_created:
                        type: boolean
                        example: true
                      connected:
                        type: boolean
                        example: false
                      verifying_cname:
                        type:
                          - boolean
                          - 'null'
                        example: false
                      payment_account:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          active:
                            type: boolean
                            example: true
                          integration_class:
                            type: string
                            example: Paypal
                          adapter_class:
                            type:
                              - string
                              - 'null'
                            example: ActiveMerchant::Billing::SpreedlyCoreGateway
                          adapter_class_label:
                            type:
                              - string
                              - 'null'
                            example: SpreedlyCoreGateway
                          name:
                            type: string
                            example: Test Payment
                          settings:
                            type: object
                            example: {}
                          test:
                            type: boolean
                            example: false
                          auto_assign_to_cart:
                            type: boolean
                            example: false
                          countries:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                name:
                                  type: string
                                  example: United States
                                iso:
                                  type: string
                                  example: US
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    example:
                      domain:
                        - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: string
                    example: Domain not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
  /api/domains/{id}/confirm_cname_for_domain:
    patch:
      summary: Confirm CNAME for domain
      tags:
        - Domains
      operationId: confirmCNAMEForDomain
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Domain ID
          schema:
            type: integer
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  domain:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 101
                      hostname:
                        type: string
                        example: example.com
                      created_at:
                        type: string
                        example: '2024-04-20T12:34:56.000Z'
                      updated_at:
                        type: string
                        example: '2024-08-20T12:34:56.000Z'
                      apex_domain:
                        type: string
                        example: example1.com
                      certificate_domain_id:
                        type:
                          - integer
                          - 'null'
                        example: 101
                      company_id:
                        type: integer
                        example: 101
                      dns_config:
                        type:
                          - object
                          - 'null'
                        example: {}
                      primary:
                        type: boolean
                        example: false
                      redirection_domain_id:
                        type:
                          - integer
                          - 'null'
                        example: 101
                      redirection_domain_hostname:
                        type:
                          - string
                          - 'null'
                        example: example2.com
                      verification_status:
                        type: string
                        example: pending_cname
                      wildcard_subdomain:
                        type: boolean
                        example: false
                      dns_fluid_verified:
                        type: string
                        example: 'no'
                      cert_created:
                        type: boolean
                        example: true
                      connected:
                        type: boolean
                        example: false
                      verifying_cname:
                        type:
                          - boolean
                          - 'null'
                        example: false
                      payment_account:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                            example: 1
                          active:
                            type: boolean
                            example: true
                          integration_class:
                            type: string
                            example: Paypal
                          adapter_class:
                            type:
                              - string
                              - 'null'
                            example: ActiveMerchant::Billing::SpreedlyCoreGateway
                          adapter_class_label:
                            type:
                              - string
                              - 'null'
                            example: SpreedlyCoreGateway
                          name:
                            type: string
                            example: Test Payment
                          settings:
                            type: object
                            example: {}
                          test:
                            type: boolean
                            example: false
                          auto_assign_to_cart:
                            type: boolean
                            example: false
                          countries:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                name:
                                  type: string
                                  example: United States
                                iso:
                                  type: string
                                  example: US
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    example:
                      domain:
                        - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unprocessable entity
                  errors:
                    type: string
                    example: CNAME validation failed
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
  /api/drop_zones:
    get:
      summary: An array of available drop zones
      tags:
        - Drop Zones
      operationId: indexDropZones
      security:
        - bearer_auth: []
      parameters:
        - name: pagination
          in: query
          schema:
            type: object
            properties:
              page:
                type: integer
                exclusiveMinimum: 0
              per_page:
                type: integer
                exclusiveMinimum: 0
                maximum: 100
              active:
                type: boolean
              public:
                type: boolean
              page_type:
                type: string
            required: []
      responses:
        '200':
          description: returns a list of order confirmation drop zones
          content:
            application/json:
              schema:
                type: object
                properties:
                  drop_zones:
                    type: array
                    items:
                      title: DropZone
                      type: object
                      properties:
                        uuid:
                          type: string
                        name:
                          type: string
                        active:
                          type:
                            - boolean
                            - 'null'
                          default: false
                        settings:
                          type:
                            - object
                            - 'null'
                          default: '{}'
                        embed_url:
                          type: string
                      required:
                        - uuid
                        - name
                        - embed_url
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            example: 1
                          total_pages:
                            type: integer
                            example: 10
                          total_count:
                            type: integer
                            example: 100
                          per_page:
                            type: integer
                            example: 10
                required:
                  - drop_zones
                  - meta
    post:
      summary: creates a drop zone
      tags:
        - Drop Zones
      operationId: createDropZone
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: admin detail drop zone created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  drop_zone:
                    title: DropZone
                    type: object
                    properties:
                      uuid:
                        type: string
                      name:
                        type: string
                      active:
                        type:
                          - boolean
                          - 'null'
                        default: false
                      settings:
                        type:
                          - object
                          - 'null'
                        default: '{}'
                      embed_url:
                        type: string
                      created_at:
                        type: string
                        format: date-time
                    required:
                      - uuid
                      - name
                      - embed_url
                      - created_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - drop_zone
                  - meta
        '422':
          description: invalid order confirmation zone
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                drop_zone:
                  type: object
                  properties:
                    name:
                      type: string
                      minLength: 1
                    embed_url:
                      type: string
                      minLength: 1
                    active:
                      type: boolean
                    settings:
                      type: object
                  required:
                    - name
                    - embed_url
              required:
                - drop_zone
  /api/drop_zones/{uuid}:
    get:
      summary: shows a drop zone
      tags:
        - Drop Zones
      operationId: showDropZone
      security:
        - bearer_auth: []
      parameters:
        - name: uuid
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: returns a single drop zone
          content:
            application/json:
              schema:
                type: object
                properties:
                  drop_zone:
                    title: DropZone
                    type: object
                    properties:
                      uuid:
                        type: string
                      name:
                        type: string
                      active:
                        type:
                          - boolean
                          - 'null'
                        default: false
                      settings:
                        type:
                          - object
                          - 'null'
                        default: '{}'
                      embed_url:
                        type: string
                    required:
                      - uuid
                      - name
                      - embed_url
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - drop_zone
                  - meta
        '404':
          description: drop zone not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
    put:
      summary: updates a drop zone
      tags:
        - Drop Zones
      operationId: updateDropZone
      security:
        - bearer_auth: []
      parameters:
        - name: uuid
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: drop zone updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  drop_zone:
                    title: DropZone
                    type: object
                    properties:
                      uuid:
                        type: string
                      name:
                        type: string
                      active:
                        type:
                          - boolean
                          - 'null'
                        default: false
                      settings:
                        type:
                          - object
                          - 'null'
                        default: '{}'
                      embed_url:
                        type: string
                      updated_at:
                        type: string
                        format: date-time
                    required:
                      - uuid
                      - name
                      - embed_url
                      - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - drop_zone
                  - meta
        '404':
          description: drop zone not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: invalid drop zone parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                uuid:
                  type: string
                drop_zone:
                  type: object
                  properties:
                    name:
                      type: string
                      minLength: 1
                    active:
                      type: boolean
                      not:
                        type: 'null'
                    settings:
                      type: object
                      not:
                        type: 'null'
                    embed_url:
                      type: string
                      minLength: 1
                  required: []
              required:
                - uuid
                - drop_zone
    delete:
      summary: deletes a drop zone
      tags:
        - Drop Zones
      operationId: destroyDropZone
      security:
        - bearer_auth: []
      parameters:
        - name: uuid
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: drop zone deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  uuid:
                    type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - uuid
                  - meta
        '404':
          description: drop zone not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                uuid:
                  type: string
              required:
                - uuid
  /api/drop_zones/constants:
    get:
      summary: returns drop zone constants
      tags:
        - Drop Zones
      operationId: getDropZoneConstants
      security:
        - bearer_auth: []
      responses:
        '200':
          description: returns drop zone constants
          content:
            application/json:
              schema:
                type: object
                properties:
                  constants:
                    type: object
                    properties:
                      page_types:
                        type: array
                        items:
                          type: string
                      checkout_zones:
                        type: array
                        items:
                          type: string
                      order_confirmation_zones:
                        type: array
                        items:
                          type: string
                      subscription_zones:
                        type: array
                        items:
                          type: string
                      form_zones:
                        type: array
                        items:
                          type: string
                      admin_detail_zones:
                        type: array
                        items:
                          type: string
                      home_zones:
                        type: array
                        items:
                          type: string
                      product_zones:
                        type: array
                        items:
                          type: string
                      page_zones:
                        type: object
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - constants
                  - meta
  /api/droplet_categories:
    get:
      summary: Returns a list of all droplet categories
      tags:
        - Droplet Categories
      operationId: indexDropletCategories
      security:
        - bearer_auth: []
      responses:
        '200':
          description: returns a list of droplet categories
          content:
            application/json:
              schema:
                type: object
                properties:
                  droplet_categories:
                    type: array
                    items:
                      title: DropletCategory
                      type: object
                      properties:
                        name:
                          type: string
                        slug:
                          type:
                            - string
                            - 'null'
                        description:
                          type:
                            - string
                            - 'null'
                      required:
                        - name
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
  /api/droplet_installations:
    get:
      summary: List droplet installations
      tags:
        - Droplet Installations
      operationId: indexDropletInstallations
      security:
        - bearer_auth: []
      parameters:
        - name: page
          in: query
          required: false
          description: Page number for pagination
          schema:
            type: integer
        - name: per_page
          in: query
          required: false
          description: 'Number of records per page (max: 100)'
          schema:
            type: integer
        - name: category
          in: query
          required: false
          description: Filter by droplet category
          schema:
            type: string
      responses:
        '200':
          description: returns a list of droplet installations
          content:
            application/json:
              schema:
                type: object
                properties:
                  droplet_installations:
                    type: array
                    items:
                      title: DropletInstallation
                      type: object
                      properties:
                        uuid:
                          type: string
                        id:
                          type: integer
                        droplet_uuid:
                          example: drp_p4r9jsl305iduqrsl0ujdth35jhuy2al
                          type: string
                        droplet_name:
                          type: string
                        active:
                          type: boolean
                          default: true
                      required:
                        - uuid
                        - id
                        - droplet_uuid
                        - droplet_name
                        - active
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            example: 1
                          total_pages:
                            type: integer
                            example: 10
                          total_count:
                            type: integer
                            example: 100
                          per_page:
                            type: integer
                            example: 10
                required:
                  - droplet_installations
                  - meta
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
    post:
      summary: Create a droplet installation
      tags:
        - Droplet Installations
      operationId: createDropletInstallation
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: droplet installation created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  droplet_installation:
                    title: DropletInstallation
                    type: object
                    properties:
                      uuid:
                        type: string
                      id:
                        type: integer
                      droplet_uuid:
                        example: drp_p4r9jsl305iduqrsl0ujdth35jhuy2al
                        type: string
                      droplet_name:
                        type: string
                      active:
                        type: boolean
                        default: true
                      created_at:
                        type: string
                        format: date-time
                    required:
                      - uuid
                      - id
                      - droplet_uuid
                      - droplet_name
                      - active
                      - created_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - droplet_installation
                  - meta
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '404':
          description: droplet not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                droplet_uuid:
                  type: string
              required:
                - droplet_uuid
  /api/droplet_installations/{uuid}:
    get:
      summary: Show a droplet installation
      tags:
        - Droplet Installations
      operationId: showDropletInstallation
      security:
        - bearer_auth: []
      parameters:
        - name: uuid
          in: path
          required: true
          description: The UUID of the droplet installation
          schema:
            type: string
      responses:
        '200':
          description: returns a single droplet installation
          content:
            application/json:
              schema:
                type: object
                properties:
                  droplet_installation:
                    title: DropletInstallation
                    type: object
                    properties:
                      uuid:
                        type: string
                      id:
                        type: integer
                      droplet_uuid:
                        example: drp_p4r9jsl305iduqrsl0ujdth35jhuy2al
                        type: string
                      droplet_name:
                        type: string
                      active:
                        type: boolean
                        default: true
                      authentication_token:
                        example: dit_1js8p2crwCzbkyRXjjccl8RDqCXYDnaDF
                        type: string
                      webhook_verification_token:
                        example: wvt_1js8p2crwCzbkyRXjjccl8RDqCXYDnaDF
                        type:
                          - string
                          - 'null'
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                    required:
                      - uuid
                      - id
                      - droplet_uuid
                      - droplet_name
                      - active
                      - authentication_token
                      - created_at
                      - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - droplet_installation
                  - meta
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '404':
          description: droplet installation not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
    put:
      summary: Update a droplet installation
      tags:
        - Droplet Installations
      operationId: updateDropletInstallation
      security:
        - bearer_auth: []
      parameters:
        - name: uuid
          in: path
          required: true
          description: The UUID of the droplet installation
          schema:
            type: string
      responses:
        '200':
          description: droplet installation updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  droplet_installation:
                    title: DropletInstallation
                    type: object
                    properties:
                      uuid:
                        type: string
                      id:
                        type: integer
                      droplet_uuid:
                        example: drp_p4r9jsl305iduqrsl0ujdth35jhuy2al
                        type: string
                      droplet_name:
                        type: string
                      active:
                        type: boolean
                        default: true
                      updated_at:
                        type: string
                        format: date-time
                    required:
                      - uuid
                      - id
                      - droplet_uuid
                      - droplet_name
                      - active
                      - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - droplet_installation
                  - meta
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '404':
          description: droplet installation not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                uuid:
                  type: string
                droplet_installation:
                  type: object
                  properties:
                    active:
                      type: boolean
                  required:
                    - active
              required:
                - uuid
                - droplet_installation
    delete:
      summary: Delete a droplet installation
      tags:
        - Droplet Installations
      operationId: destroyDropletInstallation
      security:
        - bearer_auth: []
      parameters:
        - name: uuid
          in: path
          required: true
          description: The UUID of the droplet installation
          schema:
            type: string
      responses:
        '200':
          description: droplet installation deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  droplet_installation:
                    title: DropletInstallation
                    type: object
                    properties:
                      uuid:
                        type: string
                      id:
                        type: integer
                    required:
                      - uuid
                      - id
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - droplet_installation
                  - meta
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '404':
          description: droplet installation not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
  /api/droplets/{uuid}/companies:
    get:
      summary: returns an array of companies using a droplet
      tags:
        - Droplets
      operationId: showDropletCompanies
      security:
        - bearer_auth: []
      parameters:
        - name: uuid
          in: path
          required: true
          schema:
            type: string
        - name: pagination
          in: query
          schema:
            type: object
            properties:
              page:
                type: integer
                exclusiveMinimum: 0
              per_page:
                type: integer
                exclusiveMinimum: 0
                maximum: 100
            required: []
      responses:
        '200':
          description: returns list of companies subscribed to the droplet
          content:
            application/json:
              schema:
                type: object
                properties:
                  companies:
                    type: array
                    items:
                      title: Company
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          example: Acme, Inc.
                          type: string
                        active:
                          type:
                            - boolean
                            - 'null'
                          default: true
                      required:
                        - id
                        - name
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            example: 1
                          total_pages:
                            type: integer
                            example: 10
                          total_count:
                            type: integer
                            example: 100
                          per_page:
                            type: integer
                            example: 10
        '401':
          description: unauthorized
  /api/droplets:
    get:
      summary: An array of available droplets
      tags:
        - Droplets
      operationId: indexDroplets
      security:
        - bearer_auth: []
      parameters:
        - name: pagination
          in: query
          schema:
            type: object
            properties:
              page:
                type: integer
                exclusiveMinimum: 0
              per_page:
                type: integer
                exclusiveMinimum: 0
                maximum: 100
              category:
                type: string
            required: []
      responses:
        '200':
          description: returns a list of droplets
          content:
            application/json:
              schema:
                type: object
                properties:
                  droplets:
                    type: array
                    items:
                      title: Droplet
                      type: object
                      properties:
                        uuid:
                          type: string
                        name:
                          type: string
                        categories:
                          items:
                            type: string
                          type: array
                        active:
                          type:
                            - boolean
                            - 'null'
                          default: false
                        publicly_available:
                          type:
                            - boolean
                            - 'null'
                          default: false
                        embed_url:
                          type:
                            - string
                            - 'null'
                        settings:
                          title: Droplet::Settings
                          type:
                            - object
                            - 'null'
                          properties:
                            marketplace_page:
                              title: Droplet::MarketplacePage
                              type:
                                - object
                                - 'null'
                              properties:
                                title:
                                  type: string
                                logo_url:
                                  type:
                                    - string
                                    - 'null'
                                summary:
                                  type:
                                    - string
                                    - 'null'
                              required:
                                - title
                            details_page:
                              title: Droplet::DetailsPage
                              type:
                                - object
                                - 'null'
                              properties:
                                title:
                                  type: string
                                logo_url:
                                  type:
                                    - string
                                    - 'null'
                                summary:
                                  type:
                                    - string
                                    - 'null'
                                features:
                                  type:
                                    - array
                                    - 'null'
                                  items:
                                    title: Droplet::Feature
                                    type: object
                                    properties:
                                      name:
                                        type: string
                                      summary:
                                        type:
                                          - string
                                          - 'null'
                                      details:
                                        type:
                                          - string
                                          - 'null'
                                      image_url:
                                        type:
                                          - string
                                          - 'null'
                                      video_url:
                                        type:
                                          - string
                                          - 'null'
                                    required:
                                      - name
                              required:
                                - title
                            service_operational_countries:
                              items:
                                type: string
                                pattern: ^[A-Z]{3}$
                                description: >-
                                  An array of ISO3 country codes for which the
                                  droplet is operational. A null value indicates
                                  that the service operates everywhere. An empty
                                  array indicates that the service operates
                                  nowhere.
                                example: '["USA", "CAN"]'
                              type:
                                - array
                                - 'null'
                          required: []
                      required:
                        - uuid
                        - name
                        - categories
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            example: 1
                          total_pages:
                            type: integer
                            example: 10
                          total_count:
                            type: integer
                            example: 100
                          per_page:
                            type: integer
                            example: 10
                required:
                  - droplets
                  - meta
    post:
      summary: creates a droplet
      tags:
        - Droplets
      operationId: createDroplet
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: droplet created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  droplet:
                    title: Droplet
                    type: object
                    properties:
                      uuid:
                        type: string
                      name:
                        type: string
                      categories:
                        items:
                          type: string
                        type: array
                      active:
                        type:
                          - boolean
                          - 'null'
                        default: false
                      publicly_available:
                        type:
                          - boolean
                          - 'null'
                        default: false
                      embed_url:
                        type:
                          - string
                          - 'null'
                      settings:
                        title: Droplet::Settings
                        type:
                          - object
                          - 'null'
                        properties:
                          marketplace_page:
                            title: Droplet::MarketplacePage
                            type:
                              - object
                              - 'null'
                            properties:
                              title:
                                type: string
                              logo_url:
                                type:
                                  - string
                                  - 'null'
                              summary:
                                type:
                                  - string
                                  - 'null'
                            required:
                              - title
                          details_page:
                            title: Droplet::DetailsPage
                            type:
                              - object
                              - 'null'
                            properties:
                              title:
                                type: string
                              logo_url:
                                type:
                                  - string
                                  - 'null'
                              summary:
                                type:
                                  - string
                                  - 'null'
                              features:
                                type:
                                  - array
                                  - 'null'
                                items:
                                  title: Droplet::Feature
                                  type: object
                                  properties:
                                    name:
                                      type: string
                                    summary:
                                      type:
                                        - string
                                        - 'null'
                                    details:
                                      type:
                                        - string
                                        - 'null'
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                    video_url:
                                      type:
                                        - string
                                        - 'null'
                                  required:
                                    - name
                            required:
                              - title
                          service_operational_countries:
                            items:
                              type: string
                              pattern: ^[A-Z]{3}$
                              description: >-
                                An array of ISO3 country codes for which the
                                droplet is operational. A null value indicates
                                that the service operates everywhere. An empty
                                array indicates that the service operates
                                nowhere.
                              example: '["USA", "CAN"]'
                            type:
                              - array
                              - 'null'
                        required: []
                      created_at:
                        type: string
                        format: date-time
                    required:
                      - uuid
                      - name
                      - categories
                      - created_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - droplet
                  - meta
        '422':
          description: invalid droplet parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                droplet:
                  type: object
                  properties:
                    name:
                      type: string
                      minLength: 1
                    embed_url:
                      type: string
                      minLength: 1
                    settings:
                      type: object
                      properties:
                        marketplace_page:
                          type: object
                          properties:
                            title:
                              type: string
                              minLength: 1
                            summary:
                              type: string
                              minLength: 1
                            logo_url:
                              type: string
                              minLength: 1
                          required: []
                        details_page:
                          type: object
                          properties:
                            title:
                              type: string
                              minLength: 1
                            summary:
                              type: string
                              minLength: 1
                            logo_url:
                              type: string
                              minLength: 1
                            features:
                              type: array
                              items:
                                type: object
                                properties:
                                  name:
                                    type: string
                                    minLength: 1
                                  summary:
                                    type: string
                                    minLength: 1
                                  details:
                                    type: string
                                    minLength: 1
                                  image_url:
                                    type: string
                                    minLength: 1
                                  video_url:
                                    type: string
                                    minLength: 1
                                required:
                                  - name
                                  - summary
                                  - details
                                  - image_url
                                  - video_url
                          required: []
                        service_operational_countries:
                          type: array
                          items:
                            type: string
                      required: []
                    categories:
                      type: array
                      items:
                        type: string
                  required:
                    - name
                    - embed_url
              required:
                - droplet
  /api/droplets/{uuid}:
    get:
      summary: shows a droplet
      tags:
        - Droplets
      operationId: showDroplet
      security:
        - bearer_auth: []
      parameters:
        - name: uuid
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: returns a single droplet
          content:
            application/json:
              schema:
                type: object
                properties:
                  droplet:
                    title: Droplet
                    type: object
                    properties:
                      uuid:
                        type: string
                      name:
                        type: string
                      categories:
                        items:
                          type: string
                        type: array
                      active:
                        type:
                          - boolean
                          - 'null'
                        default: false
                      publicly_available:
                        type:
                          - boolean
                          - 'null'
                        default: false
                      embed_url:
                        type:
                          - string
                          - 'null'
                      settings:
                        title: Droplet::Settings
                        type:
                          - object
                          - 'null'
                        properties:
                          marketplace_page:
                            title: Droplet::MarketplacePage
                            type:
                              - object
                              - 'null'
                            properties:
                              title:
                                type: string
                              logo_url:
                                type:
                                  - string
                                  - 'null'
                              summary:
                                type:
                                  - string
                                  - 'null'
                            required:
                              - title
                          details_page:
                            title: Droplet::DetailsPage
                            type:
                              - object
                              - 'null'
                            properties:
                              title:
                                type: string
                              logo_url:
                                type:
                                  - string
                                  - 'null'
                              summary:
                                type:
                                  - string
                                  - 'null'
                              features:
                                type:
                                  - array
                                  - 'null'
                                items:
                                  title: Droplet::Feature
                                  type: object
                                  properties:
                                    name:
                                      type: string
                                    summary:
                                      type:
                                        - string
                                        - 'null'
                                    details:
                                      type:
                                        - string
                                        - 'null'
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                    video_url:
                                      type:
                                        - string
                                        - 'null'
                                  required:
                                    - name
                            required:
                              - title
                          service_operational_countries:
                            items:
                              type: string
                              pattern: ^[A-Z]{3}$
                              description: >-
                                An array of ISO3 country codes for which the
                                droplet is operational. A null value indicates
                                that the service operates everywhere. An empty
                                array indicates that the service operates
                                nowhere.
                              example: '["USA", "CAN"]'
                            type:
                              - array
                              - 'null'
                        required: []
                    required:
                      - uuid
                      - name
                      - categories
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - droplet
                  - meta
        '404':
          description: droplet not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
    put:
      summary: updates a droplet
      tags:
        - Droplets
      operationId: updateDroplet
      security:
        - bearer_auth: []
      parameters:
        - name: uuid
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: droplet updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  droplet:
                    title: Droplet
                    type: object
                    properties:
                      uuid:
                        type: string
                      name:
                        type: string
                      categories:
                        items:
                          type: string
                        type: array
                      active:
                        type:
                          - boolean
                          - 'null'
                        default: false
                      publicly_available:
                        type:
                          - boolean
                          - 'null'
                        default: false
                      embed_url:
                        type:
                          - string
                          - 'null'
                      settings:
                        title: Droplet::Settings
                        type:
                          - object
                          - 'null'
                        properties:
                          marketplace_page:
                            title: Droplet::MarketplacePage
                            type:
                              - object
                              - 'null'
                            properties:
                              title:
                                type: string
                              logo_url:
                                type:
                                  - string
                                  - 'null'
                              summary:
                                type:
                                  - string
                                  - 'null'
                            required:
                              - title
                          details_page:
                            title: Droplet::DetailsPage
                            type:
                              - object
                              - 'null'
                            properties:
                              title:
                                type: string
                              logo_url:
                                type:
                                  - string
                                  - 'null'
                              summary:
                                type:
                                  - string
                                  - 'null'
                              features:
                                type:
                                  - array
                                  - 'null'
                                items:
                                  title: Droplet::Feature
                                  type: object
                                  properties:
                                    name:
                                      type: string
                                    summary:
                                      type:
                                        - string
                                        - 'null'
                                    details:
                                      type:
                                        - string
                                        - 'null'
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                    video_url:
                                      type:
                                        - string
                                        - 'null'
                                  required:
                                    - name
                            required:
                              - title
                          service_operational_countries:
                            items:
                              type: string
                              pattern: ^[A-Z]{3}$
                              description: >-
                                An array of ISO3 country codes for which the
                                droplet is operational. A null value indicates
                                that the service operates everywhere. An empty
                                array indicates that the service operates
                                nowhere.
                              example: '["USA", "CAN"]'
                            type:
                              - array
                              - 'null'
                        required: []
                      updated_at:
                        type: string
                        format: date-time
                    required:
                      - uuid
                      - name
                      - categories
                      - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - droplet
                  - meta
        '404':
          description: droplet not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: invalid droplet parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                uuid:
                  type: string
                  minLength: 1
                droplet:
                  type: object
                  properties:
                    name:
                      type: string
                      minLength: 1
                    embed_url:
                      type: string
                      minLength: 1
                    settings:
                      type: object
                      properties:
                        marketplace_page:
                          type: object
                          properties:
                            title:
                              type: string
                              minLength: 1
                            summary:
                              type: string
                              minLength: 1
                            logo_url:
                              type: string
                              minLength: 1
                          required: []
                        details_page:
                          type: object
                          properties:
                            title:
                              type: string
                              minLength: 1
                            summary:
                              type: string
                              minLength: 1
                            logo_url:
                              type: string
                              minLength: 1
                            features:
                              type: array
                              items:
                                type: object
                                properties:
                                  name:
                                    type: string
                                    minLength: 1
                                  summary:
                                    type: string
                                    minLength: 1
                                  details:
                                    type: string
                                    minLength: 1
                                  image_url:
                                    type: string
                                    minLength: 1
                                  video_url:
                                    type: string
                                    minLength: 1
                                required:
                                  - name
                                  - summary
                                  - details
                                  - image_url
                                  - video_url
                          required: []
                        service_operational_countries:
                          type: array
                          items:
                            type: string
                      required: []
                    categories:
                      type: array
                      items:
                        type: string
                  required: []
              required:
                - uuid
                - droplet
    delete:
      summary: deletes a droplet
      tags:
        - Droplets
      operationId: destroyDroplet
      security:
        - bearer_auth: []
      parameters:
        - name: uuid
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: droplet deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  droplet:
                    type: object
                    properties:
                      uuid:
                        type: string
                    required:
                      - uuid
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                required:
                  - droplet
                  - meta
        '404':
          description: droplet not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
  /api/enrollment_packs:
    get:
      summary: List all enrollment packs
      tags:
        - Enrollment Packs
      operationId: listEnrollmentPacks
      security:
        - bearer_auth: []
      parameters:
        - name: page
          in: query
          required: false
          description: Page number
          schema:
            type: integer
        - name: per_page
          in: query
          required: false
          description: Items per page
          schema:
            type: integer
        - name: sorted_by
          in: query
          required: false
          description: Sort order
          schema:
            type: string
        - name: search_query
          in: query
          required: false
          description: Search term
          schema:
            type: string
        - name: status
          in: query
          required: false
          description: Filter by status
          schema:
            type: string
        - name: with_country_id
          in: query
          schema:
            type: array
            items:
              type: integer
          required: false
          description: Filter by country IDs
        - name: language
          in: query
          required: false
          description: Language filter
          schema:
            type: string
      responses:
        '200':
          description: enrollment packs found
          content:
            application/json:
              schema:
                type: object
                properties:
                  enrollment_packs:
                    type: array
                    items:
                      type: object
                      required:
                        - enrollment_pack_id
                        - title
                        - active
                        - description
                        - enrollment_fee
                        - membership_after_one_month
                        - membership_optional
                        - status
                        - additional_volume
                      properties:
                        enrollment_pack_id:
                          type: integer
                        token:
                          type: string
                        title:
                          type: string
                        active:
                          type: boolean
                        description:
                          type: object
                          properties:
                            id:
                              type: integer
                            name:
                              type: string
                            body:
                              type: string
                            locale:
                              type: string
                            record_type:
                              type: string
                            record_id:
                              type: integer
                            created_at:
                              type: string
                              format: date-time
                            updated_at:
                              type: string
                              format: date-time
                        enrollment_fee:
                          type:
                            - string
                            - 'null'
                        membership_after_one_month:
                          type: boolean
                        membership_optional:
                          type: boolean
                        status:
                          type: string
                        additional_volume:
                          type:
                            - integer
                            - 'null'
                        application_theme_template_id:
                          type:
                            - integer
                            - 'null'
                        country_ids:
                          type: array
                          items:
                            type: integer
                        member_enrollable_products:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                              product_id:
                                type: integer
                        subscription_enrollable_products:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                              product_id:
                                type: integer
                        images:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                              image_url:
                                type: string
                              position:
                                type: integer
                        enrollment_pack_agreements:
                          type: array
                          items:
                            type: object
                            required:
                              - id
                              - agreement_id
                              - required
                            properties:
                              id:
                                type: integer
                              agreement_id:
                                type: integer
                              required:
                                type: boolean
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            example: 1
                          total_pages:
                            type: integer
                            example: 10
                          total_count:
                            type: integer
                            example: 100
                          per_page:
                            type: integer
                            example: 10
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
    post:
      summary: Create a new enrollment pack
      tags:
        - Enrollment Packs
      operationId: createEnrollmentPack
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: enrollment pack created
          content:
            application/json:
              schema:
                type: object
                properties:
                  enrollment_pack:
                    type: object
                    required:
                      - enrollment_pack_id
                      - title
                      - active
                      - description
                      - enrollment_fee
                      - membership_after_one_month
                      - membership_optional
                      - status
                      - additional_volume
                    properties:
                      enrollment_pack_id:
                        type: integer
                      token:
                        type: string
                      title:
                        type: string
                      active:
                        type: boolean
                      description:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          body:
                            type: string
                          locale:
                            type: string
                          record_type:
                            type: string
                          record_id:
                            type: integer
                          created_at:
                            type: string
                            format: date-time
                          updated_at:
                            type: string
                            format: date-time
                      enrollment_fee:
                        type:
                          - string
                          - 'null'
                      membership_after_one_month:
                        type: boolean
                      membership_optional:
                        type: boolean
                      status:
                        type: string
                      additional_volume:
                        type:
                          - integer
                          - 'null'
                      application_theme_template_id:
                        type:
                          - integer
                          - 'null'
                      country_ids:
                        type: array
                        items:
                          type: integer
                      member_enrollable_products:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            product_id:
                              type: integer
                      subscription_enrollable_products:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            product_id:
                              type: integer
                      images:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            image_url:
                              type: string
                            position:
                              type: integer
                      enrollment_pack_agreements:
                        type: array
                        items:
                          type: object
                          required:
                            - id
                            - agreement_id
                            - required
                          properties:
                            id:
                              type: integer
                            agreement_id:
                              type: integer
                            required:
                              type: boolean
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '422':
          description: invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                enrollment_pack:
                  type: object
                  properties:
                    title:
                      type: string
                      minLength: 1
                    description:
                      type: object
                      properties:
                        body:
                          type: string
                          minLength: 1
                      required:
                        - body
                    active:
                      type: boolean
                    membership_after_one_month:
                      type: boolean
                    membership_optional:
                      type: boolean
                    enrollment_fee:
                      type: number
                    application_theme_template_id:
                      type: integer
                    country_ids:
                      type: array
                      items:
                        type: integer
                    additional_volume:
                      type: integer
                    member_enrollable_products_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          product_id:
                            type: integer
                        required:
                          - product_id
                    subscription_enrollable_products_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          product_id:
                            type: integer
                        required:
                          - product_id
                    images_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          image_url:
                            type: string
                          position:
                            type: integer
                        required:
                          - image_url
                          - position
                    enrollment_pack_agreements:
                      type: array
                      items:
                        type: object
                        properties:
                          agreement_id:
                            type: integer
                          required:
                            type: boolean
                        required:
                          - agreement_id
                          - required
                  required:
                    - title
                    - description
              required:
                - enrollment_pack
  /api/enrollment_packs/bulk_status_update:
    patch:
      summary: Bulk update enrollment pack status
      tags:
        - Enrollment Packs
      operationId: bulkUpdateEnrollmentPackStatus
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: enrollment packs updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  updated_count:
                    type: integer
                  ids:
                    type: array
                    items:
                      type: integer
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '422':
          description: invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                ids:
                  type: array
                  items:
                    type: string
                status:
                  type: string
                  enum:
                    - active
                    - draft
              required:
                - ids
                - status
  /api/enrollment_packs/{id}:
    get:
      summary: Retrieves a specific enrollment pack
      tags:
        - Enrollment Packs
      operationId: getEnrollmentPack
      security:
        - bearer_auth: []
      responses:
        '200':
          description: enrollment pack found
          content:
            application/json:
              schema:
                type: object
                properties:
                  enrollment_pack:
                    type: object
                    required:
                      - enrollment_pack_id
                      - title
                      - active
                      - description
                      - enrollment_fee
                      - membership_after_one_month
                      - membership_optional
                      - status
                      - additional_volume
                    properties:
                      enrollment_pack_id:
                        type: integer
                      token:
                        type: string
                      title:
                        type: string
                      active:
                        type: boolean
                      description:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          body:
                            type: string
                          locale:
                            type: string
                          record_type:
                            type: string
                          record_id:
                            type: integer
                          created_at:
                            type: string
                            format: date-time
                          updated_at:
                            type: string
                            format: date-time
                      enrollment_fee:
                        type:
                          - string
                          - 'null'
                      membership_after_one_month:
                        type: boolean
                      membership_optional:
                        type: boolean
                      status:
                        type: string
                      additional_volume:
                        type:
                          - integer
                          - 'null'
                      application_theme_template_id:
                        type:
                          - integer
                          - 'null'
                      country_ids:
                        type: array
                        items:
                          type: integer
                      member_enrollable_products:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            product_id:
                              type: integer
                      subscription_enrollable_products:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            product_id:
                              type: integer
                      images:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            image_url:
                              type: string
                            position:
                              type: integer
                      enrollment_pack_agreements:
                        type: array
                        items:
                          type: object
                          required:
                            - id
                            - agreement_id
                            - required
                          properties:
                            id:
                              type: integer
                            agreement_id:
                              type: integer
                            required:
                              type: boolean
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '404':
          description: enrollment pack not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
    delete:
      summary: Delete an enrollment pack
      tags:
        - Enrollment Packs
      operationId: deleteEnrollmentPack
      security:
        - bearer_auth: []
      responses:
        '200':
          description: enrollment pack deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  enrollment_pack:
                    type: object
                    properties:
                      id:
                        type: integer
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '404':
          description: enrollment pack not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
    patch:
      summary: Update an enrollment pack
      tags:
        - Enrollment Packs
      operationId: updateEnrollmentPack
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: enrollment pack updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  enrollment_pack:
                    type: object
                    required:
                      - enrollment_pack_id
                      - title
                      - active
                      - description
                      - enrollment_fee
                      - membership_after_one_month
                      - membership_optional
                      - status
                      - additional_volume
                    properties:
                      enrollment_pack_id:
                        type: integer
                      token:
                        type: string
                      title:
                        type: string
                      active:
                        type: boolean
                      description:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          body:
                            type: string
                          locale:
                            type: string
                          record_type:
                            type: string
                          record_id:
                            type: integer
                          created_at:
                            type: string
                            format: date-time
                          updated_at:
                            type: string
                            format: date-time
                      enrollment_fee:
                        type:
                          - string
                          - 'null'
                      membership_after_one_month:
                        type: boolean
                      membership_optional:
                        type: boolean
                      status:
                        type: string
                      additional_volume:
                        type:
                          - integer
                          - 'null'
                      application_theme_template_id:
                        type:
                          - integer
                          - 'null'
                      country_ids:
                        type: array
                        items:
                          type: integer
                      member_enrollable_products:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            product_id:
                              type: integer
                      subscription_enrollable_products:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            product_id:
                              type: integer
                      images:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            image_url:
                              type: string
                            position:
                              type: integer
                      enrollment_pack_agreements:
                        type: array
                        items:
                          type: object
                          required:
                            - id
                            - agreement_id
                            - required
                          properties:
                            id:
                              type: integer
                            agreement_id:
                              type: integer
                            required:
                              type: boolean
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '404':
          description: enrollment pack not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  minLength: 1
                enrollment_pack:
                  type: object
                  properties:
                    title:
                      type: string
                      minLength: 1
                    description:
                      type: object
                      properties:
                        body:
                          type: string
                          minLength: 1
                      required:
                        - body
                    active:
                      type: boolean
                    membership_after_one_month:
                      type: boolean
                    membership_optional:
                      type: boolean
                    enrollment_fee:
                      type: number
                    application_theme_template_id:
                      type: integer
                    country_ids:
                      type: array
                      items:
                        type: integer
                    additional_volume:
                      type: integer
                    member_enrollable_products_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                          product_id:
                            type: integer
                          _destroy:
                            type: boolean
                        required:
                          - product_id
                    subscription_enrollable_products_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                          product_id:
                            type: integer
                          _destroy:
                            type: boolean
                        required:
                          - product_id
                    images_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                          image_url:
                            type: string
                          position:
                            type: integer
                          _destroy:
                            type: boolean
                        required:
                          - image_url
                          - position
                    enrollment_pack_agreements:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                          agreement_id:
                            type: integer
                          required:
                            type: boolean
                          _destroy:
                            type: boolean
                        required:
                          - agreement_id
                          - required
                  required: []
              required:
                - id
                - enrollment_pack
    parameters:
      - name: id
        in: path
        required: true
        description: Enrollment pack ID
        schema:
          type: string
  /api/enrollments/{enrollment_token}/field/{field_id}:
    post:
      summary: Create a field answer
      tags:
        - Enrollments
      operationId: createEnrollmentFieldAnswer
      parameters:
        - name: enrollment_token
          in: path
          required: true
          schema:
            type: string
        - name: field_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: enrollment field answer created
          content:
            application/json:
              schema:
                type: object
                properties:
                  enrollment_field_answer:
                    type: object
                    properties:
                      id:
                        type:
                          - number
                          - string
                        example: 23
                      response:
                        type: string
                        example: SSN-123-45-6789
                      form_element_id:
                        type:
                          - number
                          - string
                        example: 12
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2025-02-03T08:04:10Z'
        '404':
          description: enrollment not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    properties:
                      field:
                        type: array
                        items:
                          type: string
                        example:
                          - 'Not found. field_id: 123'
                      enrollment:
                        type: array
                        items:
                          type: string
                        example:
                          - 'Not found. token: 123'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2025-02-03T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                answer:
                  type: string
                  example: 123-45-6789
        required: true
  /api/enrollments/{enrollment_token}/answer/{field_answer_id}:
    patch:
      summary: Update a field answer
      tags:
        - Enrollments
      operationId: updateEnrollmentFieldAnswer
      parameters:
        - name: enrollment_token
          in: path
          required: true
          schema:
            type: string
        - name: field_answer_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: enrollment field answer updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  enrollment_field_answer:
                    type: object
                    properties:
                      id:
                        type:
                          - number
                          - string
                        example: 23
                      response:
                        type: string
                        example: SSN-123-45-6789
                      form_element_id:
                        type:
                          - number
                          - string
                        example: 12
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2025-02-03T08:04:10Z'
        '404':
          description: enrollment field answer not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    properties:
                      field_answer:
                        type: array
                        items:
                          type: string
                        example:
                          - 'Not found. field_answer_id: 123'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2025-02-03T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                answer:
                  type: string
                  example: Jane Kelly
        required: true
  /api/enrollments/{enrollment_token}/file/{field_id}:
    post:
      summary: Create a field answer with a file
      tags:
        - Enrollments
      operationId: createEnrollmentFileFieldAnswer
      parameters:
        - name: enrollment_token
          in: path
          required: true
          schema:
            type: string
        - name: field_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: enrollment file field answer created
          content:
            application/json:
              schema:
                type: object
                properties:
                  enrollment_field_answer:
                    type: object
                    properties:
                      id:
                        type:
                          - number
                          - string
                        example: 23
                      response:
                        type: string
                        example: SSN-123-45-6789
                      form_element_id:
                        type:
                          - number
                          - string
                        example: 12
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2025-02-03T08:04:10Z'
        '404':
          description: enrollment not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    properties:
                      enrollment:
                        type: array
                        items:
                          type: string
                        example:
                          - 'Not found. token: 123'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2025-02-03T08:04:10Z'
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: All image file types, tiff and pdf.
              required:
                - file
        required: true
  /api/enrollments/{enrollment_token}:
    get:
      summary: Get enrollment with fields and answers
      tags:
        - Enrollments
      operationId: getEnrollmentWithFieldsAndAnswers
      parameters:
        - name: enrollment_token
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: enrollment found
          content:
            application/json:
              schema:
                type: object
                properties:
                  enroll:
                    type: object
                    properties:
                      title:
                        type: string
                        example: Must fill out this enrollment
                  enrollment:
                    type: object
                    properties:
                      state:
                        type: string
                        enum:
                          - complete
                          - incomplete
                        example: complete
                      enrollment_fields:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type:
                                - number
                                - string
                              example: 1
                            field_type:
                              type: string
                              example: input
                            title:
                              type: string
                              example: Title
                            metadata:
                              type:
                                - string
                                - 'null'
                              example: >-
                                {"label":"Name","required":true,"targetIndex":2,"element_type":"file_upload","translations":[],"is_form_field":true,"auto_translate":true,"field_data_value":""}
                            placement:
                              type: string
                              enum:
                                - general
                                - post_purchase
                                - pre_purchase
                              example: post_purchase
                            order:
                              type:
                                - number
                                - 'null'
                              example: 1
                            response:
                              type:
                                - string
                                - 'null'
                              example: Jane Kelly
                            field_answer_id:
                              type:
                                - number
                                - 'null'
                              example: 10
                  company:
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        type: string
                      primary_domain_hostname:
                        type:
                          - string
                          - 'null'
                        example: fluid.com
                      subdomain:
                        type:
                          - string
                          - 'null'
                        example: myco
                      logo_url:
                        type:
                          - string
                          - 'null'
                        example: https://example.com/logo.png
                      fluid_shop:
                        type:
                          - string
                          - 'null'
                        example: https://fluid-sample-shop.fluid.com
                      collect_phone:
                        type:
                          - boolean
                          - 'null'
                        example: true
                      require_phone:
                        type:
                          - boolean
                          - 'null'
                        example: false
                      require_billing_zip:
                        type:
                          - boolean
                          - 'null'
                        example: false
                      checkout_primary_button_color:
                        type:
                          - string
                          - 'null'
                        example: '#000000'
                      checkout_primary_text_color:
                        type:
                          - string
                          - 'null'
                        example: '#FFFFFF'
                      checkout_secondary_button_color:
                        type:
                          - string
                          - 'null'
                        example: '#FFFFFF'
                      checkout_secondary_text_color:
                        type:
                          - string
                          - 'null'
                        example: '#000000'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2025-02-03T08:04:10Z'
  /api/settings/fantasy_points:
    get:
      summary: Get fantasy points configuration
      tags:
        - Fantasy Points
      security:
        - bearer_auth: []
      responses:
        '200':
          description: fantasy points configuration found
          content:
            application/json:
              examples:
                success_response:
                  value:
                    id: 96778814
                    fantasy_call_points:
                      points: 5
                      description: When a user clicks to call someone from the CRM.
                    fantasy_email_points:
                      points: 3
                      description: When a user clicks to email a contact from the CRM.
                    fantasy_order_points:
                      points: 25
                      description: Given to affiliate when a sample order is finalized.
                    fantasy_direct_share_points:
                      points: 5
                      description: Given when when a SmartLink is opened by a visitor.
                    fantasy_share_views_points:
                      points: 1
                      description: Given for every unique general share view.
                    fantasy_new_contact_points:
                      points: 10
                      description: New contact (or lead) added to the CRM.
                    fantasy_upload_points:
                      points: 15
                      description: Earned when an upload from a user is shared.
                    fantasy_training_points:
                      points: 3
                      description: When a training video is watched and completed.
                    fantasy_enroll_points:
                      points: 50
                      description: Points earned when someone enrolls.
                    fantasy_new_customer_points:
                      points: 5
                      description: Points earned when a new customer is added.
                    fantasy_purchase_from_app_points:
                      points: 5
                      description: Points earned when a purchase is made from the app.
                    meta:
                      request_id: 4f785c75-ba10-4169-9d86-cc30df3dacc5
                      timestamp: '2025-05-28T08:26:49Z'
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    example: 96778814
                  fantasy_call_points:
                    type: object
                    properties:
                      points:
                        type: integer
                        example: 5
                      description:
                        type: string
                        example: When a user clicks to call someone from the CRM.
                  fantasy_email_points:
                    type: object
                    properties:
                      points:
                        type: integer
                        example: 3
                      description:
                        type: string
                        example: When a user clicks to email a contact from the CRM.
                  fantasy_order_points:
                    type: object
                    properties:
                      points:
                        type: integer
                        example: 25
                      description:
                        type: string
                        example: Given to affiliate when a sample order is finalized.
                  fantasy_direct_share_points:
                    type: object
                    properties:
                      points:
                        type: integer
                        example: 5
                      description:
                        type: string
                        example: Given when when a SmartLink is opened by a visitor.
                  fantasy_share_views_points:
                    type: object
                    properties:
                      points:
                        type: integer
                        example: 1
                      description:
                        type: string
                        example: Given for every unique general share view.
                  fantasy_new_contact_points:
                    type: object
                    properties:
                      points:
                        type: integer
                        example: 10
                      description:
                        type: string
                        example: New contact (or lead) added to the CRM.
                  fantasy_upload_points:
                    type: object
                    properties:
                      points:
                        type: integer
                        example: 15
                      description:
                        type: string
                        example: Earned when an upload from a user is shared.
                  fantasy_training_points:
                    type: object
                    properties:
                      points:
                        type: integer
                        example: 3
                      description:
                        type: string
                        example: When a training video is watched and completed.
                  fantasy_enroll_points:
                    type: object
                    properties:
                      points:
                        type: integer
                        example: 50
                      description:
                        type: string
                        example: Points earned when someone enrolls.
                  fantasy_new_customer_points:
                    type: object
                    properties:
                      points:
                        type: integer
                        example: 5
                      description:
                        type: string
                        example: Points earned when a new customer is added.
                  fantasy_purchase_from_app_points:
                    type: object
                    properties:
                      points:
                        type: integer
                        example: 5
                      description:
                        type: string
                        example: Points earned when a purchase is made from the app.
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 4f785c75-ba10-4169-9d86-cc30df3dacc5
                      timestamp:
                        type: string
                        example: '2025-05-28T08:26:49Z'
        '401':
          description: unauthorized
          content:
            application/json:
              examples:
                unauthorized_response:
                  value:
                    message: Invalid credentials.
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Invalid credentials.
    put:
      summary: Update fantasy points configuration
      tags:
        - Fantasy Points
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: fantasy points configuration updated - training points
          content:
            application/json:
              examples:
                update_success_response:
                  value:
                    fantasy_call_points:
                      points: 10
                      description: When a user clicks to call someone from the CRM.
                    meta:
                      request_id: 0ab310b9-345d-4d59-8a90-d332e7163eab
                      timestamp: '2025-05-28T08:26:49Z'
                update_training_points_response:
                  value:
                    fantasy_training_points:
                      points: 25
                      description: When a training video is watched and completed.
                    meta:
                      request_id: 6ecb9167-422e-455c-a514-fb88fb6fd088
                      timestamp: '2025-05-28T08:26:49Z'
              schema:
                type: object
                properties:
                  fantasy_call_points:
                    type: object
                    properties:
                      points:
                        type: integer
                        example: 10
                      description:
                        type: string
                        example: When a user clicks to call someone from the CRM.
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 6ecb9167-422e-455c-a514-fb88fb6fd088
                      timestamp:
                        type: string
                        example: '2025-05-28T08:26:49Z'
                  fantasy_training_points:
                    type: object
                    properties:
                      points:
                        type: integer
                        example: 25
                      description:
                        type: string
                        example: When a training video is watched and completed.
        '401':
          description: unauthorized
          content:
            application/json:
              examples:
                unauthorized_response:
                  value:
                    message: Invalid credentials.
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Invalid credentials.
        '422':
          description: invalid request
          content:
            application/json:
              examples:
                validation_error_response:
                  value:
                    error_message: Invalid parameters
                    errors:
                      fantasy_call_points:
                        - must be greater than 0
                    meta:
                      request_id: 7c28e974-3643-42d8-8efd-514d9f606061
                      timestamp: '2025-05-28T08:26:50Z'
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Invalid parameters
                  errors:
                    type: object
                    properties:
                      fantasy_call_points:
                        type: array
                        items:
                          type: string
                        example:
                          - must be greater than 0
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 7c28e974-3643-42d8-8efd-514d9f606061
                      timestamp:
                        type: string
                        example: '2025-05-28T08:26:50Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              oneOf:
                - type: object
                  properties:
                    fantasy_call_points:
                      type: integer
                      example: 5
                  required:
                    - fantasy_call_points
                - type: object
                  properties:
                    fantasy_email_points:
                      type: integer
                      example: 3
                  required:
                    - fantasy_email_points
                - type: object
                  properties:
                    fantasy_order_points:
                      type: integer
                      example: 25
                  required:
                    - fantasy_order_points
                - type: object
                  properties:
                    fantasy_direct_share_points:
                      type: integer
                      example: 5
                  required:
                    - fantasy_direct_share_points
                - type: object
                  properties:
                    fantasy_share_views_points:
                      type: integer
                      example: 1
                  required:
                    - fantasy_share_views_points
                - type: object
                  properties:
                    fantasy_new_contact_points:
                      type: integer
                      example: 10
                  required:
                    - fantasy_new_contact_points
                - type: object
                  properties:
                    fantasy_upload_points:
                      type: integer
                      example: 15
                  required:
                    - fantasy_upload_points
                - type: object
                  properties:
                    fantasy_training_points:
                      type: integer
                      example: 3
                  required:
                    - fantasy_training_points
                - type: object
                  properties:
                    fantasy_enroll_points:
                      type: integer
                      example: 50
                  required:
                    - fantasy_enroll_points
                - type: object
                  properties:
                    fantasy_new_customer_points:
                      type: integer
                      example: 5
                  required:
                    - fantasy_new_customer_points
                - type: object
                  properties:
                    fantasy_purchase_from_app_points:
                      type: integer
                      example: 5
                  required:
                    - fantasy_purchase_from_app_points
              description: Must contain exactly one fantasy point parameter
  /api/file_resources:
    get:
      summary: Returns a list of file resources
      tags:
        - File Resources
      operationId: listFileResources
      security:
        - bearer_auth: []
      parameters:
        - name: pagination
          in: query
          schema:
            type: object
            properties:
              page:
                type: integer
              per_page:
                type: integer
              search_query:
                type: string
              sorted_by:
                type: string
              size_greater_than:
                type: string
              size_less_than:
                type: string
              with_types:
                type: array
                items:
                  type: string
            required: []
      responses:
        '200':
          description: returns list of file resources
          content:
            application/json:
              schema:
                type: object
                properties:
                  file_resources:
                    type: array
                    items:
                      title: FileResource
                      type: object
                      properties:
                        id:
                          type: integer
                        url:
                          type: string
                        preview_image_url:
                          type:
                            - string
                            - 'null'
                        filename:
                          type: string
                        alt_text:
                          type:
                            - string
                            - 'null'
                        handle:
                          type:
                            - string
                            - 'null'
                        content_type:
                          type: string
                        content_size:
                          type: integer
                        content:
                          type:
                            - string
                            - 'null'
                        relateable_id:
                          type:
                            - integer
                            - 'null'
                        relateable_type:
                          type:
                            - string
                            - 'null'
                        metadata:
                          type:
                            - object
                            - 'null'
                          default: '{}'
                        created_at:
                          type: string
                          format: date-time
                        updated_at:
                          type: string
                          format: date-time
                        version:
                          example: '1'
                          type:
                            - string
                            - 'null'
                        non_binary:
                          example: true
                          type: boolean
                        references_count:
                          example:
                            ApplicationThemeTemplate: 2
                          type: object
                      required:
                        - id
                        - url
                        - filename
                        - content_type
                        - content_size
                        - created_at
                        - updated_at
                        - non_binary
                        - references_count
                  meta:
                    type: object
                    properties:
                      total_count:
                        type: integer
                      total_pages:
                        type: integer
                      current_page:
                        type: integer
                      request_id:
                        type: string
                      timestamp:
                        type: string
        '401':
          description: unauthorized
    post:
      summary: Creates a file resource
      tags:
        - File Resources
      operationId: createFileResource
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: file resource created
          content:
            application/json:
              schema:
                type: object
                properties:
                  file_resource:
                    title: FileResource
                    type: object
                    properties:
                      id:
                        type: integer
                      url:
                        type: string
                      preview_image_url:
                        type:
                          - string
                          - 'null'
                      filename:
                        type: string
                      alt_text:
                        type:
                          - string
                          - 'null'
                      handle:
                        type:
                          - string
                          - 'null'
                      content_type:
                        type: string
                      content_size:
                        type: integer
                      content:
                        type:
                          - string
                          - 'null'
                      relateable_id:
                        type:
                          - integer
                          - 'null'
                      relateable_type:
                        type:
                          - string
                          - 'null'
                      metadata:
                        type:
                          - object
                          - 'null'
                        default: '{}'
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                      version:
                        example: '1'
                        type:
                          - string
                          - 'null'
                      non_binary:
                        example: true
                        type: boolean
                      references_count:
                        example:
                          ApplicationThemeTemplate: 2
                        type: object
                    required:
                      - id
                      - url
                      - filename
                      - content_type
                      - content_size
                      - created_at
                      - updated_at
                      - non_binary
                      - references_count
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
        '422':
          description: invalid parameters
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                file_resource:
                  title: FileResource
                  type: object
                  properties:
                    id:
                      type: integer
                    url:
                      type: string
                    preview_image_url:
                      type:
                        - string
                        - 'null'
                    filename:
                      type: string
                    alt_text:
                      type:
                        - string
                        - 'null'
                    handle:
                      type:
                        - string
                        - 'null'
                    content_type:
                      type: string
                    content_size:
                      type: integer
                    content:
                      type:
                        - string
                        - 'null'
                    relateable_id:
                      type:
                        - integer
                        - 'null'
                    relateable_type:
                      type:
                        - string
                        - 'null'
                    metadata:
                      type:
                        - object
                        - 'null'
                      default: '{}'
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
                    version:
                      example: '1'
                      type:
                        - string
                        - 'null'
                    non_binary:
                      example: true
                      type: boolean
                    references_count:
                      example:
                        ApplicationThemeTemplate: 2
                      type: object
                  required:
                    - id
                    - url
                    - filename
                    - content_type
                    - content_size
                    - created_at
                    - updated_at
                    - non_binary
                    - references_count
              required:
                - file_resource
  /api/file_resources/{id}:
    get:
      summary: Shows a file resource
      tags:
        - File Resources
      operationId: showFileResource
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: returns a single file resource
          content:
            application/json:
              schema:
                type: object
                properties:
                  file_resource:
                    title: FileResource
                    type: object
                    properties:
                      id:
                        type: integer
                      url:
                        type: string
                      preview_image_url:
                        type:
                          - string
                          - 'null'
                      filename:
                        type: string
                      alt_text:
                        type:
                          - string
                          - 'null'
                      handle:
                        type:
                          - string
                          - 'null'
                      content_type:
                        type: string
                      content_size:
                        type: integer
                      content:
                        type:
                          - string
                          - 'null'
                      relateable_id:
                        type:
                          - integer
                          - 'null'
                      relateable_type:
                        type:
                          - string
                          - 'null'
                      metadata:
                        type:
                          - object
                          - 'null'
                        default: '{}'
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                      version:
                        example: '1'
                        type:
                          - string
                          - 'null'
                      non_binary:
                        example: true
                        type: boolean
                      references_count:
                        example:
                          ApplicationThemeTemplate: 2
                        type: object
                    required:
                      - id
                      - url
                      - filename
                      - content_type
                      - content_size
                      - created_at
                      - updated_at
                      - non_binary
                      - references_count
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
        '404':
          description: file resource not found
    patch:
      summary: Updates a file resource
      tags:
        - File Resources
      operationId: updateFileResource
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: file resource updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  file_resource:
                    title: FileResource
                    type: object
                    properties:
                      id:
                        type: integer
                      url:
                        type: string
                      preview_image_url:
                        type:
                          - string
                          - 'null'
                      filename:
                        type: string
                      alt_text:
                        type:
                          - string
                          - 'null'
                      handle:
                        type:
                          - string
                          - 'null'
                      content_type:
                        type: string
                      content_size:
                        type: integer
                      content:
                        type:
                          - string
                          - 'null'
                      relateable_id:
                        type:
                          - integer
                          - 'null'
                      relateable_type:
                        type:
                          - string
                          - 'null'
                      metadata:
                        type:
                          - object
                          - 'null'
                        default: '{}'
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                      version:
                        example: '1'
                        type:
                          - string
                          - 'null'
                      non_binary:
                        example: true
                        type: boolean
                      references_count:
                        example:
                          ApplicationThemeTemplate: 2
                        type: object
                    required:
                      - id
                      - url
                      - filename
                      - content_type
                      - content_size
                      - created_at
                      - updated_at
                      - non_binary
                      - references_count
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
        '404':
          description: file resource not found
        '422':
          description: invalid parameters
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                file_resource:
                  title: FileResource
                  type: object
                  properties:
                    id:
                      type: integer
                    url:
                      type: string
                    preview_image_url:
                      type:
                        - string
                        - 'null'
                    filename:
                      type: string
                    alt_text:
                      type:
                        - string
                        - 'null'
                    handle:
                      type:
                        - string
                        - 'null'
                    content_type:
                      type: string
                    content_size:
                      type: integer
                    content:
                      type:
                        - string
                        - 'null'
                    relateable_id:
                      type:
                        - integer
                        - 'null'
                    relateable_type:
                      type:
                        - string
                        - 'null'
                    metadata:
                      type:
                        - object
                        - 'null'
                      default: '{}'
                    created_at:
                      type: string
                      format: date-time
                    updated_at:
                      type: string
                      format: date-time
                    version:
                      example: '1'
                      type:
                        - string
                        - 'null'
                    non_binary:
                      example: true
                      type: boolean
                    references_count:
                      example:
                        ApplicationThemeTemplate: 2
                      type: object
                  required:
                    - id
                    - url
                    - filename
                    - content_type
                    - content_size
                    - created_at
                    - updated_at
                    - non_binary
                    - references_count
              required:
                - file_resource
    delete:
      summary: Deletes a file resource
      tags:
        - File Resources
      operationId: destroyFileResource
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: file resource deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
        '404':
          description: file resource not found
  /api/file_resources/bulk_create:
    post:
      summary: Creates multiple file resources
      tags:
        - File Resources
      operationId: bulkCreateFileResources
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: file resources created
          content:
            application/json:
              schema:
                type: object
                properties:
                  file_resources:
                    type: array
                    items:
                      title: FileResource
                      type: object
                      properties:
                        id:
                          type: integer
                        url:
                          type: string
                        preview_image_url:
                          type:
                            - string
                            - 'null'
                        filename:
                          type: string
                        alt_text:
                          type:
                            - string
                            - 'null'
                        handle:
                          type:
                            - string
                            - 'null'
                        content_type:
                          type: string
                        content_size:
                          type: integer
                        content:
                          type:
                            - string
                            - 'null'
                        relateable_id:
                          type:
                            - integer
                            - 'null'
                        relateable_type:
                          type:
                            - string
                            - 'null'
                        metadata:
                          type:
                            - object
                            - 'null'
                          default: '{}'
                        created_at:
                          type: string
                          format: date-time
                        updated_at:
                          type: string
                          format: date-time
                        version:
                          example: '1'
                          type:
                            - string
                            - 'null'
                        non_binary:
                          example: true
                          type: boolean
                        references_count:
                          example:
                            ApplicationThemeTemplate: 2
                          type: object
                      required:
                        - id
                        - url
                        - filename
                        - content_type
                        - content_size
                        - created_at
                        - updated_at
                        - non_binary
                        - references_count
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
        '422':
          description: invalid parameters
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                file_resources:
                  type: object
              required:
                - file_resources
  /api/file_resources/bulk_destroy:
    delete:
      summary: Deletes multiple file resources
      tags:
        - File Resources
      operationId: bulkDestroyFileResources
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: file resources deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  ids:
                    type: array
                    items:
                      type: integer
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                      destroyed_count:
                        type: integer
        '422':
          description: invalid parameters
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                ids:
                  type: array
                  items:
                    type: integer
              required:
                - ids
  /api/fluid_pay/payment_methods:
    get:
      summary: Retrieves payment methods for a customer
      tags:
        - Fluid Pay
      operationId: getFluidPayPaymentMethods
      parameters:
        - name: jwt
          in: query
          required: true
          description: JWT token containing customer authentication
          schema:
            type: string
        - name: page
          in: query
          required: false
          description: Page number
          schema:
            type: integer
        - name: per_page
          in: query
          required: false
          description: Number of items per page
          schema:
            type: integer
      responses:
        '200':
          description: payment methods retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  fluid_pay_account:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123
                      default_payment_method_id:
                        type: integer
                        example: 456
                    required:
                      - id
                      - default_payment_method_id
                  payment_methods:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 123
                        source:
                          type: string
                          example: card
                        default:
                          type: boolean
                          example: true
                        payment_type:
                          type: string
                          example: Credit Card
                        details:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 123
                            type:
                              type: string
                              example: CreditCard
                            card_type:
                              type:
                                - string
                                - 'null'
                              example: visa
                            card_brand:
                              type:
                                - string
                                - 'null'
                              example: Visa
                            last4_digits:
                              type:
                                - string
                                - 'null'
                              example: '6789'
                              description: Deprecated
                            last_four:
                              type:
                                - string
                                - 'null'
                              example: '6789'
                            exp_month:
                              type:
                                - string
                                - 'null'
                              example: '12'
                            exp_year:
                              type:
                                - string
                                - 'null'
                              example: '2025'
                            logo_url:
                              type:
                                - string
                                - 'null'
                              example: >-
                                https://assets.fluid.app/images/payment_icons/visa.svg
                        created_at:
                          type: string
                          format: date-time
                          example: '2021-01-01T00:00:00Z'
                        updated_at:
                          type: string
                          format: date-time
                          example: '2021-01-01T00:00:00Z'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        format: date-time
                        example: '2021-01-01T00:00:00Z'
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            example: 1
                          total_pages:
                            type: integer
                            example: 1
                          total_count:
                            type: integer
                            example: 1
                          per_page:
                            type: integer
                            example: 10
                required:
                  - fluid_pay_account
                  - payment_methods
                  - meta
        '400':
          description: missing JWT token
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: JWT is required
        '401':
          description: expired JWT token
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Token has expired
        '404':
          description: customer not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Customer not found
  /api/fluid_pay/addresses:
    get:
      summary: Retrieves addresses for a customer
      tags:
        - Fluid Pay
      operationId: getFluidPayAddresses
      parameters:
        - name: jwt
          in: query
          required: true
          description: JWT token containing customer authentication
          schema:
            type: string
        - name: page
          in: query
          required: false
          description: Page number
          schema:
            type: integer
        - name: per_page
          in: query
          required: false
          description: Number of items per page
          schema:
            type: integer
      responses:
        '200':
          description: addresses retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  fluid_pay_account:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123
                      default_address_id:
                        type: integer
                        example: 456
                    required:
                      - id
                      - default_address_id
                  addresses:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 123
                        name:
                          type: string
                          example: My Home Address
                        first_name:
                          type: string
                          example: My
                        last_name:
                          type: string
                          example: Address
                        address1:
                          type: string
                          example: 123 Main St
                        address2:
                          type:
                            - string
                            - 'null'
                          example: Apt 1
                        address3:
                          type:
                            - string
                            - 'null'
                          example: Block 123
                        city:
                          type: string
                          example: Carrollton
                        state:
                          type: string
                          example: TX
                        postal_code:
                          type: string
                          example: '75007'
                        subdivision_code:
                          type:
                            - string
                            - 'null'
                          example: TX
                        country_code:
                          type: string
                          example: US
                        default:
                          type: boolean
                          example: false
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        format: date-time
                        example: '2021-01-01T00:00:00Z'
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            example: 1
                          total_pages:
                            type: integer
                            example: 1
                          total_count:
                            type: integer
                            example: 1
                          per_page:
                            type: integer
                            example: 10
                required:
                  - fluid_pay_account
                  - addresses
                  - meta
        '400':
          description: missing JWT token
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: JWT is required
        '401':
          description: expired JWT token
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Token has expired
  /api/fluid_pay/create_address:
    post:
      summary: Creates a new address for fluid pay account
      tags:
        - Fluid Pay
      operationId: createFluidPayAddress
      parameters:
        - name: jwt
          in: query
          required: true
          description: JWT token containing customer authentication
          example: eyJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJjdX...
          schema:
            type: string
      responses:
        '201':
          description: address created
          content:
            application/json:
              schema:
                type: object
                properties:
                  fluid_pay_account:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                    required:
                      - id
                  address:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 980190974
                      address1:
                        type: string
                        example: 5833 Dottie Rapids
                      address2:
                        type:
                          - string
                          - 'null'
                        example: 521 Lupine Dr
                      address3:
                        type:
                          - string
                          - 'null'
                        example: 84555 Christiansen Grove
                      city:
                        type: string
                        example: San Jose
                      country_code:
                        type:
                          - string
                          - 'null'
                        example: US
                      default:
                        type: boolean
                        example: false
                      name:
                        type:
                          - string
                          - 'null'
                        example: Mitchell Stream
                      postal_code:
                        type: string
                        example: ''
                      state:
                        type: string
                        example: Rancho Palos Verdes
                      subdivision_code:
                        type:
                          - string
                          - 'null'
                        example: 1231
                      first_name:
                        type:
                          - string
                          - 'null'
                        example: Mitchell
                      last_name:
                        type:
                          - string
                          - 'null'
                        example: Stream
                    required:
                      - id
                      - address2
                      - city
                      - state
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - fluid_pay_account
                  - address
                  - meta
        '422':
          description: validation errors
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unprocessable entity
                  errors:
                    type: object
                    properties:
                      address:
                        type: array
                        items:
                          type: string
                          example: already exists
                    example:
                      address:
                        - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2025-02-03T08:04:10Z'
                required:
                  - error_message
                  - errors
                  - meta
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                address:
                  type: object
                  properties:
                    first_name:
                      type: string
                      example: John
                    last_name:
                      type: string
                      example: Doe
                    address1:
                      type: string
                      example: 123 Main St
                    address2:
                      type: string
                      example: Apt 4B
                    city:
                      type: string
                      example: Boise
                    state:
                      type: string
                      example: ID
                    postal_code:
                      type: string
                      example: '83702'
                    country_code:
                      type: string
                      example: US
                    default:
                      type: boolean
                      example: false
                  required:
                    - address1
                    - city
                    - state
                    - postal_code
        required: true
  /api/fluid_pay/update_address/{address_id}:
    patch:
      summary: Updates an existing address
      tags:
        - Fluid Pay
      operationId: updateFluidPayAddress
      parameters:
        - name: jwt
          in: query
          required: true
          description: JWT token containing customer authentication
          example: eyJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJjdX...
          schema:
            type: string
        - name: address_id
          in: path
          required: true
          description: ID of the existing address to update
          example: 123
          schema:
            type: integer
      responses:
        '200':
          description: address updated with existing id
          content:
            application/json:
              schema:
                type: object
                properties:
                  fluid_pay_account:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                    required:
                      - id
                  address:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 980190974
                      address1:
                        type: string
                        example: 5833 Dottie Rapids
                      address2:
                        type:
                          - string
                          - 'null'
                        example: 521 Lupine Dr
                      address3:
                        type:
                          - string
                          - 'null'
                        example: 84555 Christiansen Grove
                      city:
                        type: string
                        example: San Jose
                      country_code:
                        type:
                          - string
                          - 'null'
                        example: US
                      default:
                        type: boolean
                        example: false
                      name:
                        type:
                          - string
                          - 'null'
                        example: Mitchell Stream
                      postal_code:
                        type: string
                        example: ''
                      state:
                        type: string
                        example: Rancho Palos Verdes
                      subdivision_code:
                        type:
                          - string
                          - 'null'
                        example: 1231
                      first_name:
                        type:
                          - string
                          - 'null'
                        example: Mitchell
                      last_name:
                        type:
                          - string
                          - 'null'
                        example: Stream
                    required:
                      - id
                      - address2
                      - city
                      - state
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - fluid_pay_account
                  - address
                  - meta
        '404':
          description: address not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    properties:
                      address:
                        type: array
                        items:
                          type: string
                          example: not found
                    example:
                      address:
                        - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2025-02-03T08:04:10Z'
                required:
                  - error_message
                  - errors
                  - meta
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                address:
                  type: object
                  properties:
                    address1:
                      type: string
                      example: 123 Main St
                    address2:
                      type: string
                      example: Apt 4B
                    city:
                      type: string
                      example: Kathmandu
                    state:
                      type: string
                      example: Bagmati
                    postal_code:
                      type: string
                      example: '44600'
                    country_id:
                      type: integer
                      example: 1
                    country_code:
                      type: string
                      example: NP
                    first_name:
                      type: string
                      example: John
                    last_name:
                      type: string
                      example: Doe
                    default:
                      type: boolean
                      example: false
                  required:
                    - address1
                    - city
                    - state
                    - postal_code
        required: true
  /api/fluid_pay/delete_address/{address_id}:
    delete:
      summary: Deletes an existing address
      tags:
        - Fluid Pay
      operationId: deleteFluidPayAddress
      parameters:
        - name: jwt
          in: query
          required: true
          description: JWT token containing customer authentication
          example: eyJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJjdX...
          schema:
            type: string
        - name: address_id
          in: path
          required: true
          description: ID of the existing address to delete
          example: 123
          schema:
            type: integer
      responses:
        '200':
          description: address deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Address removed
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2025-02-03T08:04:10Z'
                required:
                  - message
                  - meta
  /api/fluid_pay/create_payment_method:
    post:
      summary: Creates a new payment method
      tags:
        - Fluid Pay
      operationId: createFluidPayPaymentMethod
      parameters:
        - name: jwt
          in: query
          required: true
          description: JWT token containing customer authentication
          example: eyJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJjdX...
          schema:
            type: string
        - name: type
          in: query
          required: true
          description: Type of payment method
          schema:
            type: string
            enum:
              - credit_card
              - paypal
        - name: country_code
          in: query
          required: true
          description: Country ISO code
          example: US
          schema:
            type: string
        - name: payment_token
          in: query
          required: true
          description: Payment method token from Spreedly
          example: SPREEDLY_TOKEN
          schema:
            type: string
        - name: default_payment_method
          in: query
          required: false
          description: Set default payment method
          example: 'true'
          schema:
            type: boolean
      responses:
        '200':
          description: payment method created
          content:
            application/json:
              schema:
                type: object
                properties:
                  fluid_pay_account:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123
                      default_payment_method_id:
                        type: integer
                        example: 456
                    required:
                      - id
                      - default_payment_method_id
                  card:
                    type: object
                  payment_method:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123
                      source:
                        type: string
                        example: card
                      default:
                        type: boolean
                        example: true
                      payment_type:
                        type: string
                        example: Credit Card
                      details:
                        type: object
                        properties:
                          id:
                            type:
                              - integer
                              - 'null'
                            example: 123
                          type:
                            type:
                              - string
                              - 'null'
                            example: CreditCard
                          card_type:
                            type:
                              - string
                              - 'null'
                            example: master
                          card_brand:
                            type:
                              - string
                              - 'null'
                            example: Master
                          last4_digits:
                            type:
                              - string
                              - 'null'
                            example: '4444'
                          last_four:
                            type:
                              - string
                              - 'null'
                            example: '4444'
                          exp_month:
                            type:
                              - string
                              - 'null'
                            example: '3'
                          exp_year:
                            type:
                              - string
                              - 'null'
                            example: '2032'
                          logo_url:
                            type:
                              - string
                              - 'null'
                            example: >-
                              https://assets.fluid.app/images/payment_icons/master.svg
                      created_at:
                        type: string
                        format: date-time
                        example: '2021-01-01T00:00:00Z'
                      updated_at:
                        type: string
                        format: date-time
                        example: '2021-01-01T00:00:00Z'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        format: date-time
                        example: '2021-01-01T00:00:00Z'
                required:
                  - fluid_pay_account
                  - payment_method
                  - meta
  /api/fluid_pay/delete_payment_method/{payment_method_id}:
    delete:
      summary: Deletes an existing payment method
      tags:
        - Fluid Pay
      operationId: deleteFluidPayPaymentMethod
      parameters:
        - name: jwt
          in: query
          required: true
          description: JWT token containing customer authentication
          example: eyJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJjdX...
          schema:
            type: string
        - name: payment_method_id
          in: path
          required: true
          description: ID of the existing payment method to delete
          example: 123
          schema:
            type: integer
      responses:
        '200':
          description: payment_method deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Payment Method removed
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2025-02-03T08:04:10Z'
                required:
                  - message
                  - meta
  /api/fluid_pay/update_payment_method/{payment_method_id}:
    patch:
      summary: Update default payment method
      tags:
        - Fluid Pay
      operationId: updateFluidPayPaymentMethod
      parameters:
        - name: jwt
          in: query
          required: true
          description: JWT token containing customer authentication
          example: eyJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJjdX...
          schema:
            type: string
        - name: payment_method_id
          in: path
          required: true
          description: ID of the existing payment method to set as default
          example: 123
          schema:
            type: integer
      responses:
        '200':
          description: payment_method setted as default
          content:
            application/json:
              schema:
                type: object
                properties:
                  fluid_pay_account:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                    required:
                      - id
                  default_payment_method:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 123
                      source:
                        type: string
                        example: card
                      default:
                        type: boolean
                        example: true
                      payment_type:
                        type: string
                        example: Credit Card
                      details:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 123
                          type:
                            type: string
                            example: CreditCard
                          card_type:
                            type:
                              - string
                              - 'null'
                            example: visa
                          card_brand:
                            type:
                              - string
                              - 'null'
                            example: Visa
                          last4_digits:
                            type:
                              - string
                              - 'null'
                            example: '6789'
                            description: Deprecated
                          last_four:
                            type:
                              - string
                              - 'null'
                            example: '6789'
                          exp_month:
                            type:
                              - string
                              - 'null'
                            example: '12'
                          exp_year:
                            type:
                              - string
                              - 'null'
                            example: '2025'
                          logo_url:
                            type:
                              - string
                              - 'null'
                            example: >-
                              https://assets.fluid.app/images/payment_icons/visa.svg
                      created_at:
                        type: string
                        format: date-time
                        example: '2021-01-01T00:00:00Z'
                      updated_at:
                        type: string
                        format: date-time
                        example: '2021-01-01T00:00:00Z'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - fluid_pay_account
                  - default_payment_method
                  - meta
        '422':
          description: payment_method already assigned as default
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unprocessable entity
                  errors:
                    type: object
                    properties:
                      payment_method:
                        type: array
                        items:
                          type: string
                          example: already assigned as default
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2025-02-03T08:04:10Z'
  /api/fluid_pay/me:
    get:
      summary: Retrieves fluid pay account and its customer using jwt token
      tags:
        - Fluid Pay
      operationId: fetchFluidPayAccountWithCustomer
      parameters:
        - name: jwt
          in: query
          required: true
          description: JWT token containing customer authentication
          example: eyJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJjdX...
          schema:
            type: string
      responses:
        '200':
          description: fluid pay account with customer retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  fluid_pay_account:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      email:
                        type: string
                        format: email
                        example: dipen@gmail.com
                      first_name:
                        type:
                          - string
                          - 'null'
                        example: John
                      last_name:
                        type:
                          - string
                          - 'null'
                        example: Doe
                      phone:
                        type:
                          - string
                          - 'null'
                        example: '016611225'
                      address_count:
                        type: integer
                        example: 17
                      payment_methods_count:
                        type: integer
                        example: 2
                      language_iso:
                        type:
                          - string
                          - 'null'
                        example: en
                    required:
                      - id
                      - email
                      - address_count
                      - payment_methods_count
                  customer:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 10
                      user_company_id:
                        type:
                          - integer
                          - 'null'
                      account_id:
                        type: string
                        example: AU11V9IT8XV1RXYT
                      active:
                        type: boolean
                        example: false
                      active_subscriptions_count:
                        type: integer
                        example: 0
                      addresses:
                        type: array
                        items:
                          type: object
                        example: []
                      created_at:
                        type: string
                        format: date-time
                        example: '2025-01-28T11:24:32Z'
                      customer_notes:
                        type: array
                        items:
                          type: object
                        example: []
                      default_address:
                        type:
                          - object
                          - 'null'
                        example: null
                      display_total_spent:
                        type: string
                        example: $0.00 (USD)
                      email:
                        type: string
                        format: email
                        example: dipen@gmail.com
                      first_name:
                        type:
                          - string
                          - 'null'
                        example: John
                      last_name:
                        type:
                          - string
                          - 'null'
                        example: Doe
                      full_name:
                        type: string
                        example: John Doe
                      inactive_subscriptions_count:
                        type: integer
                        example: 0
                      last_order_id:
                        type:
                          - string
                          - 'null'
                        example: null
                      metadata:
                        type: object
                        additionalProperties: true
                        example: {}
                      notes:
                        type:
                          - string
                          - 'null'
                        example: null
                      orders_count:
                        type: integer
                        example: 0
                      phone:
                        type:
                          - string
                          - 'null'
                        example: '016611225'
                      total_spent:
                        type:
                          - number
                          - string
                        example: 0
                      verified_email:
                        type: boolean
                        example: false
                      is_rep:
                        type: boolean
                        example: true
                      jwt:
                        type: string
                        example: eyJhbGciO1NiJ9.eyJhdXcyNjN9.AZ-4PAgFwVyGp
                      external_id:
                        type:
                          - string
                          - 'null'
                        example: '1234567890'
                    required:
                      - id
                      - account_id
                      - active
                      - email
                      - first_name
                      - last_name
                      - full_name
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2025-02-03T08:04:10Z'
                required:
                  - fluid_pay_account
                  - customer
                  - meta
        '401':
          description: invalid JWT token
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid token
  /api/fluid_pay/update_me:
    patch:
      summary: Update current customer
      description: Update current customer
      tags:
        - Fluid Pay
      operationId: updateMe
      parameters:
        - name: jwt
          in: query
          required: true
          description: JWT token containing customer authentication
          example: eyJhbGciOiJIUzI1NiJ9.eyJhdXRoX3R5cGUiOiJjdX...
          schema:
            type: string
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  fluid_pay_account:
                    title: Commerce::FluidPayAccount
                    type: object
                    properties:
                      id:
                        type: integer
                      first_name:
                        example: John
                        type:
                          - string
                          - 'null'
                      last_name:
                        example: Doe
                        type:
                          - string
                          - 'null'
                      email:
                        example: john_doe@example.com
                        type: string
                      phone:
                        example: '+1234567890'
                        type:
                          - string
                          - 'null'
                      created_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      updated_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      settings:
                        example: {}
                        type:
                          - object
                          - 'null'
                      slug:
                        example: john-doe
                        type: string
                      language:
                        title: Language
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          name:
                            example: English
                            type:
                              - string
                              - 'null'
                          iso:
                            example: en
                            type:
                              - string
                              - 'null'
                        required:
                          - id
                      default_address:
                        title: Address
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          name:
                            example: John Doe
                            type: string
                          address1:
                            example: 123 Main St
                            type: string
                          address2:
                            example: Apt 4B
                            type:
                              - string
                              - 'null'
                          address3:
                            example: Building 5
                            type:
                              - string
                              - 'null'
                          city:
                            example: New York
                            type: string
                          state:
                            example: NY
                            type: string
                          subdivision_code:
                            example: NY
                            type:
                              - string
                              - 'null'
                          postal_code:
                            example: '10001'
                            type: string
                          country_code:
                            example: US
                            type:
                              - string
                              - 'null'
                          default:
                            description: >-
                              Use this address by default when there are
                              multiple addresses
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: false
                          first_name:
                            example: John
                            type: string
                          last_name:
                            example: Doe
                            type: string
                        required:
                          - id
                          - name
                          - address1
                          - city
                          - state
                          - postal_code
                          - first_name
                          - last_name
                      default_payment_method:
                        title: Commerce::PaymentMethod
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          source:
                            type: string
                            enum:
                              - apple_pay
                              - paypal
                              - card
                              - iap
                              - bread
                              - affirm
                              - google_pay
                              - klarna
                              - droplet
                          payload:
                            type:
                              - object
                              - 'null'
                          company_id:
                            type:
                              - integer
                              - 'null'
                          created_at:
                            type: string
                            format: date-time
                          updated_at:
                            type: string
                            format: date-time
                          user_id:
                            example: 101
                            type:
                              - integer
                              - 'null'
                        required:
                          - id
                          - source
                          - created_at
                          - updated_at
                    required:
                      - id
                      - email
                      - created_at
                      - updated_at
                      - slug
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - fluid_pay_account
                  - meta
        '404':
          description: not found - language
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                fluid_pay_account:
                  type: object
                  properties:
                    first_name:
                      type: string
                      minLength: 1
                    last_name:
                      type: string
                      minLength: 1
                    email:
                      type: string
                      minLength: 1
                    phone:
                      type: string
                      minLength: 1
                    language_iso:
                      type: string
                      minLength: 1
                  required: []
              required:
                - jwt
                - fluid_pay_account
  /api/forms/{form_id}/form_elements:
    get:
      summary: List form elements
      description: List all form elements for a form
      tags:
        - Form Elements
      operationId: listFormElements
      security:
        - bearer_auth: []
      parameters:
        - name: form_id
          in: path
          required: true
          description: Form ID
          schema:
            type: integer
        - name: page
          in: query
          required: false
          description: Page number
          schema:
            type: integer
        - name: per_page
          in: query
          required: false
          description: Number of items per page
          schema:
            type: integer
        - name: filterrific
          in: query
          required: false
          description: Filterrific parameters
          schema:
            type: string
      responses:
        '200':
          description: successful
  /api/forms/{form_id}/form_elements/{id}:
    get:
      summary: Show form element
      description: Show a form element
      tags:
        - Form Elements
      operationId: showFormElement
      security:
        - bearer_auth: []
      parameters:
        - name: form_id
          in: path
          required: true
          description: Form ID
          schema:
            type: integer
        - name: id
          in: path
          required: true
          description: Form element ID
          schema:
            type: integer
      responses:
        '200':
          description: successful
  /api/forms:
    get:
      summary: List forms
      description: List all forms for a company
      tags:
        - Forms
      operationId: listForms
      security:
        - bearer_auth: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        countries:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                              iso:
                                type: string
                              name:
                                type: string
                        description:
                          type:
                            - string
                            - 'null'
                        form_components:
                          type:
                            - string
                            - 'null'
                        form_redirect:
                          type:
                            - string
                            - 'null'
                        form_respondents_count:
                          type: integer
                        form_type:
                          type:
                            - string
                            - 'null'
                        status:
                          type: string
                        title:
                          type: string
                        updated_at:
                          type: string
                          format: date_time
                  pagination:
                    type: object
                    properties:
                      current_page:
                        type: integer
                      next_page:
                        type:
                          - integer
                          - 'null'
                      prev_page:
                        type:
                          - integer
                          - 'null'
                      total_pages:
                        type: integer
                      total_count:
                        type: integer
                  filters:
                    type: object
                    properties:
                      sorted_by:
                        type: array
                        items:
                          type: array
                          items:
                            type: string
    post:
      summary: Create a form
      description: Create a new form
      tags:
        - Forms
      operationId: createForm
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: created
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  form:
                    type: object
                    properties:
                      id:
                        type: integer
                      countries:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            iso:
                              type: string
                            name:
                              type: string
                      description:
                        type:
                          - string
                          - 'null'
                      form_components:
                        type:
                          - string
                          - 'null'
                      form_redirect:
                        type:
                          - string
                          - 'null'
                      form_respondents_count:
                        type: integer
                      form_type:
                        type: string
                      status:
                        type: string
                      title:
                        type: string
                      updated_at:
                        type: string
                        format: date_time
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  example: New Form
                  description: Title of the form
                description:
                  type: string
                  example: Form description
                  description: Description of the form
              required:
                - title
  /api/forms/{id}/respondents:
    get:
      summary: List form respondents
      description: List all respondents for a form
      tags:
        - Forms
      operationId: listFormRespondents
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Form ID
          schema:
            type: integer
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        form_completion_status:
                          type: string
                        respondent:
                          type: object
                          properties:
                            id:
                              type: integer
                            email:
                              type: string
                            full_name:
                              type: string
                            status:
                              type: string
                            token:
                              type: string
                        respondent_type:
                          type: string
                        response:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                              form_element_id:
                                type: integer
                              response:
                                type: string
                        updated_at:
                          type: string
                          format: date_time
                  pagination:
                    type: object
                    properties:
                      current_page:
                        type: integer
                      next_page:
                        type:
                          - integer
                          - 'null'
                      prev_page:
                        type:
                          - integer
                          - 'null'
                      total_pages:
                        type: integer
                      total_count:
                        type: integer
                  filters:
                    type: object
                    properties:
                      sorted_by:
                        type: array
                        items:
                          type: array
                          items:
                            type: string
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
  /api/forms/{id}/respond:
    post:
      summary: Respond to a form
      description: Respond to a form
      tags:
        - Forms
      operationId: respondToForm
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Form ID
          schema:
            type: integer
      responses:
        '201':
          description: created
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  responses:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        form_element_id:
                          type: integer
                        form_respondent_id:
                          type: integer
                        response:
                          type: string
                        created_at:
                          type: string
                          format: date_time
                        updated_at:
                          type: string
                          format: date_time
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                form_response:
                  type: object
                  properties:
                    contact:
                      type: object
                      properties:
                        first_name:
                          type: string
                        last_name:
                          type: string
                        email:
                          type: string
                    responses:
                      type: array
                      items:
                        type: object
                        properties:
                          form_element_id:
                            type: integer
                          answer:
                            type: string
              required:
                - form_response
  /api/forms/statistics:
    get:
      summary: Get form statistics
      description: Get statistics for a form
      tags:
        - Forms
      operationId: getFormStatistics
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: query
          required: true
          description: Form ID
          schema:
            type: integer
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_forms:
                    type: integer
                  total_responses:
                    type: integer
                  completed_responses:
                    type: integer
                  completion_rate:
                    type: number
                    format: float
                  today_responses:
                    type: integer
                  yesterday_responses:
                    type: integer
  /api/forms/{id}/send_mail:
    post:
      summary: Send form via email
      description: Send a form via email
      tags:
        - Forms
      operationId: sendFormViaEmail
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Form ID
          schema:
            type: integer
      responses:
        '200':
          description: email sent
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  example: user@example.com
                  description: Email address to send the form to
              required:
                - email
  /api/forms/{id}:
    delete:
      summary: Delete a form
      description: Delete a form
      tags:
        - Forms
      operationId: deleteForm
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Form ID
          schema:
            type: integer
      responses:
        '200':
          description: deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
  /api/forms/{id}/duplicate:
    post:
      summary: Duplicate a form
      description: Duplicate a form
      tags:
        - Forms
      operationId: duplicateForm
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Form ID
          schema:
            type: integer
      responses:
        '200':
          description: duplicated with different id
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  countries:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        iso:
                          type: string
                        name:
                          type: string
                  description:
                    type:
                      - string
                      - 'null'
                  form_components:
                    type:
                      - string
                      - 'null'
                  form_redirect:
                    type:
                      - string
                      - 'null'
                  form_respondents_count:
                    type: integer
                  form_type:
                    type: string
                  status:
                    type: string
                  title:
                    type: string
                  updated_at:
                    type: string
                    format: date_time
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
  /api/global_embeds:
    get:
      summary: List global embeds
      description: Get all global embeds with optional filters
      tags:
        - GlobalEmbeds
      operationId: listGlobalEmbeds
      security:
        - bearer_auth: []
      parameters:
        - name: page
          in: query
          schema:
            type: integer
            default: 1
          required: false
          description: Page number for pagination
        - name: per_page
          in: query
          schema:
            type: integer
            default: 10
          required: false
          description: Number of records per page
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  global_embeds:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          type: string
                        content:
                          type: string
                        status:
                          type: string
                        placement:
                          type: string
                        created_at:
                          type: string
                          format: date-time
                        updated_at:
                          type: string
                          format: date-time
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                        format: date-time
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                          total_pages:
                            type: integer
                          total_count:
                            type: integer
                          per_page:
                            type: integer
    post:
      summary: Create a global embed
      description: Create a new global embed
      tags:
        - GlobalEmbeds
      operationId: createGlobalEmbed
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: global embed created
          content:
            application/json:
              schema:
                type: object
                properties:
                  global_embed:
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        type: string
                      content:
                        type: string
                      status:
                        type: string
                      placement:
                        type: string
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                global_embed:
                  type: object
                  required:
                    - name
                    - content
                  properties:
                    name:
                      type: string
                    content:
                      type: string
                    status:
                      type: string
                      enum:
                        - draft
                        - active
                    placement:
                      type: string
                      enum:
                        - head
                        - body
  /api/global_embeds/{id}:
    get:
      summary: Get a global embed
      description: Get a specific global embed by ID
      tags:
        - GlobalEmbeds
      operationId: getGlobalEmbed
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: global embed found
          content:
            application/json:
              schema:
                type: object
                properties:
                  global_embed:
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        type: string
                      content:
                        type: string
                      status:
                        type: string
                      placement:
                        type: string
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: global embed not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
    put:
      summary: Update a global embed
      description: Update an existing global embed
      tags:
        - GlobalEmbeds
      operationId: updateGlobalEmbed
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: global embed updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  global_embed:
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        type: string
                      content:
                        type: string
                      status:
                        type: string
                      placement:
                        type: string
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                global_embed:
                  type: object
                  properties:
                    name:
                      type: string
                    content:
                      type: string
                    status:
                      type: string
                      enum:
                        - draft
                        - active
                    placement:
                      type: string
                      enum:
                        - head
                        - body
    delete:
      summary: Delete a global embed
      description: Deletes a specific global embed
      tags:
        - GlobalEmbeds
      operationId: deleteGlobalEmbed
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: global embed deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
  /api/inventory_levels:
    get:
      summary: List inventory levels
      description: List all inventory levels with filters
      tags:
        - Inventory Levels
      operationId: listInventoryLevels
      security:
        - bearer_auth: []
      parameters:
        - name: variant_ids
          in: query
          required: false
          description: Comma-separated variant_ids. Required if warehouse_ids empty
          schema:
            type: string
        - name: warehouse_ids
          in: query
          required: false
          description: Comma-separated warehouse_ids. Required if variant_ids empty
          schema:
            type: string
        - name: published_to
          in: query
          required: false
          description: >-
            coma-separated values (allowed values: Retail Store, Rep Store,
            Share tab)
          schema:
            type: string
        - name: product_tags
          in: query
          required: false
          description: Product tags
          schema:
            type: string
        - name: available_greater_than
          in: query
          required: false
          description: Inventory level available greater than
          schema:
            type: string
        - name: available_less_than
          in: query
          required: false
          description: Inventory level available less than
          schema:
            type: string
        - name: unavailable_greater_than
          in: query
          required: false
          description: Inventory level unavailable greater than
          schema:
            type: string
        - name: unavailable_less_than
          in: query
          required: false
          description: Inventory level unavailable less than
          schema:
            type: string
        - name: committed_greater_than
          in: query
          required: false
          description: Inventory level committed greater than
          schema:
            type: string
        - name: committed_less_than
          in: query
          required: false
          description: Inventory level committed less than
          schema:
            type: string
        - name: on_hand_greater_than
          in: query
          required: false
          description: Inventory level on hand greater than
          schema:
            type: string
        - name: on_hand_less_than
          in: query
          required: false
          description: Inventory level on hand less than
          schema:
            type: string
        - name: search
          in: query
          required: false
          description: Search text
          schema:
            type: string
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  inventory_levels:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        committed:
                          type: integer
                        available:
                          type: integer
                        on_hand:
                          type: integer
                        unavailable:
                          type: integer
                        variant:
                          type: object
                          properties:
                            id:
                              type: integer
                            product_id:
                              type: integer
                            sku:
                              type: string
                        product:
                          type: object
                          properties:
                            image:
                              type: string
                            title:
                              type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                        format: datetime
                      total_count:
                        type: integer
                      total_pages:
                        type: integer
                      page_size:
                        type: integer
                      current_page:
                        type: integer
        '400':
          description: error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Warehouse ids or variant ids must be passed
                  errors:
                    type: array
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
  /api/inventory_levels/{id}:
    delete:
      summary: Delete inventory level
      description: Delete a single inventory level
      tags:
        - Inventory Levels
      operationId: deleteInventoryLevel
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Id of inventory level to be deleted.
          example: '1'
          schema:
            type: string
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  inventory_level:
                    type: object
                    properties:
                      id:
                        type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: 'Couldn''t find inventory level with id: 1'
                  errors:
                    type: array
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
        '422':
          description: error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: 'Failed to delete inventory level with id: 1'
                  errors:
                    type: array
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
  /api/inventory_levels/set:
    post:
      summary: Set Inventory Level
      description: >-
        Updates an inventory level if found or creates if not found for given
        variant in a warehouse. Adds an audit log entry for the operation.
      tags:
        - Inventory Levels
      operationId: updateOrCreateInventoryLevel
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: Inventory level updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  inventory_level:
                    type: object
                    properties:
                      id:
                        type: integer
                      committed:
                        type: integer
                      available:
                        type: integer
                      on_hand:
                        type: integer
                      unavailable:
                        type: integer
                      warning:
                        type:
                          - string
                          - 'null'
                      variant:
                        type: object
                        properties:
                          id:
                            type: integer
                          sku:
                            type: string
                      product:
                        type: object
                        properties:
                          id:
                            type: integer
                          title:
                            type: string
                          image_url:
                            type: string
                      warehouse:
                        type: object
                        properties:
                          id:
                            type: integer
                          country:
                            type: object
                            properties:
                              id:
                                type: integer
                              name:
                                type: string
                              iso:
                                type: string
                          address:
                            type: object
                            properties:
                              id:
                                type: integer
                              city:
                                type: string
                              state:
                                type: string
                              address1:
                                type: string
                              postal_code:
                                type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '201':
          description: Inventory level created
          content:
            application/json:
              schema:
                type: object
                properties:
                  inventory_level:
                    type: object
                    properties:
                      id:
                        type: integer
                      committed:
                        type: integer
                      available:
                        type: integer
                      on_hand:
                        type: integer
                      unavailable:
                        type: integer
                      warning:
                        type:
                          - string
                          - 'null'
                      variant:
                        type: object
                        properties:
                          id:
                            type: integer
                          sku:
                            type: string
                      product:
                        type: object
                        properties:
                          id:
                            type: integer
                          title:
                            type: string
                          image_url:
                            type: string
                      warehouse:
                        type: object
                        properties:
                          id:
                            type: integer
                          country:
                            type: object
                            properties:
                              id:
                                type: integer
                              name:
                                type: string
                              iso:
                                type: string
                          address:
                            type: object
                            properties:
                              id:
                                type: integer
                              city:
                                type: string
                              state:
                                type: string
                              address1:
                                type: string
                              postal_code:
                                type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '400':
          description: Bad Request - invalid warehouse and variant IDs
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: >-
                      Validation failed: Warehouse must exist, Variant must
                      exist
                  errors:
                    type: array
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                inventory_level:
                  type: object
                  properties:
                    variant_id:
                      type: integer
                      example: 1
                      description: ID of the variant
                    warehouse_id:
                      type: integer
                      example: 1
                      description: ID of the warehouse
                    on_hand:
                      type: integer
                      example: 10
                      description: Quantity on hand
                    available:
                      type: integer
                      example: 5
                      description: Available quantity
                    unavailable:
                      type: integer
                      example: 0
                      description: Unavailable quantity
                    committed:
                      type: integer
                      example: 5
                      description: Committed quantity
                    reason:
                      type: string
                      example: Stock adjustment
                      description: Reason for the change
                  required:
                    - variant_id
                    - warehouse_id
  /api/inventory_levels/adjust:
    post:
      summary: Adjust inventory level
      description: >-
        Adjust attribute of an inventory level. It also changes the value of
        corresponding attribute (for e.g: decreasing value of committed
        increases value of available). Also logs entry for the operation.
      tags:
        - Inventory Levels
      operationId: adjustInventoryLevel
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: Inventory level adjusted
          content:
            application/json:
              schema:
                type: object
                properties:
                  inventory_level:
                    type: object
                    properties:
                      id:
                        type: integer
                      committed:
                        type: integer
                      available:
                        type: integer
                      on_hand:
                        type: integer
                      unavailable:
                        type: integer
                      warning:
                        type:
                          - string
                          - 'null'
                      variant:
                        type: object
                        properties:
                          id:
                            type: integer
                          sku:
                            type: string
                      product:
                        type: object
                        properties:
                          id:
                            type: integer
                          title:
                            type: string
                          image_url:
                            type: string
                      warehouse:
                        type: object
                        properties:
                          id:
                            type: integer
                          country:
                            type: object
                            properties:
                              id:
                                type: integer
                              name:
                                type: string
                              iso:
                                type: string
                          address:
                            type: object
                            properties:
                              id:
                                type: integer
                              city:
                                type: string
                              state:
                                type: string
                              address1:
                                type: string
                              postal_code:
                                type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '400':
          description: Invalid adjustment attribute
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: array
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: Inventory level not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: array
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                inventory_level:
                  type: object
                  properties:
                    id:
                      type: integer
                    adjustment_attribute:
                      type: string
                      enum:
                        - on_hand
                        - available
                        - unavailable
                        - committed
                    quantity:
                      type: integer
                    reason:
                      type: string
                  required:
                    - id
                    - adjustment_attribute
                    - quantity
                    - reason
  /api/inventory_levels/bulk_delete:
    delete:
      summary: Delete multiple inventory levels
      description: Bulk delete inventory levels
      tags:
        - Inventory Levels
      operationId: deleteInventoryLevelBulk
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  delete_statuses:
                    type: array
                    example:
                      - inventory_level_id: 1
                        deleted: true
                      - inventory_level_id: 2
                        deleted: false
                        error: 'Couldn''t find inventory level with id: 2'
                    items:
                      type: object
                      properties:
                        inventory_level_id:
                          type: integer
                        deleted:
                          type: boolean
                        error:
                          type:
                            - string
                            - 'null'
                      required:
                        - inventory_level_id
                        - deleted
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - delete_statuses
        '400':
          description: error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Deleting the inventory levels failed
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        inventory_level_id:
                          type: integer
                          example: 1
                        deleted:
                          type: boolean
                          example: false
                        error:
                          type: string
                          example: 'Couldn''t find inventory level with id: 1'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                inventory_level_ids:
                  type: array
                  items:
                    type: integer
              required:
                - inventory_level_ids
        required: true
        description: Array of inventory level ids to be deleted
  /api/inventory_levels/export_csv:
    get:
      summary: Export inventory level csv
      description: >-
        Export inventory levels filtered by variant_ids or warehouse_ids in csv
        format
      tags:
        - Inventory Levels
      operationId: exportInventoryLevels
      security:
        - bearer_auth: []
      parameters:
        - name: variant_ids
          in: query
          required: false
          description: Comma-separated variant_ids. Required if warehouse_ids empty
          schema:
            type: string
        - name: warehouse_ids
          in: query
          required: false
          description: Comma-separated warehouse_ids. Required if variant_ids empty
          schema:
            type: string
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  export_url:
                    type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '400':
          description: error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Warehouse ids or variant ids must be passed
                  errors:
                    type: array
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
  /api/inventory_levels/presigned_csv_url:
    post:
      summary: Generate a signed URL to upload csv for bulk importing inventory levels
      description: >-
        Generate a signed URL to allow users without credentials to perform
        upload (time-limited access to Cloud Storage)
      tags:
        - Inventory Levels
      operationId: generateSignedURLForBulkImport
      security:
        - bearer_auth: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    example: https://path/to/file/sth.csv
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - url
        '400':
          description: error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: fail
                  data:
                    type: object
                    properties:
                      error:
                        type: string
                required:
                  - status
  /api/inventory_levels/import_csv:
    post:
      summary: Import inventory level with csv url or with a csv file
      description: Import inventory levels from csv url
      tags:
        - Inventory Levels
      operationId: bulkImportInventoryLevels
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  created:
                    type: integer
                    example: 10
                  updated:
                    type: integer
                    example: 5
                  failed:
                    type: integer
                    example: 2
                  invalid_rows:
                    type: integer
                    example: 1
                  import_status_url:
                    type: string
                    example: https://fake-url.com/file.csv
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - created
                  - updated
                  - failed
                  - invalid_rows
                  - import_status_url
        '400':
          description: error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: fail
                  data:
                    type: object
                    properties:
                      error:
                        type: string
                required:
                  - status
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: CSV file uploaded as multipart form-data
                url:
                  type: string
                  example: https://example.com/path/to/csv
                  description: URL to fetch the CSV file
  /api/inventory_levels/bulk_update:
    patch:
      summary: Update multiple inventory levels
      description: Update multiple inventory levels at once
      tags:
        - Inventory Levels
      operationId: updateMultipleInventoryLevels
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  inventory_levels:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        committed:
                          type: integer
                        available:
                          type: integer
                        on_hand:
                          type: integer
                        unavailable:
                          type: integer
                        variant:
                          type: object
                          properties:
                            id:
                              type: integer
                            product_id:
                              type: integer
                            sku:
                              type: string
                        product:
                          type: object
                          properties:
                            image:
                              type: string
                            title:
                              type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        inventory_level_id:
                          type: integer
                          example: 1
                        error_message:
                          type: string
                          example: 'Couldn''t find inventory level with id: 1'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '400':
          description: error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Updaing the inventory levels failed
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        inventory_level_id:
                          type: integer
                          example: 1
                        error_message:
                          type: string
                          example: >-
                            There was an error in updating inventory level with
                            id: 1
                      required:
                        - inventory_level_id
                        - error_message
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
        '404':
          description: error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Inventory levels not found
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        inventory_level_id:
                          type: integer
                          example: 1
                        error_message:
                          type: string
                          example: 'Couldn''t find InventoryLevel with id: 1'
                      required:
                        - inventory_level_id
                        - error_message
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                inventory_levels:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 0
                      on_hand:
                        type: integer
                        example: 0
                      available:
                        type: integer
                        example: 0
                      unavailable:
                        type: integer
                        example: 0
                      committed:
                        type: integer
                        example: 0
                      reason:
                        type: string
                        example: lost some items on fire accident
                    required:
                      - id
  /api/company/labels:
    get:
      summary: List Labels
      tags:
        - Labels
      security:
        - bearer_auth: []
      operationId: listLabels
      responses:
        '200':
          description: labels found
          content:
            application/json:
              schema:
                type: object
                properties:
                  label:
                    type: array
                    items:
                      title: Label
                      type: object
                      properties:
                        id:
                          type: integer
                        title:
                          example: Trending
                          type: string
                        background:
                          example: '#F8C856'
                          type:
                            - string
                            - 'null'
                        icon:
                          example: rocket.svg
                          type: string
                        color:
                          example: '#000000'
                          type:
                            - string
                            - 'null'
                      required:
                        - id
                        - title
                        - background
                        - icon
                        - color
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
    post:
      summary: Create Label
      tags:
        - Labels
      security:
        - bearer_auth: []
      operationId: createLabel
      parameters: []
      responses:
        '201':
          description: label created
          content:
            application/json:
              schema:
                type: object
                properties:
                  label:
                    title: Label
                    type: object
                    properties:
                      id:
                        type: integer
                      title:
                        example: Trending
                        type: string
                      background:
                        example: '#F8C856'
                        type:
                          - string
                          - 'null'
                      icon:
                        example: rocket.svg
                        type: string
                      color:
                        example: '#000000'
                        type:
                          - string
                          - 'null'
                    required:
                      - id
                      - title
                      - background
                      - icon
                      - color
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: unprocessable entity
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                label:
                  type: object
                  properties:
                    title:
                      type: string
                    icon:
                      type: string
                    background:
                      type: string
                    color:
                      type: string
                    status:
                      type: string
                  required:
                    - title
                    - icon
              required:
                - label
        required: true
  /api/multi_factor_authentications:
    get:
      summary: List MFA records for a specific user
      tags:
        - Multi Factor Authentications
      parameters:
        - name: multi_factorable_id
          in: query
          required: true
          description: ID of the associated model
          schema:
            type: string
        - name: page
          in: query
          required: false
          description: Page number for pagination
          schema:
            type: integer
        - name: per_page
          in: query
          required: false
          description: Number of records per page
          schema:
            type: integer
        - name: search_query
          in: query
          required: false
          description: Search term for filtering by verification channel
          schema:
            type: string
        - name: sort_by
          in: query
          required: false
          description: Column to sort by (created_at, verification_channel, authenticated)
          schema:
            type: string
        - name: sort_direction
          in: query
          required: false
          description: Sort direction (asc, desc)
          schema:
            type: string
      responses:
        '200':
          description: MFA records retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  multi_factor_authentications:
                    type: array
                    items:
                      title: MultiFactorAuthentication
                      type: object
                      properties:
                        uuid:
                          type: string
                        verification_channel:
                          type: string
                        authenticated:
                          type: boolean
                          default: false
                        created_at:
                          type: string
                          format: date-time
                        verification_code:
                          type:
                            - string
                            - 'null'
                        verification_code_expires_at:
                          type:
                            - string
                            - 'null'
                          format: date-time
                      required:
                        - uuid
                        - verification_channel
                        - authenticated
                        - created_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                      pagination:
                        type: object
                        properties:
                          total_count:
                            type: integer
                          current_page:
                            type: integer
                          per_page:
                            type: integer
                        required:
                          - total_count
                          - current_page
                          - per_page
                    required:
                      - request_id
                      - timestamp
                      - pagination
                required:
                  - multi_factor_authentications
                  - meta
        '422':
          description: Invalid parameters
    post:
      summary: creates a multi-factor authentication
      tags:
        - Multi-Factor Authentications
      operationId: createMultiFactorAuthentication
      parameters: []
      responses:
        '201':
          description: multi-factor authentication created
          content:
            application/json:
              schema:
                type: object
                properties:
                  multi_factor_authentication:
                    title: MultiFactorAuthentication
                    type: object
                    properties:
                      uuid:
                        type: string
                      verification_channel:
                        example: test@example.com
                        type: string
                      verification_code_expires_at:
                        example: '2025-02-17T08:00:01Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      authenticated:
                        example: 'false'
                        type: boolean
                        default: false
                    required:
                      - uuid
                      - verification_channel
                      - authenticated
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: multi-factor authentication not created
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unprocessable entity
                  errors:
                    type: object
                    properties:
                      multi_factor_authentication:
                        type: object
                        properties:
                          verification_channel:
                            type: array
                            example:
                              - is not one of the allowed channels
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - error_message
                  - errors
                  - meta
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                multi_factor_authentication:
                  type: object
                  properties:
                    multi_factorable_type:
                      type: string
                      minLength: 1
                    multi_factorable_id:
                      anyOf:
                        - type: integer
                        - type: string
                      not:
                        type: 'null'
                    verification_channel:
                      type: string
                      minLength: 1
                    is_invitation:
                      type: boolean
                      not:
                        type: 'null'
                  required:
                    - multi_factorable_type
                    - multi_factorable_id
                    - verification_channel
              required:
                - multi_factor_authentication
  /api/multi_factor_authentications/{uuid}:
    get:
      summary: shows a multi-factor authentication
      tags:
        - Multi-Factor Authentications
      operationId: showMultiFactorAuthentication
      parameters:
        - name: uuid
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: multi-factor authentication shown
          content:
            application/json:
              schema:
                type: object
                properties:
                  multi_factor_authentication:
                    title: MultiFactorAuthentication
                    type: object
                    properties:
                      uuid:
                        type: string
                      multi_factorable_type:
                        type: string
                      multi_factorable_id:
                        type: integer
                      verification_channel:
                        type: string
                      verification_code_expires_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                      authenticated:
                        type: boolean
                        default: false
                      authentication_token:
                        type:
                          - string
                          - 'null'
                      authentication_token_expires_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                      created_at:
                        type: string
                        format: date-time
                    required:
                      - uuid
                      - multi_factorable_type
                      - multi_factorable_id
                      - verification_channel
                      - authenticated
                      - created_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '404':
          description: multi-factor authentication not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Multi-factor authentication not found
                  errors:
                    type: object
                    properties:
                      uuid:
                        type: array
                        example:
                          - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - error_message
                  - errors
                  - meta
        '410':
          description: multi-factor authentication token expired
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Multi-factor authentication token expired
                  errors:
                    type: object
                    properties:
                      multi_factor_authentication:
                        type: object
                        properties:
                          authentication_token:
                            type: array
                            example:
                              - expired
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - error_message
                  - errors
                  - meta
    put:
      summary: authenticates a multi-factor authentication
      tags:
        - Multi-Factor Authentications
      operationId: putMultiFactorAuthentication
      parameters:
        - name: uuid
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: multi-factor authentication authenticated
          content:
            application/json:
              schema:
                type: object
                properties:
                  multi_factor_authentication:
                    title: MultiFactorAuthentication
                    type: object
                    properties:
                      uuid:
                        type: string
                      authenticated:
                        type: boolean
                        default: false
                      authentication_token:
                        type:
                          - string
                          - 'null'
                      authentication_token_expires_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                    required:
                      - uuid
                      - authenticated
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - multi_factor_authentication
        '404':
          description: multi-factor authentication not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Multi-factor authentication not found
                  errors:
                    type: object
                    properties:
                      uuid:
                        type: array
                        example:
                          - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - error_message
                  - errors
                  - meta
        '410':
          description: multi-factor authentication expired
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Multi-factor authentication verification code expired
                  errors:
                    type: object
                    properties:
                      multi_factor_authentication:
                        type: object
                        properties:
                          verification_code:
                            type: array
                            example:
                              - expired
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - error_message
                  - errors
                  - meta
        '422':
          description: multi-factor authentication not authenticated
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Invalid verification code
                  errors:
                    type: object
                    properties:
                      multi_factor_authentication:
                        type: object
                        properties:
                          verification_code:
                            type: array
                            example:
                              - invalid
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - error_message
                  - errors
                  - meta
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                uuid:
                  type: string
                  minLength: 1
                multi_factor_authentication:
                  type: object
                  properties:
                    verification_code:
                      type: string
                      minLength: 1
                  required:
                    - verification_code
              required:
                - uuid
                - multi_factor_authentication
    delete:
      summary: destroys a multi-factor authentication
      tags:
        - Multi-Factor Authentications
      operationId: destroyMultiFactorAuthentication
      parameters:
        - name: uuid
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: multi-factor authentication destroyed
          content:
            application/json:
              schema:
                type: object
                properties:
                  uuid:
                    type: string
                    example: mfa_13m8dhnortslzwqhvqoj9drga9e8eise
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '404':
          description: multi-factor authentication not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Multi-factor authentication not found
                  errors:
                    type: object
                    properties:
                      uuid:
                        type: array
                        example:
                          - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - error_message
                  - errors
                  - meta
  /api/company/notifications:
    get:
      summary: Get notifications for the current user
      tags:
        - Notifications
      operationId: indexCompanyNotifications
      security:
        - bearer_auth: []
      parameters:
        - name: page
          in: query
          schema:
            type: integer
            default: 1
          required: false
          description: Page number for pagination
        - name: per_page
          in: query
          schema:
            type: integer
            default: 25
          required: false
          description: Number of records per page
        - name: read
          in: query
          schema:
            type: boolean
          required: false
          description: Filter by read status (true for read, false for unread)
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  notifications:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        title:
                          type:
                            - string
                            - 'null'
                          example: New message
                        body:
                          type: string
                          example: You have a new message
                        slug:
                          type:
                            - string
                            - 'null'
                          example: new_message
                        mail_processed_at:
                          type:
                            - string
                            - 'null'
                          format: date_time
                          example: '2025-01-16T04:22:43.809Z'
                        push_processed_at:
                          type:
                            - string
                            - 'null'
                          format: date_time
                          example: '2025-01-16T04:22:43.809Z'
                        created_at:
                          type: string
                          format: date_time
                          example: '2025-01-16T04:22:43.809Z'
                        updated_at:
                          type: string
                          format: date_time
                          example: '2025-01-16T04:22:43.809Z'
                        data:
                          type: object
                          description: Additional data for the notification
                        is_read:
                          type: boolean
                          example: false
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                      total_count:
                        type: integer
                        example: 42
                      total_pages:
                        type: integer
                        example: 3
                      current_page:
                        type: integer
                        example: 1
  /api/v1/onboardings:
    get:
      summary: Get onboarding status
      tags:
        - Onboarding
      operationId: getOnboardingStatus
      security:
        - bearer_auth: []
      responses:
        '200':
          description: onboarding status retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  onboarding:
                    type: object
                    properties:
                      sections:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            steps:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                  description:
                                    type:
                                      - string
                                      - 'null'
                                  status:
                                    type: string
                                    enum:
                                      - pending
                                      - completed
                                      - skipped
                                  time_estimate:
                                    type: integer
                                  allow_manual_completion:
                                    type: boolean
                            progress:
                              type: object
                              properties:
                                completed:
                                  type: integer
                                skipped:
                                  type: integer
                                pending:
                                  type: integer
                                total:
                                  type: integer
                                percentage:
                                  type: integer
                                time_remaining:
                                  type: integer
                                all_done:
                                  type: boolean
                      overall:
                        type: object
                        properties:
                          completed:
                            type: integer
                          skipped:
                            type: integer
                          pending:
                            type: integer
                          total:
                            type: integer
                          percentage:
                            type: integer
                          time_remaining:
                            type: integer
                      completed:
                        type: boolean
                      show_getting_started:
                        type: boolean
                  company_status:
                    type:
                      - string
                      - 'null'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                required:
                  - onboarding
                  - company_status
                  - meta
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
  /api/v1/onboardings/check_step:
    patch:
      summary: Check onboarding step
      tags:
        - Onboarding
      operationId: checkOnboardingStep
      description: >-
        Check if an onboarding step meets completion criteria and automatically
        complete it if eligible. This endpoint modifies state by marking steps
        as completed when they meet their defined criteria.
      security:
        - bearer_auth: []
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  step:
                    type: object
                    properties:
                      section:
                        type: string
                      step_id:
                        type: string
                      step_status:
                        type: string
                        enum:
                          - pending
                          - completed
                          - skipped
                      is_step_complete:
                        type: boolean
                    required:
                      - section
                      - step_id
                      - step_status
                      - is_step_complete
                  onboarding:
                    type: object
                    properties:
                      sections:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            steps:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                  description:
                                    type:
                                      - string
                                      - 'null'
                                  status:
                                    type: string
                                    enum:
                                      - pending
                                      - completed
                                      - skipped
                                  time_estimate:
                                    type: integer
                                  allow_manual_completion:
                                    type: boolean
                            progress:
                              type: object
                              properties:
                                completed:
                                  type: integer
                                skipped:
                                  type: integer
                                pending:
                                  type: integer
                                total:
                                  type: integer
                                percentage:
                                  type: integer
                                time_remaining:
                                  type: integer
                                all_done:
                                  type: boolean
                      overall:
                        type: object
                        properties:
                          completed:
                            type: integer
                          skipped:
                            type: integer
                          pending:
                            type: integer
                          total:
                            type: integer
                          percentage:
                            type: integer
                          time_remaining:
                            type: integer
                      completed:
                        type: boolean
                      show_getting_started:
                        type: boolean
                  company_status:
                    type:
                      - string
                      - 'null'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                required:
                  - step
                  - onboarding
                  - company_status
                  - meta
        '422':
          description: unprocessable entity - invalid step_id
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    properties:
                      section:
                        type: array
                        items:
                          type: string
                      step_id:
                        type: array
                        items:
                          type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                required:
                  - error_message
                  - errors
                  - meta
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                section:
                  type: string
                  example: account
                step_id:
                  type: string
                  example: setup_user_roles
              required:
                - section
                - step_id
  /api/v1/onboardings/complete_step:
    patch:
      summary: Complete onboarding step manually
      tags:
        - Onboarding
      operationId: completeOnboardingStep
      description: >-
        Manually complete an onboarding step. This endpoint can only be used for
        steps that have 'allow_manual_completion' set to true. Steps without
        this flag will return a 403 Forbidden error.
      security:
        - bearer_auth: []
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: step completed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  step:
                    type: object
                    properties:
                      section:
                        type: string
                      step_id:
                        type: string
                      step_status:
                        type: string
                        enum:
                          - pending
                          - completed
                          - skipped
                    required:
                      - section
                      - step_id
                      - step_status
                  onboarding:
                    type: object
                    properties:
                      sections:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            steps:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                  description:
                                    type:
                                      - string
                                      - 'null'
                                  status:
                                    type: string
                                    enum:
                                      - pending
                                      - completed
                                      - skipped
                                  time_estimate:
                                    type: integer
                                  allow_manual_completion:
                                    type: boolean
                            progress:
                              type: object
                              properties:
                                completed:
                                  type: integer
                                skipped:
                                  type: integer
                                pending:
                                  type: integer
                                total:
                                  type: integer
                                percentage:
                                  type: integer
                                time_remaining:
                                  type: integer
                                all_done:
                                  type: boolean
                      overall:
                        type: object
                        properties:
                          completed:
                            type: integer
                          skipped:
                            type: integer
                          pending:
                            type: integer
                          total:
                            type: integer
                          percentage:
                            type: integer
                          time_remaining:
                            type: integer
                      completed:
                        type: boolean
                      show_getting_started:
                        type: boolean
                  company_status:
                    type:
                      - string
                      - 'null'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                required:
                  - step
                  - onboarding
                  - company_status
                  - meta
        '403':
          description: forbidden - manual completion not allowed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    properties:
                      base:
                        type: array
                        items:
                          type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                required:
                  - error_message
                  - errors
                  - meta
        '422':
          description: unprocessable entity - invalid step_id
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    properties:
                      section:
                        type: array
                        items:
                          type: string
                      step_id:
                        type: array
                        items:
                          type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                required:
                  - error_message
                  - errors
                  - meta
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                section:
                  type: string
                  example: data_sync
                step_id:
                  type: string
                  example: connect_data_source
              required:
                - section
                - step_id
  /api/order_fulfillments:
    get:
      summary: List order fulfillments
      description: List all order fulfillments
      tags:
        - Order Fulfillments
      operationId: listOrderFulfillments
      security:
        - bearer_auth: []
      parameters:
        - name: order_id
          in: query
          required: false
          description: Filter by order ID
          schema:
            type: integer
        - name: page
          in: query
          required: false
          description: Page number
          schema:
            type: integer
        - name: per_page
          in: query
          required: false
          description: Items per page
          schema:
            type: integer
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  json:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        created_at:
                          type: string
                          format: date-time
                        updated_at:
                          type: string
                          format: date-time
                        order_item_fulfillments:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                              quantity:
                                type: integer
                                example: 1
                              item_id:
                                type: integer
                              order_fulfillment_id:
                                type: integer
                              created_at:
                                type: string
                                format: date-time
                              updated_at:
                                type: string
                                format: date-time
                            required:
                              - id
                              - quantity
                              - created_at
                              - updated_at
                        tracking_informations:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                              tracking_number:
                                type: string
                                example: 1Z999AA10123456784
                              shipping_carrier:
                                type: string
                                example: UPS
                              created_at:
                                type: string
                                format: date-time
                              updated_at:
                                type: string
                                format: date-time
                        meta:
                          type: object
                          properties:
                            request_id:
                              type: string
                            timestamp:
                              type: string
                              format: date-time
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                        format: date-time
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                          total_pages:
                            type: integer
                          total_count:
                            type: integer
                          per_page:
                            type: integer
    post:
      summary: Create order fulfillment
      tags:
        - Order Fulfillments
      operationId: createOrderFulfillment
      description: Create a new order fulfillment
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  order_item_fulfillments:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        quantity:
                          type: integer
                          example: 1
                        item_id:
                          type: integer
                        order_fulfillment_id:
                          type: integer
                        created_at:
                          type: string
                          format: date-time
                        updated_at:
                          type: string
                          format: date-time
                      required:
                        - id
                        - quantity
                        - created_at
                        - updated_at
                  tracking_informations:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        tracking_number:
                          type: string
                          example: 1Z999AA10123456784
                        shipping_carrier:
                          type: string
                          example: UPS
                        created_at:
                          type: string
                          format: date-time
                        updated_at:
                          type: string
                          format: date-time
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                        format: date-time
        '404':
          description: order not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    properties:
                      base:
                        type: array
                        items:
                          type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                        format: date-time
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                order_id:
                  type: integer
                order_items:
                  type: array
                  items:
                    type: object
                    properties:
                      item_id:
                        type: integer
                      quantity:
                        type: integer
                    required:
                      - item_id
                      - quantity
                tracking_informations:
                  type: array
                  items:
                    type: object
                    properties:
                      tracking_number:
                        type: string
                      shipping_carrier:
                        type: string
                    required:
                      - tracking_number
              required:
                - order_id
                - order_items
  /api/order_fulfillments/{id}:
    get:
      summary: Show order fulfillment
      tags:
        - Order Fulfillments
      operationId: showOrderFulfillment
      description: Show a specific order fulfillment
      security:
        - bearer_auth: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  order_item_fulfillments:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        quantity:
                          type: integer
                          example: 1
                        item_id:
                          type: integer
                        order_fulfillment_id:
                          type: integer
                        created_at:
                          type: string
                          format: date-time
                        updated_at:
                          type: string
                          format: date-time
                      required:
                        - id
                        - quantity
                        - created_at
                        - updated_at
                  tracking_informations:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        tracking_number:
                          type: string
                          example: 1Z999AA10123456784
                        shipping_carrier:
                          type: string
                          example: UPS
                        created_at:
                          type: string
                          format: date-time
                        updated_at:
                          type: string
                          format: date-time
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                        format: date-time
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    properties:
                      base:
                        type: array
                        items:
                          type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                        format: date-time
    put:
      summary: Update order fulfillment
      tags:
        - Order Fulfillments
      operationId: updateOrderFulfillment
      description: Update an order fulfillment
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  order_item_fulfillments:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        quantity:
                          type: integer
                          example: 1
                        item_id:
                          type: integer
                        order_fulfillment_id:
                          type: integer
                        created_at:
                          type: string
                          format: date-time
                        updated_at:
                          type: string
                          format: date-time
                      required:
                        - id
                        - quantity
                        - created_at
                        - updated_at
                  tracking_informations:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        tracking_number:
                          type: string
                          example: 1Z999AA10123456784
                        shipping_carrier:
                          type: string
                          example: UPS
                        created_at:
                          type: string
                          format: date-time
                        updated_at:
                          type: string
                          format: date-time
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                        format: date-time
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    properties:
                      base:
                        type: array
                        items:
                          type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                        format: date-time
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                order_items:
                  type: array
                  items:
                    type: object
                    properties:
                      item_id:
                        type: integer
                      quantity:
                        type: integer
                    required:
                      - item_id
                      - quantity
                tracking_informations:
                  type: array
                  items:
                    type: object
                    properties:
                      tracking_number:
                        type: string
                      shipping_carrier:
                        type: string
                    required:
                      - tracking_number
    delete:
      summary: Delete order fulfillment
      tags:
        - Order Fulfillments
      operationId: deleteOrderFulfillment
      description: Delete an order fulfillment
      security:
        - bearer_auth: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                        format: date-time
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    properties:
                      base:
                        type: array
                        items:
                          type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                        format: date-time
    parameters:
      - name: id
        in: path
        description: Order Fulfillment ID
        required: true
        schema:
          type: integer
  /api/v202506/orders:
    get:
      summary: List Commerce Orders
      description: List all commerce orders
      tags:
        - Orders
      operationId: listCommerceOrders
      security:
        - bearer_auth: []
      parameters:
        - name: page
          in: query
          required: false
          description: Page number
          example: 1
          schema:
            type: integer
        - name: per_page
          in: query
          required: false
          description: Number of orders per page
          example: 25
          schema:
            type: integer
        - name: start_date
          in: query
          required: false
          description: Start date
          example: '2025-01-01'
          schema:
            type: string
        - name: end_date
          in: query
          required: false
          description: End date
          example: '2025-01-31'
          schema:
            type: string
        - name: customer_id
          in: query
          required: false
          description: Customer ID
          example: 123
          schema:
            type: integer
        - name: user_company_id
          in: query
          required: false
          description: User company ID
          example: 456
          schema:
            type: integer
        - name: unfulfilled
          in: query
          required: false
          description: Filter for unfulfilled records
          example: true
          schema:
            type: boolean
        - name: unpaid
          in: query
          required: false
          description: Filter for unpaid records
          example: true
          schema:
            type: boolean
        - name: search_query
          in: query
          required: false
          description: Search keyword
          example: john doe
          schema:
            type: string
        - name: within_days
          in: query
          required: false
          description: Limit results to within the last N days
          example: 30
          schema:
            type: integer
        - name: metadata
          in: query
          required: false
          description: Metadata filter in JSON format
          example: '{"some_key": "some_value"}'
          schema:
            type: string
        - name: subscription_id
          in: query
          required: false
          description: Subscription ID
          example: 123
          schema:
            type: integer
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  orders:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        amount:
                          type: string
                          example: '0.0'
                        bill_to:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type:
                                - string
                                - 'null'
                              example: John Doe
                            first_name:
                              type:
                                - string
                                - 'null'
                              example: John
                            last_name:
                              type:
                                - string
                                - 'null'
                              example: Doe
                            address1:
                              type: string
                              example: 123 Main St
                            address2:
                              type:
                                - string
                                - 'null'
                              example: Apt 4B
                            address3:
                              type:
                                - string
                                - 'null'
                              example: Building 5
                            city:
                              type: string
                              example: New York
                            state:
                              type: string
                              example: NY
                            postal_code:
                              type: string
                              example: '10001'
                            country_code:
                              type: string
                              example: US
                            subdivision_code:
                              type:
                                - string
                                - 'null'
                              example: NY
                            default:
                              type: boolean
                              example: true
                        created_at:
                          type: string
                          example: '2025-04-25T08:54:27Z'
                        currency_code:
                          type: string
                          example: USD
                        customer:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            account_id:
                              type: string
                              example: MD5J8DKWII3U7VB6
                            created_at:
                              type: string
                              example: '2025-04-25T08:49:09Z'
                            default_address:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                name:
                                  type:
                                    - string
                                    - 'null'
                                  example: John Doe
                                first_name:
                                  type:
                                    - string
                                    - 'null'
                                  example: John
                                last_name:
                                  type:
                                    - string
                                    - 'null'
                                  example: Doe
                                address1:
                                  type: string
                                  example: 123 Main St
                                address2:
                                  type:
                                    - string
                                    - 'null'
                                  example: Apt 4B
                                address3:
                                  type:
                                    - string
                                    - 'null'
                                  example: Building 5
                                city:
                                  type: string
                                  example: New York
                                state:
                                  type: string
                                  example: NY
                                postal_code:
                                  type: string
                                  example: '10001'
                                country_code:
                                  type: string
                                  example: US
                                subdivision_code:
                                  type:
                                    - string
                                    - 'null'
                                  example: NY
                                default:
                                  type: boolean
                                  example: true
                            email:
                              type: string
                              example: john.doe1@fluid.app
                            first_name:
                              type: string
                              example: Morgan1
                            full_name:
                              type: string
                              example: Morgan1 Olson1
                            last_name:
                              type: string
                              example: Olson1
                            phone:
                              type: string
                              example: '78939067241'
                            external_id:
                              type:
                                - string
                                - 'null'
                              example: ext123456
                        email:
                          type:
                            - string
                            - 'null'
                          example: john.doe1@fluid.app
                        first_name:
                          type:
                            - string
                            - 'null'
                          example: Morgan
                        items:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              ordered_variant:
                                type: array
                                items: {}
                                example: []
                              price:
                                type: string
                                example: '83.72'
                              price_in_currency:
                                type: string
                                example: $83.72 USD
                              quantity:
                                type: integer
                                example: 4
                              sku:
                                type:
                                  - string
                                  - 'null'
                                example: null
                              tax:
                                type: string
                                example: '0.0'
                              title:
                                type: string
                                example: Rev. Mable Morissette
                              total:
                                type: string
                                example: '334.88'
                              variant:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 1
                                  title:
                                    type:
                                      - string
                                      - 'null'
                                    example: Sample Variant
                                  image_path:
                                    type:
                                      - string
                                      - 'null'
                                    example: /images/sample.png
                                  image_url:
                                    type:
                                      - string
                                      - 'null'
                                    example: https://example.com/images/sample.png
                                  primary_image:
                                    type:
                                      - string
                                      - 'null'
                                    example: https://example.com/images/primary.png
                                  price:
                                    type:
                                      - string
                                      - 'null'
                                    example: '34.44'
                                  price_in_currency:
                                    type:
                                      - string
                                      - 'null'
                                    example: $34.44
                                  sku:
                                    type:
                                      - string
                                      - 'null'
                                    example: SKU12345
                                  options:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        title:
                                          type: string
                                          example: Size
                                        value:
                                          type: string
                                          example: XL
                                  product:
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                        example: 1
                                      title:
                                        type: string
                                        example: Sample Product
                                      cv:
                                        type: integer
                                        example: 10
                                      cv_in_currency:
                                        type: string
                                        example: $10.00
                                      image_path:
                                        type:
                                          - string
                                          - 'null'
                                        example: /images/product.png
                                      image_url:
                                        type:
                                          - string
                                          - 'null'
                                        example: https://example.com/images/product.png
                                      price:
                                        type: string
                                        example: '29.99'
                                      price_in_currency:
                                        type: string
                                        example: $29.99
                                      sku:
                                        type:
                                          - string
                                          - 'null'
                                        example: SKU12345
                                      tax:
                                        type: string
                                        example: '2.99'
                                      tax_in_currency:
                                        type: string
                                        example: $2.99
                        last_name:
                          type:
                            - string
                            - 'null'
                          example: Olson
                        note:
                          type:
                            - string
                            - 'null'
                          example: Order notes
                        order_number:
                          type: string
                          example: '1001'
                        ship_to:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type:
                                - string
                                - 'null'
                              example: John Doe
                            first_name:
                              type:
                                - string
                                - 'null'
                              example: John
                            last_name:
                              type:
                                - string
                                - 'null'
                              example: Doe
                            address1:
                              type: string
                              example: 123 Main St
                            address2:
                              type:
                                - string
                                - 'null'
                              example: Apt 4B
                            address3:
                              type:
                                - string
                                - 'null'
                              example: Building 5
                            city:
                              type: string
                              example: New York
                            state:
                              type: string
                              example: NY
                            postal_code:
                              type: string
                              example: '10001'
                            country_code:
                              type: string
                              example: US
                            subdivision_code:
                              type:
                                - string
                                - 'null'
                              example: NY
                            default:
                              type: boolean
                              example: true
                        shipping:
                          type: string
                          example: '0.0'
                        status:
                          type: string
                          example: awaiting_payment
                        tax:
                          type: string
                          example: '0.0'
                        token:
                          type: string
                          example: fo_5gczy7wuboaugpn0hemvec
                        updated_at:
                          type: string
                          example: '2025-04-25T08:54:27Z'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 5d72c7cd-54c5-449d-93f5-6da4631cd267
                      timestamp:
                        type: string
                        example: '2025-04-25T09:13:38Z'
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            example: 1
                          total_pages:
                            type: integer
                            example: 1
                          total_count:
                            type: integer
                            example: 1
                          per_page:
                            type: integer
                            example: 10
                required:
                  - orders
                  - meta
  /api/v202506/orders/{id}:
    get:
      summary: Retrieve Commerce Order
      description: Retrieve a commerce order
      tags:
        - Orders
      operationId: retrieveCommerceOrder
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Order ID
          schema:
            type: integer
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  order:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      amount:
                        type: string
                        example: '0.0'
                      bill_to:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      created_at:
                        type: string
                        example: '2025-04-25T08:54:27Z'
                      currency_code:
                        type: string
                        example: USD
                      customer:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          account_id:
                            type: string
                            example: MD5J8DKWII3U7VB6
                          created_at:
                            type: string
                            example: '2025-04-25T08:49:09Z'
                          default_address:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          email:
                            type: string
                            example: john.doe1@fluid.app
                          first_name:
                            type: string
                            example: Morgan1
                          full_name:
                            type: string
                            example: Morgan1 Olson1
                          last_name:
                            type: string
                            example: Olson1
                          phone:
                            type: string
                            example: '78939067241'
                          external_id:
                            type:
                              - string
                              - 'null'
                            example: ext123456
                      email:
                        type:
                          - string
                          - 'null'
                        example: john.doe1@fluid.app
                      first_name:
                        type:
                          - string
                          - 'null'
                        example: Morgan
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            ordered_variant:
                              type: array
                              items: {}
                              example: []
                            price:
                              type: string
                              example: '83.72'
                            price_in_currency:
                              type: string
                              example: $83.72 USD
                            quantity:
                              type: integer
                              example: 4
                            sku:
                              type:
                                - string
                                - 'null'
                              example: null
                            tax:
                              type: string
                              example: '0.0'
                            title:
                              type: string
                              example: Rev. Mable Morissette
                            total:
                              type: string
                              example: '334.88'
                            variant:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Sample Variant
                                image_path:
                                  type:
                                    - string
                                    - 'null'
                                  example: /images/sample.png
                                image_url:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/sample.png
                                primary_image:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/primary.png
                                price:
                                  type:
                                    - string
                                    - 'null'
                                  example: '34.44'
                                price_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $34.44
                                sku:
                                  type:
                                    - string
                                    - 'null'
                                  example: SKU12345
                                options:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      title:
                                        type: string
                                        example: Size
                                      value:
                                        type: string
                                        example: XL
                                product:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type: string
                                      example: Sample Product
                                    cv:
                                      type: integer
                                      example: 10
                                    cv_in_currency:
                                      type: string
                                      example: $10.00
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/product.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/product.png
                                    price:
                                      type: string
                                      example: '29.99'
                                    price_in_currency:
                                      type: string
                                      example: $29.99
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    tax:
                                      type: string
                                      example: '2.99'
                                    tax_in_currency:
                                      type: string
                                      example: $2.99
                      last_name:
                        type:
                          - string
                          - 'null'
                        example: Olson
                      note:
                        type:
                          - string
                          - 'null'
                        example: Order notes
                      order_number:
                        type: string
                        example: '1001'
                      ship_to:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      shipping:
                        type: string
                        example: '0.0'
                      status:
                        type: string
                        example: awaiting_payment
                      tax:
                        type: string
                        example: '0.0'
                      token:
                        type: string
                        example: fo_5gczy7wuboaugpn0hemvec
                      updated_at:
                        type: string
                        example: '2025-04-25T08:54:27Z'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                      shop_url:
                        type: string
                        example: https://example.com
                required:
                  - order
                  - meta
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    example:
                      order:
                        - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
  /api/orders:
    post:
      summary: Create Order
      description: Create an order from cart
      tags:
        - Orders
      operationId: createOrderFromCart
      security:
        - bearer_auth: []
      parameters:
        - name: cart_token
          in: query
          required: true
          description: Token of the cart to create order from
          schema:
            type: string
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  order:
                    type: object
                    properties:
                      id:
                        type: integer
                      currency_symbol:
                        type: string
                      currency_code:
                        type: string
                      external_id:
                        type:
                          - string
                          - 'null'
                      order_number:
                        type: string
                      token:
                        type: string
                      note:
                        type:
                          - string
                          - 'null'
                      company_logo_url:
                        type:
                          - string
                          - 'null'
                      created_at:
                        type: string
                      customer:
                        type:
                          - string
                          - 'null'
                      email:
                        type:
                          - string
                          - 'null'
                      total:
                        type: string
                      total_in_currency:
                        type: string
                      subtotal:
                        type: string
                        example: '90.00'
                      sub_total:
                        type: string
                        example: '90.00'
                      sub_total_in_currency:
                        type: string
                        example: $90.00
                      tax:
                        type: string
                        example: '2.00'
                      tax_in_currency:
                        type: string
                        example: $2.00
                      transaction_fee:
                        type: number
                        example: '1.00'
                      transaction_fee_in_currency:
                        type: string
                        example: $1.00
                      discount:
                        type: string
                        example: '3.00'
                      discount_in_currency:
                        type: string
                        example: $3.00
                      shipping:
                        type: string
                        example: $11.00
                      shipping_in_currency:
                        type:
                          - object
                          - 'null'
                        properties:
                          amount_in_currency:
                            type: string
                            example: $11.00
                          surcharge_in_currency:
                            type: string
                            example: $11.00
                      refundable_amount:
                        type:
                          - number
                          - string
                        format: float
                        example: 10.5
                      payment_status:
                        type: string
                      enrollment_token:
                        type:
                          - string
                          - 'null'
                      enrollment_pack:
                        type:
                          - object
                          - 'null'
                        properties:
                          enrollment_pack_id:
                            type: integer
                            example: 1
                          additional_volume:
                            type:
                              - integer
                              - 'null'
                            example: 10
                          description:
                            type:
                              - object
                              - 'null'
                              - string
                            properties:
                              id:
                                type: integer
                                example: 111
                              name:
                                type: string
                                example: description
                              body:
                                type: string
                                example: >-
                                  <div>Try the latest and greatest of our sugar
                                  zip packs. Guaranteed to make you skinner and
                                  cure cancer.</div>
                              record_type:
                                type: string
                                example: EnrollmentPack
                              record_id:
                                type: integer
                                example: 1
                              created_at:
                                type: string
                                format: date_time
                                example: '2025-01-16T04:22:43.809Z'
                              updated_at:
                                type: string
                                format: date_time
                                example: '2025-01-22T10:23:52.941Z'
                              locale:
                                type: string
                                example: en
                          enrollment_fee:
                            type:
                              - number
                              - string
                            example: 10
                          enrollment_fee_in_currency:
                            type: string
                            example: $10.00
                          images:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 2
                                relateable_type:
                                  type: string
                                  example: EnrollmentPack
                                relateable_id:
                                  type: integer
                                  example: 1
                                image_url:
                                  type: string
                                  example: >-
                                    https://ik.imagekit.io/fluid/s3/jITWaU14QGe0y5AFgY7P_00179.svg
                                image_path:
                                  type: string
                                  example: jITWaU14QGe0y5AFgY7P_00179.svg
                                position:
                                  type: integer
                                  example: 1
                                shopify_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                                created_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                updated_at:
                                  type: string
                                  format: date_time
                                  example: '2025-01-16T04:22:44.870Z'
                                external_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: null
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 625
                                allow_subscription:
                                  type: boolean
                                  example: true
                                cv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                cv_in_currency:
                                  type: string
                                  example: $0.00
                                enrollment:
                                  type: boolean
                                  example: true
                                enrollment_pack_id:
                                  type: integer
                                  example: 1
                                price:
                                  type: string
                                  example: '11.13'
                                price_in_currency:
                                  type: string
                                  example: $11.13
                                product_title:
                                  type: string
                                  example: Zip Pack Sample Pack (30)
                                quantity:
                                  type: integer
                                  example: 1
                                qv:
                                  type:
                                    - number
                                    - string
                                  example: 0
                                qv_in_currency:
                                  type: string
                                  example: $0.00
                                subscribe_and_save:
                                  type:
                                    - string
                                    - 'null'
                                  example: '-1988.87'
                                subscribe_and_save_for_display:
                                  type:
                                    - string
                                    - 'null'
                                  example: Subscribe and save $-1,988.87
                                subscribe_and_save_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $-1,988.87
                                subscription:
                                  type: boolean
                                  example: false
                                subscription_interval:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_interval_unit:
                                  type:
                                    - string
                                    - 'null'
                                  example: month
                                subscription_only:
                                  type: boolean
                                  example: false
                                subscription_plan_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 1
                                subscription_plans:
                                  oneOf:
                                    - type: array
                                      items:
                                        title: Commerce::SubscriptionPlan
                                        type: object
                                        properties:
                                          id:
                                            type: integer
                                          name:
                                            example: Test Subscription Plan
                                            type: string
                                          billing_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          billing_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          shipping_interval:
                                            example: 1
                                            type: integer
                                            default: 1
                                            minimum: 1
                                          shipping_interval_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type: string
                                            default: month
                                          trial_period:
                                            example: 1
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          trial_period_unit:
                                            description: >-
                                              Possible values: `day`, `week`, `month`,
                                              `year`
                                            example: day
                                            type:
                                              - string
                                              - 'null'
                                          split_volume:
                                            example: true
                                            type: boolean
                                            default: false
                                          max_quantity:
                                            example: 100
                                            type:
                                              - integer
                                              - 'null'
                                            minimum: 1
                                          company_default:
                                            example: false
                                            type:
                                              - boolean
                                              - 'null'
                                            default: false
                                          products_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          subscribers_count:
                                            example: 10
                                            type:
                                              - integer
                                              - 'null'
                                          price:
                                            type: string
                                          price_in_currency:
                                            type: string
                                          subscription_start:
                                            type: string
                                          subscribe_and_save:
                                            type: string
                                          subscribe_and_save_in_currency:
                                            type: string
                                          subscribe_and_save_for_display:
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - billing_interval
                                          - billing_interval_unit
                                          - shipping_interval
                                          - shipping_interval_unit
                                          - split_volume
                                          - price
                                          - price_in_currency
                                          - subscription_start
                                          - subscribe_and_save
                                          - subscribe_and_save_in_currency
                                          - subscribe_and_save_for_display
                                    - type: 'null'
                                subscription_price:
                                  type: string
                                  example: '2000.0'
                                subscription_price_in_currency:
                                  type: string
                                  example: $2,000.00
                                subscription_start:
                                  type:
                                    - string
                                    - 'null'
                                  format: date
                                  example: '2025-02-28'
                                tax:
                                  type: string
                                  example: '0.0'
                                tax_in_currency:
                                  type: string
                                  example: $0.00
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: null
                                display_to_customer:
                                  type: boolean
                                  example: false
                                errors:
                                  oneOf:
                                    - type: 'null'
                                    - type: array
                                      items:
                                        type: object
                                        example:
                                          country:
                                            - >-
                                              This product is not available for this
                                              country. Please change your country
                          price:
                            type:
                              - string
                              - integer
                            example: 11.13
                          price_in_currency:
                            type: string
                            example: $11.13
                          subscription_price:
                            type:
                              - string
                              - integer
                            example: 2000
                          subscription_price_in_currency:
                            type: string
                            example: $2,000.00
                          title:
                            type: string
                            example: enroll product
                          token:
                            type: string
                            example: NxL22AqLRRisfyF9LqxxWRak
                      fulfillment_status:
                        type: string
                      delivery_status:
                        type: string
                      delivery_method:
                        type: string
                      delivery_date:
                        type:
                          - string
                          - 'null'
                        example: '2023-07-29'
                      channel:
                        type: string
                      tags:
                        type: string
                      items_count:
                        type: integer
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 101
                            price:
                              type:
                                - number
                                - string
                              example: 43.41
                            price_in_currency:
                              type: string
                              example: $43.41
                            tax:
                              type: string
                              example: '2.99'
                            tax_in_currency:
                              type: string
                              example: $2.99
                            cv:
                              type: integer
                              example: 5
                            cv_in_currency:
                              type: string
                              example: $5.00
                            qv:
                              type: integer
                              example: 7
                            qv_in_currency:
                              type: string
                              example: $7.00
                            product_title:
                              type: string
                              example: Sample Product
                            variant_title:
                              type:
                                - string
                                - 'null'
                              example: Sample Variant
                            variant_image:
                              type:
                                - string
                                - 'null'
                              example: https://example.com/image.png
                            variant_id:
                              type: integer
                              example: 202
                            quantity:
                              type: integer
                              example: 3
                            title:
                              type: string
                            total:
                              type:
                                - number
                                - string
                            image_url:
                              type:
                                - string
                                - 'null'
                            sku:
                              type:
                                - string
                                - 'null'
                            display_price:
                              type: string
                            display_total:
                              type: string
                            refundable_amount:
                              type:
                                - number
                                - string
                              format: float
                              example: 10.5
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                            display_to_customer:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            ordered_variant:
                              type: array
                              items:
                                type: object
                                properties:
                                  option_type:
                                    type: string
                                  value:
                                    type: string
                            product:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type: string
                                  example: Sample Product
                                cv:
                                  type: integer
                                  example: 10
                                cv_in_currency:
                                  type: string
                                  example: $10.00
                                image_path:
                                  type:
                                    - string
                                    - 'null'
                                  example: /images/product.png
                                image_url:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/product.png
                                price:
                                  type: string
                                  example: '29.99'
                                price_in_currency:
                                  type: string
                                  example: $29.99
                                sku:
                                  type:
                                    - string
                                    - 'null'
                                  example: SKU12345
                                tax:
                                  type: string
                                  example: '2.99'
                                tax_in_currency:
                                  type: string
                                  example: $2.99
                            variant:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Sample Variant
                                image_path:
                                  type:
                                    - string
                                    - 'null'
                                  example: /images/sample.png
                                image_url:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/sample.png
                                primary_image:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/primary.png
                                price:
                                  type:
                                    - string
                                    - 'null'
                                  example: '34.44'
                                price_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $34.44
                                sku:
                                  type:
                                    - string
                                    - 'null'
                                  example: SKU12345
                                options:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      title:
                                        type: string
                                        example: Size
                                      value:
                                        type: string
                                        example: XL
                      activities:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            user_id:
                              type: integer
                            relation_type:
                              type: string
                            relation_id:
                              type: integer
                            contact_id:
                              type: integer
                            title:
                              type: string
                              example: A new order has been placed
                            description:
                              type: string
                              example: Samantha Joseph placed an order on Vandelay Shop
                            formatted_description:
                              type: string
                              example: >-
                                Samantha Joseph placed an order on Vandelay Shop
                                recently
                            read_at:
                              type: string
                            slug:
                              type: string
                            company_id:
                              type: integer
                            created_at:
                              type: string
                      shipping_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          delivery_time_estimate:
                            type:
                              - string
                              - 'null'
                            example: 3-5 business days
                      payment_details:
                        type:
                          - object
                          - 'null'
                        properties:
                          payment_type:
                            type: string
                          details:
                            type: object
                            properties:
                              card_type:
                                type: string
                                example: visa
                              last4_digits:
                                type: string
                                example: '1234'
                      primary_domain_hostname:
                        type:
                          - string
                          - 'null'
                        example: fluid.com
                      company_subdomain:
                        type:
                          - string
                          - 'null'
                        example: myco
                      shipping_total:
                        type: string
                        example: '0.0'
                      shipping_total_for_display:
                        type: string
                        example: Free
                      ship_to:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      bill_to:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      company:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          primary_domain_hostname:
                            type:
                              - string
                              - 'null'
                            example: fluid.com
                          subdomain:
                            type:
                              - string
                              - 'null'
                            example: myco
                          logo_url:
                            type:
                              - string
                              - 'null'
                            example: https://example.com/logo.png
                          fluid_shop:
                            type:
                              - string
                              - 'null'
                            example: https://fluid-sample-shop.fluid.com
                          collect_phone:
                            type:
                              - boolean
                              - 'null'
                            example: true
                          require_phone:
                            type:
                              - boolean
                              - 'null'
                            example: false
                          require_billing_zip:
                            type:
                              - boolean
                              - 'null'
                            example: false
                          checkout_primary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                          checkout_primary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                      metadata:
                        type:
                          - object
                          - 'null'
                    required:
                      - id
                      - currency_symbol
                      - total
                      - payment_status
                      - fulfillment_status
                      - delivery_status
                      - delivery_method
                      - channel
                      - tags
                      - items_count
                      - items
                      - payment_details
                      - ship_to
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                      shop_url:
                        type: string
                required:
                  - order
                  - meta
        '404':
          description: cart not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Cart not found
                  errors:
                    type: object
                    properties:
                      cart:
                        type: array
                        items:
                          type: string
                        example:
                          - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: checkout error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Unable to create order
                  errors:
                    type: object
                    properties:
                      payment:
                        type: array
                        items:
                          type: string
                      cart:
                        type: array
                        items:
                          type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  example: customer@example.com
                status:
                  type: string
                  example: draft
                payment_status:
                  type: string
                  example: marked_paid/free
  /api/orders/{id}/transfer_customer:
    post:
      summary: Transfer an order to a different customer
      tags:
        - Orders
      description: >-
        Transfers an existing order to a different customer within the same
        company
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          description: Order ID
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Order transferred with no address updates
          content:
            application/json:
              schema:
                type: object
                properties:
                  order:
                    type: object
                    properties:
                      id:
                        type: integer
                      email:
                        type:
                          - string
                          - 'null'
                      first_name:
                        type:
                          - string
                          - 'null'
                      last_name:
                        type:
                          - string
                          - 'null'
                      amount:
                        type:
                          - string
                          - 'null'
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      currency_code:
                        type:
                          - string
                          - 'null'
                      order_number:
                        type:
                          - string
                          - 'null'
                      status:
                        type:
                          - string
                          - 'null'
                      note:
                        type:
                          - string
                          - 'null'
                      token:
                        type:
                          - string
                          - 'null'
                      tax:
                        type:
                          - string
                          - 'null'
                      shipping:
                        type:
                          - string
                          - 'null'
                      items:
                        type: array
                        items: {}
                      bill_to:
                        type:
                          - object
                          - 'null'
                      ship_to:
                        type:
                          - object
                          - 'null'
                      customer:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          email:
                            type:
                              - string
                              - 'null'
                          first_name:
                            type:
                              - string
                              - 'null'
                          last_name:
                            type:
                              - string
                              - 'null'
                          phone:
                            type:
                              - string
                              - 'null'
                          full_name:
                            type:
                              - string
                              - 'null'
                          account_id:
                            type:
                              - string
                              - 'null'
                          created_at:
                            type: string
                          default_address:
                            type:
                              - object
                              - 'null'
                          external_id:
                            type:
                              - string
                              - 'null'
                        additionalProperties: true
                    additionalProperties: true
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '404':
          description: Customer not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    properties:
                      order:
                        type: array
                        items:
                          type: string
                      customer:
                        type: array
                        items:
                          type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                required:
                  - error_message
                  - errors
                  - meta
        '422':
          description: Invalid transfer request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    properties:
                      customer:
                        type: array
                        items:
                          type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                required:
                  - error_message
                  - errors
                  - meta
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                customer_id:
                  type: integer
                  description: ID of the customer to transfer the order to
              required:
                - customer_id
  /api/v2/orders:
    get:
      summary: List Orders
      description: Get all orders with optional filters
      tags:
        - Orders
      operationId: listOrder
      security:
        - bearer_auth: []
      parameters:
        - name: customer_id
          in: query
          required: false
          description: Filter orders by customer
          schema:
            type: integer
        - name: user_company_id
          in: query
          required: false
          description: Filter orders by user company
          schema:
            type: integer
        - name: unfulfilled
          in: query
          required: false
          description: Filter unfulfilled orders
          schema:
            type: boolean
        - name: unpaid
          in: query
          required: false
          description: Filter unpaid orders
          schema:
            type: boolean
        - name: search_query
          in: query
          required: false
          description: Search by product SKU
          schema:
            type: string
        - name: within_days
          in: query
          required: false
          description: Filter orders created within the last number of days
          schema:
            type: integer
        - name: date
          in: query
          required: false
          description: 'Filter orders by date range (format: MM/DD/YYYY-MM/DD/YYYY)'
          schema:
            type: string
        - name: page
          in: query
          schema:
            type: integer
            default: 1
          required: false
          description: Page number for pagination
        - name: per_page
          in: query
          schema:
            type: integer
            default: 10
          required: false
          description: Number of records per page
        - name: by_metadata
          in: query
          schema:
            type: string
            default: '{}'
            format: json
          required: false
          description: Search JSON meta data
      responses:
        '200':
          description: Stats remain consistent across pagination
          content:
            application/json:
              schema:
                type: object
                properties:
                  orders:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        order_number:
                          type: string
                          example: F1248177316463
                        currency_code:
                          type: string
                          example: USD
                        currency_symbol:
                          type: string
                          example: $
                        customer_id:
                          type: integer
                          example: 1
                        customer:
                          type: string
                          example: John Doe
                        channel:
                          type: string
                          example: Channel 2
                        payment_status:
                          type: string
                          example: Paid
                        status:
                          type: string
                          example: awaiting_payment
                        fulfillment_status:
                          type: string
                          example: Fulfilled
                        total:
                          type: string
                          example: '100.00'
                        total_in_currency:
                          type: string
                          example: $100.00 USD
                        subtotal:
                          type: string
                          example: '90.00'
                        sub_total:
                          type: string
                          example: '90.00'
                        sub_total_in_currency:
                          type: string
                          example: '90.00'
                        tax:
                          type: string
                          example: '2.00'
                        tax_in_currency:
                          type: string
                          example: $2.00 USD
                        discount:
                          type: string
                          example: '3.00'
                        discount_in_currency:
                          type: string
                          example: $3.00 USD
                        shipping:
                          type: string
                          example: '11.00'
                        note:
                          type:
                            - string
                            - 'null'
                          example: Order note
                        cv:
                          type: integer
                          example: 100
                        qv:
                          type: integer
                          example: 100
                        external_id:
                          type:
                            - string
                            - 'null'
                          example: '1234567890'
                        metadata:
                          type: object
                          example:
                            level: gold
                            tags:
                              - Tag1
                              - Tag2
                            camapaign:
                              id: 1
                              name: Winter 2025
                        shipping_in_currency:
                          type:
                            - object
                            - 'null'
                          properties:
                            amount_in_currency:
                              type: string
                              example: $11.00 USD
                            surcharge_in_currency:
                              type: string
                              example: $2.00 USD
                        delivery_method:
                          type: string
                          example: Courier
                        delivery_status:
                          type: string
                          example: In Transit
                        delivery_date:
                          type:
                            - string
                            - 'null'
                          example: '2023-07-29'
                        tags:
                          type: string
                          example: Tag 1
                        created_at:
                          type: string
                          example: '2023-07-24T10:00:00.000Z'
                        items_count:
                          type: integer
                          example: 2
                        enrollment_token:
                          type:
                            - string
                            - 'null'
                          example: et_12ad8jjhuxhtv4qlmn6poz
                        enrollment_pack_id:
                          type:
                            - integer
                            - 'null'
                          example: 1
                        rep:
                          type:
                            - object
                            - 'null'
                          example:
                            email:
                              type: string
                              example: john.doe@example.com
                            name:
                              type: string
                              example: John Doe
                            id:
                              type: integer
                              example: 1
                            image_url:
                              type: string
                              example: https://example.com/image.png
                            external_id:
                              type: string
                              example: '1234567890'
                        ship_to:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type:
                                - string
                                - 'null'
                              example: John Doe
                            first_name:
                              type:
                                - string
                                - 'null'
                              example: John
                            last_name:
                              type:
                                - string
                                - 'null'
                              example: Doe
                            address1:
                              type: string
                              example: 123 Main St
                            address2:
                              type:
                                - string
                                - 'null'
                              example: Apt 4B
                            address3:
                              type:
                                - string
                                - 'null'
                              example: Building 5
                            city:
                              type: string
                              example: New York
                            state:
                              type: string
                              example: NY
                            postal_code:
                              type: string
                              example: '10001'
                            country_code:
                              type: string
                              example: US
                            subdivision_code:
                              type:
                                - string
                                - 'null'
                              example: NY
                            default:
                              type: boolean
                              example: true
                        bill_to:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type:
                                - string
                                - 'null'
                              example: John Doe
                            first_name:
                              type:
                                - string
                                - 'null'
                              example: John
                            last_name:
                              type:
                                - string
                                - 'null'
                              example: Doe
                            address1:
                              type: string
                              example: 123 Main St
                            address2:
                              type:
                                - string
                                - 'null'
                              example: Apt 4B
                            address3:
                              type:
                                - string
                                - 'null'
                              example: Building 5
                            city:
                              type: string
                              example: New York
                            state:
                              type: string
                              example: NY
                            postal_code:
                              type: string
                              example: '10001'
                            country_code:
                              type: string
                              example: US
                            subdivision_code:
                              type:
                                - string
                                - 'null'
                              example: NY
                            default:
                              type: boolean
                              example: true
                        activities:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                              user_id:
                                type: integer
                              relation_type:
                                type: string
                              relation_id:
                                type: integer
                              contact_id:
                                type: integer
                              title:
                                type: string
                                example: A new order has been placed
                              description:
                                type: string
                                example: >-
                                  Samantha Joseph placed an order on Vandelay
                                  Shop
                              formatted_description:
                                type: string
                                example: >-
                                  Samantha Joseph placed an order on Vandelay
                                  Shop recently
                              read_at:
                                type: string
                              slug:
                                type: string
                              company_id:
                                type: integer
                              created_at:
                                type: string
                        items:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              title:
                                type: string
                                example: Hula Hoop
                              quantity:
                                type: integer
                                example: 3
                              price:
                                type:
                                  - number
                                  - string
                                example: 5.5
                              display_price:
                                type: string
                                example: $5.5 USD
                              total:
                                type:
                                  - number
                                  - string
                                example: 16.5
                              display_total:
                                type: string
                                example: $16.5 USD
                              image_url:
                                type:
                                  - string
                                  - 'null'
                                example: https://example.com/test_image.jpg
                              sku:
                                type:
                                  - string
                                  - 'null'
                                example: ABC-12345-S-BL
                              cv:
                                type: integer
                                example: 100
                              qv:
                                type: integer
                                example: 100
                              ordered_variant:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    option_type:
                                      type: string
                                      example: Size
                                    value:
                                      type: string
                                      example: XXL
                        company:
                          type: object
                          properties:
                            id:
                              type: integer
                            name:
                              type: string
                            primary_domain_hostname:
                              type:
                                - string
                                - 'null'
                              example: fluid.com
                            subdomain:
                              type:
                                - string
                                - 'null'
                              example: myco
                            logo_url:
                              type:
                                - string
                                - 'null'
                              example: https://example.com/logo.png
                            fluid_shop:
                              type:
                                - string
                                - 'null'
                              example: https://fluid-sample-shop.fluid.com
                            collect_phone:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            require_phone:
                              type:
                                - boolean
                                - 'null'
                              example: false
                            require_billing_zip:
                              type:
                                - boolean
                                - 'null'
                              example: false
                            checkout_primary_button_color:
                              type:
                                - string
                                - 'null'
                              example: '#000000'
                            checkout_primary_text_color:
                              type:
                                - string
                                - 'null'
                              example: '#FFFFFF'
                            checkout_secondary_button_color:
                              type:
                                - string
                                - 'null'
                              example: '#FFFFFF'
                            checkout_secondary_text_color:
                              type:
                                - string
                                - 'null'
                              example: '#000000'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 84eadc2f-4e51-4e3f-9f96-e8d7ba35cea4
                      timestamp:
                        type: string
                        example: '2025-05-07T08:25:35Z'
                      current_page:
                        type: integer
                        example: 2
                      next_page:
                        type:
                          - integer
                          - 'null'
                      prev_page:
                        type:
                          - integer
                          - 'null'
                      total_pages:
                        type: integer
                        example: 4
                      total_count:
                        type: integer
                        example: 10
                      average_cv:
                        type: number
                        example: 55
                        format: float
                      total_cv:
                        type: integer
                        example: 550
                      average_amount_base:
                        type: number
                        example: 550
                        format: float
                      total_amount_base:
                        type: integer
                        example: 5500
                      fulfilled_orders_count:
                        type: integer
                        example: 10
                required:
                  - orders
                  - meta
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  data:
                    type: object
                    properties:
                      error:
                        type: string
                        example: >-
                          The value `{referred_by: {user: 'John},}` in parameter
                          `by_metadata` is not a valid JSON
  /api/v2/orders/stats:
    get:
      summary: Orders' stats
      description: Get statistics for orders
      tags:
        - Orders
      security:
        - bearer_auth: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_orders:
                    type: integer
                    example: 10
                  total_cancelled_orders:
                    type: integer
                    example: 5
                  total_shipped_orders:
                    type: integer
                    example: 5
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
  /api/v2/orders/{id}:
    get:
      summary: Show Order
      parameters:
        - name: id
          in: path
          description: Order ID
          required: true
          schema:
            type: integer
      description: Show Order Information
      tags:
        - Orders
      security:
        - bearer_auth: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  order:
                    type: object
                    properties:
                      id:
                        type: integer
                      order_number:
                        type: string
                        example: F1248177316463
                      currency_code:
                        type: string
                        example: USD
                      currency_symbol:
                        type: string
                        example: $
                      created_at:
                        type: string
                        example: '2023-07-24T10:00:00.000Z'
                      customer:
                        type: object
                        properties:
                          id:
                            type: integer
                          account_id:
                            type: string
                          first_name:
                            type: string
                          last_name:
                            type: string
                          full_name:
                            type: string
                          email:
                            type: string
                          verified_email:
                            type: boolean
                          phone:
                            type: string
                          orders_count:
                            type: integer
                          total_spent:
                            type:
                              - number
                              - string
                          display_total_spent:
                            type: string
                          last_order_id:
                            type:
                              - integer
                              - 'null'
                          notes:
                            type:
                              - string
                              - 'null'
                          user_company_id:
                            type:
                              - integer
                              - 'null'
                          created_at:
                            type: string
                          active:
                            type: boolean
                          active_subscriptions_count:
                            type: integer
                          inactive_subscriptions_count:
                            type: integer
                          is_rep:
                            type: boolean
                          external_id:
                            type:
                              - string
                              - 'null'
                          metadata:
                            type: object
                            description: >-
                              A JSON object that can store any custom data
                              structure.
                          default_address:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          addresses:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                name:
                                  type:
                                    - string
                                    - 'null'
                                  example: John Doe
                                first_name:
                                  type:
                                    - string
                                    - 'null'
                                  example: John
                                last_name:
                                  type:
                                    - string
                                    - 'null'
                                  example: Doe
                                address1:
                                  type: string
                                  example: 123 Main St
                                address2:
                                  type:
                                    - string
                                    - 'null'
                                  example: Apt 4B
                                address3:
                                  type:
                                    - string
                                    - 'null'
                                  example: Building 5
                                city:
                                  type: string
                                  example: New York
                                state:
                                  type: string
                                  example: NY
                                postal_code:
                                  type: string
                                  example: '10001'
                                country_code:
                                  type: string
                                  example: US
                                subdivision_code:
                                  type:
                                    - string
                                    - 'null'
                                  example: NY
                                default:
                                  type: boolean
                                  example: true
                          customer_notes:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                customer_id:
                                  type: integer
                                user_company_id:
                                  type:
                                    - integer
                                    - 'null'
                                note:
                                  type: string
                                resource_type:
                                  type:
                                    - string
                                    - 'null'
                                resource_id:
                                  type:
                                    - integer
                                    - 'null'
                                created_at:
                                  type: string
                          total_orders:
                            type: integer
                            example: 12
                          user_id:
                            type:
                              - integer
                              - 'null'
                      fulfillment_status:
                        type: string
                        example: Fulfilled
                      payment_status:
                        type: string
                        example: Paid
                      note:
                        type:
                          - string
                          - 'null'
                        example: Order notes
                      notes:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              description: Id of the customer note
                            user_company_id:
                              type:
                                - integer
                                - 'null'
                              description: Id of UserCompany who created the customer note
                            customer_id:
                              type: integer
                              description: Id of Customer associated with the customer note
                            note:
                              type: string
                              description: Note of the customer note
                            resource_type:
                              type:
                                - string
                                - 'null'
                              description: Type of Resource attached with the customer note
                            resource_id:
                              type:
                                - integer
                                - 'null'
                              description: >-
                                Id of Resource specified in the `resource_type`
                                field
                            created_at:
                              type: string
                              description: Time the customer note was created
                      rep:
                        type:
                          - object
                          - 'null'
                        example:
                          email:
                            type: string
                            example: john.doe@example.com
                          name:
                            type: string
                            example: John Doe
                          id:
                            type: integer
                            example: 1
                          image_url:
                            type: string
                            example: https://example.com/image.png
                          external_id:
                            type: string
                            example: '1234567890'
                      company:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          primary_domain_hostname:
                            type:
                              - string
                              - 'null'
                            example: fluid.com
                          subdomain:
                            type:
                              - string
                              - 'null'
                            example: myco
                          logo_url:
                            type:
                              - string
                              - 'null'
                            example: https://example.com/logo.png
                          fluid_shop:
                            type:
                              - string
                              - 'null'
                            example: https://fluid-sample-shop.fluid.com
                          collect_phone:
                            type:
                              - boolean
                              - 'null'
                            example: true
                          require_phone:
                            type:
                              - boolean
                              - 'null'
                            example: false
                          require_billing_zip:
                            type:
                              - boolean
                              - 'null'
                            example: false
                          checkout_primary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                          checkout_primary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                      refunds:
                        type:
                          - array
                          - 'null'
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            amount:
                              type: string
                              example: '10.00'
                            reason:
                              type: string
                              example: Refund reason
                            cv:
                              type: integer
                              example: 1
                            qv:
                              type: integer
                              example: 1
                            refund_type:
                              type: string
                              example: Refund type
                      activities:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            user_id:
                              type: integer
                            relation_type:
                              type: string
                            relation_id:
                              type: integer
                            contact_id:
                              type: integer
                            title:
                              type: string
                              example: A new order has been placed
                            description:
                              type: string
                              example: Samantha Joseph placed an order on Vandelay Shop
                            formatted_description:
                              type: string
                              example: >-
                                Samantha Joseph placed an order on Vandelay Shop
                                recently
                            read_at:
                              type: string
                            slug:
                              type: string
                            company_id:
                              type: integer
                            created_at:
                              type: string
                      payment_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          spreedly_token:
                            type: string
                          full_name:
                            type: string
                          month:
                            type: integer
                          year:
                            type: integer
                          number:
                            type: string
                          last_four_digits:
                            type:
                              - string
                              - 'null'
                          first_six_digits:
                            type:
                              - string
                              - 'null'
                          card_type:
                            type:
                              - string
                              - 'null'
                          default:
                            type: boolean
                          email:
                            type:
                              - string
                              - 'null'
                          source:
                            type: string
                      total:
                        type: string
                        example: '100.00'
                      total_in_currency:
                        type: string
                        example: $100.00 USD
                      sub_total:
                        type: string
                        example: '90.00'
                      subtotal:
                        type: string
                        example: '90.00'
                      sub_total_in_currency:
                        type: string
                        example: $90.00 USD
                      shipping:
                        type: object
                        properties:
                          amount:
                            type: string
                            example: '5.00'
                          surcharge:
                            type: string
                            example: '2.00'
                          amount_in_currency:
                            type: string
                            example: $5.00 USD
                          surcharge_in_currency:
                            type: string
                            example: $2.00 USD
                      items_count:
                        type: integer
                        example: 10
                      metadata:
                        type: object
                        example:
                          level: gold
                          tags:
                            - Tag1
                            - Tag2
                          camapaign:
                            id: 1
                            name: Winter 2025
                      transaction_fee:
                        type:
                          - number
                          - string
                        example: 3
                      transaction_fee_in_currency:
                        type: string
                        example: $3.00 USD
                      enrollment_fee:
                        type:
                          - number
                          - string
                        example: 3
                      enrollment_fee_in_currency:
                        type: string
                        example: $3.00 USD
                      discount:
                        type: string
                        example: '10.00'
                      tax:
                        type: string
                        example: '8.00'
                      dynamic_charges:
                        type: object
                        example:
                          handling: 2
                      dynamic_charges_in_currency:
                        type: object
                        example:
                          handling: $2.00 USD
                      shipping_address:
                        type: object
                        properties:
                          id:
                            type: integer
                          address1:
                            type: string
                            example: 123 Ship St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 123
                          city:
                            type: string
                            example: Ship City
                          state:
                            type: string
                            example: ST
                          postal_code:
                            type: string
                            example: '12345'
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: ST
                          country_code:
                            type: string
                            example: US
                      billing_address:
                        type: object
                        properties:
                          id:
                            type: integer
                          address1:
                            type: string
                            example: 456 Bill St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 456
                          city:
                            type: string
                            example: Bill City
                          state:
                            type: string
                            example: ST
                          postal_code:
                            type: string
                            example: '67890'
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: ST
                          country_code:
                            type: string
                            example: US
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            title:
                              type: string
                              example: Hula Hoop
                            quantity:
                              type: integer
                              example: 3
                            price:
                              type:
                                - number
                                - string
                              example: 5.5
                            display_price:
                              type: string
                              example: $5.5 USD
                            total:
                              type:
                                - number
                                - string
                              example: 16.5
                            display_total:
                              type: string
                              example: $16.5 USD
                            image_url:
                              type:
                                - string
                                - 'null'
                              example: https://example.com/test_image.jpg
                            sku:
                              type:
                                - string
                                - 'null'
                              example: ABC-12345-S-BL
                            cv:
                              type: integer
                              example: 100
                            qv:
                              type: integer
                              example: 100
                            ordered_variant:
                              type: array
                              items:
                                type: object
                                properties:
                                  option_type:
                                    type: string
                                    example: Size
                                  value:
                                    type: string
                                    example: XXL
                            hs_code:
                              type: string
                              example: HS123
                            total_in_currency:
                              type: string
                              example: $11.0 USD
                            price_in_currency:
                              type: string
                              example: $29.99
                            tax:
                              type: string
                              example: '2.99'
                            tax_in_currency:
                              type: string
                              example: $2.99
                            thumbnail:
                              type: string
                              example: https://example.com/test_image.jpg
                            variant:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Sample Variant
                                image_path:
                                  type:
                                    - string
                                    - 'null'
                                  example: /images/sample.png
                                image_url:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/sample.png
                                primary_image:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/primary.png
                                price:
                                  type:
                                    - string
                                    - 'null'
                                  example: '34.44'
                                price_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $34.44
                                sku:
                                  type:
                                    - string
                                    - 'null'
                                  example: SKU12345
                                options:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      title:
                                        type: string
                                        example: Size
                                      value:
                                        type: string
                                        example: XL
                      discount_in_currency:
                        type: string
                        example: $10.00 USD
                      tax_in_currency:
                        type: string
                        example: $8.00 USD
                      cv:
                        type: integer
                        example: 100
                      qv:
                        type: integer
                        example: 100
                      status:
                        type: string
                        example: awaiting_payment
                      external_id:
                        type:
                          - string
                          - 'null'
                        example: '1234567890'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: order belongs to a different company
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: fail
                  data:
                    type: object
                    properties:
                      error:
                        type: string
                        example: Order not found.
  /api/v2/orders/{id}/cancel:
    patch:
      summary: Cancel an Order
      description: Cancel an order
      tags:
        - Orders
      security:
        - bearer_auth: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Order cancelled successfully
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: error
                  data:
                    type: object
                    properties:
                      error:
                        type: string
                        example: Order cannot be cancelled
    parameters:
      - name: id
        in: path
        description: Order ID
        required: true
        schema:
          type: string
  /api/v2/orders/{id}/charge:
    post:
      summary: Charge an Order
      description: Charge an order. Order must be in `awaiting_payment` status
      tags:
        - Orders
      security:
        - bearer_auth: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Order charged successfully
        '422':
          description: payment failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: fail
                  data:
                    type: object
                    properties:
                      error:
                        type: string
                        example: Payment failed
    parameters:
      - name: id
        in: path
        description: Order ID
        required: true
        schema:
          type: string
  /api/v2/orders/{id}/append_metadata:
    patch:
      summary: Append metadata field
      tags:
        - Orders
      operationId: orderAppendMetadataField
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Orders's Id
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  order:
                    type: object
                    properties:
                      id:
                        type: integer
                      order_number:
                        type: string
                        example: F1248177316463
                      currency_code:
                        type: string
                        example: USD
                      currency_symbol:
                        type: string
                        example: $
                      created_at:
                        type: string
                        example: '2023-07-24T10:00:00.000Z'
                      customer:
                        type: object
                        properties:
                          id:
                            type: integer
                          account_id:
                            type: string
                          first_name:
                            type: string
                          last_name:
                            type: string
                          full_name:
                            type: string
                          email:
                            type: string
                          verified_email:
                            type: boolean
                          phone:
                            type: string
                          orders_count:
                            type: integer
                          total_spent:
                            type:
                              - number
                              - string
                          display_total_spent:
                            type: string
                          last_order_id:
                            type:
                              - integer
                              - 'null'
                          notes:
                            type:
                              - string
                              - 'null'
                          user_company_id:
                            type:
                              - integer
                              - 'null'
                          created_at:
                            type: string
                          active:
                            type: boolean
                          active_subscriptions_count:
                            type: integer
                          inactive_subscriptions_count:
                            type: integer
                          is_rep:
                            type: boolean
                          external_id:
                            type:
                              - string
                              - 'null'
                          metadata:
                            type: object
                            description: >-
                              A JSON object that can store any custom data
                              structure.
                          default_address:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          addresses:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                name:
                                  type:
                                    - string
                                    - 'null'
                                  example: John Doe
                                first_name:
                                  type:
                                    - string
                                    - 'null'
                                  example: John
                                last_name:
                                  type:
                                    - string
                                    - 'null'
                                  example: Doe
                                address1:
                                  type: string
                                  example: 123 Main St
                                address2:
                                  type:
                                    - string
                                    - 'null'
                                  example: Apt 4B
                                address3:
                                  type:
                                    - string
                                    - 'null'
                                  example: Building 5
                                city:
                                  type: string
                                  example: New York
                                state:
                                  type: string
                                  example: NY
                                postal_code:
                                  type: string
                                  example: '10001'
                                country_code:
                                  type: string
                                  example: US
                                subdivision_code:
                                  type:
                                    - string
                                    - 'null'
                                  example: NY
                                default:
                                  type: boolean
                                  example: true
                          customer_notes:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                customer_id:
                                  type: integer
                                user_company_id:
                                  type:
                                    - integer
                                    - 'null'
                                note:
                                  type: string
                                resource_type:
                                  type:
                                    - string
                                    - 'null'
                                resource_id:
                                  type:
                                    - integer
                                    - 'null'
                                created_at:
                                  type: string
                          total_orders:
                            type: integer
                            example: 12
                          user_id:
                            type:
                              - integer
                              - 'null'
                      fulfillment_status:
                        type: string
                        example: Fulfilled
                      payment_status:
                        type: string
                        example: Paid
                      note:
                        type:
                          - string
                          - 'null'
                        example: Order notes
                      notes:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              description: Id of the customer note
                            user_company_id:
                              type:
                                - integer
                                - 'null'
                              description: Id of UserCompany who created the customer note
                            customer_id:
                              type: integer
                              description: Id of Customer associated with the customer note
                            note:
                              type: string
                              description: Note of the customer note
                            resource_type:
                              type:
                                - string
                                - 'null'
                              description: Type of Resource attached with the customer note
                            resource_id:
                              type:
                                - integer
                                - 'null'
                              description: >-
                                Id of Resource specified in the `resource_type`
                                field
                            created_at:
                              type: string
                              description: Time the customer note was created
                      rep:
                        type:
                          - object
                          - 'null'
                        example:
                          email:
                            type: string
                            example: john.doe@example.com
                          name:
                            type: string
                            example: John Doe
                          id:
                            type: integer
                            example: 1
                          image_url:
                            type: string
                            example: https://example.com/image.png
                          external_id:
                            type: string
                            example: '1234567890'
                      company:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          primary_domain_hostname:
                            type:
                              - string
                              - 'null'
                            example: fluid.com
                          subdomain:
                            type:
                              - string
                              - 'null'
                            example: myco
                          logo_url:
                            type:
                              - string
                              - 'null'
                            example: https://example.com/logo.png
                          fluid_shop:
                            type:
                              - string
                              - 'null'
                            example: https://fluid-sample-shop.fluid.com
                          collect_phone:
                            type:
                              - boolean
                              - 'null'
                            example: true
                          require_phone:
                            type:
                              - boolean
                              - 'null'
                            example: false
                          require_billing_zip:
                            type:
                              - boolean
                              - 'null'
                            example: false
                          checkout_primary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                          checkout_primary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                      refunds:
                        type:
                          - array
                          - 'null'
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            amount:
                              type: string
                              example: '10.00'
                            reason:
                              type: string
                              example: Refund reason
                            cv:
                              type: integer
                              example: 1
                            qv:
                              type: integer
                              example: 1
                            refund_type:
                              type: string
                              example: Refund type
                      activities:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            user_id:
                              type: integer
                            relation_type:
                              type: string
                            relation_id:
                              type: integer
                            contact_id:
                              type: integer
                            title:
                              type: string
                              example: A new order has been placed
                            description:
                              type: string
                              example: Samantha Joseph placed an order on Vandelay Shop
                            formatted_description:
                              type: string
                              example: >-
                                Samantha Joseph placed an order on Vandelay Shop
                                recently
                            read_at:
                              type: string
                            slug:
                              type: string
                            company_id:
                              type: integer
                            created_at:
                              type: string
                      payment_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          spreedly_token:
                            type: string
                          full_name:
                            type: string
                          month:
                            type: integer
                          year:
                            type: integer
                          number:
                            type: string
                          last_four_digits:
                            type:
                              - string
                              - 'null'
                          first_six_digits:
                            type:
                              - string
                              - 'null'
                          card_type:
                            type:
                              - string
                              - 'null'
                          default:
                            type: boolean
                          email:
                            type:
                              - string
                              - 'null'
                          source:
                            type: string
                      total:
                        type: string
                        example: '100.00'
                      total_in_currency:
                        type: string
                        example: $100.00 USD
                      sub_total:
                        type: string
                        example: '90.00'
                      subtotal:
                        type: string
                        example: '90.00'
                      sub_total_in_currency:
                        type: string
                        example: $90.00 USD
                      shipping:
                        type: object
                        properties:
                          amount:
                            type: string
                            example: '5.00'
                          surcharge:
                            type: string
                            example: '2.00'
                          amount_in_currency:
                            type: string
                            example: $5.00 USD
                          surcharge_in_currency:
                            type: string
                            example: $2.00 USD
                      items_count:
                        type: integer
                        example: 10
                      metadata:
                        type: object
                        example:
                          level: gold
                          tags:
                            - Tag1
                            - Tag2
                          camapaign:
                            id: 1
                            name: Winter 2025
                      transaction_fee:
                        type:
                          - number
                          - string
                        example: 3
                      transaction_fee_in_currency:
                        type: string
                        example: $3.00 USD
                      enrollment_fee:
                        type:
                          - number
                          - string
                        example: 3
                      enrollment_fee_in_currency:
                        type: string
                        example: $3.00 USD
                      discount:
                        type: string
                        example: '10.00'
                      tax:
                        type: string
                        example: '8.00'
                      dynamic_charges:
                        type: object
                        example:
                          handling: 2
                      dynamic_charges_in_currency:
                        type: object
                        example:
                          handling: $2.00 USD
                      shipping_address:
                        type: object
                        properties:
                          id:
                            type: integer
                          address1:
                            type: string
                            example: 123 Ship St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 123
                          city:
                            type: string
                            example: Ship City
                          state:
                            type: string
                            example: ST
                          postal_code:
                            type: string
                            example: '12345'
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: ST
                          country_code:
                            type: string
                            example: US
                      billing_address:
                        type: object
                        properties:
                          id:
                            type: integer
                          address1:
                            type: string
                            example: 456 Bill St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 456
                          city:
                            type: string
                            example: Bill City
                          state:
                            type: string
                            example: ST
                          postal_code:
                            type: string
                            example: '67890'
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: ST
                          country_code:
                            type: string
                            example: US
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            title:
                              type: string
                              example: Hula Hoop
                            quantity:
                              type: integer
                              example: 3
                            price:
                              type:
                                - number
                                - string
                              example: 5.5
                            display_price:
                              type: string
                              example: $5.5 USD
                            total:
                              type:
                                - number
                                - string
                              example: 16.5
                            display_total:
                              type: string
                              example: $16.5 USD
                            image_url:
                              type:
                                - string
                                - 'null'
                              example: https://example.com/test_image.jpg
                            sku:
                              type:
                                - string
                                - 'null'
                              example: ABC-12345-S-BL
                            cv:
                              type: integer
                              example: 100
                            qv:
                              type: integer
                              example: 100
                            ordered_variant:
                              type: array
                              items:
                                type: object
                                properties:
                                  option_type:
                                    type: string
                                    example: Size
                                  value:
                                    type: string
                                    example: XXL
                            hs_code:
                              type: string
                              example: HS123
                            total_in_currency:
                              type: string
                              example: $11.0 USD
                            price_in_currency:
                              type: string
                              example: $29.99
                            tax:
                              type: string
                              example: '2.99'
                            tax_in_currency:
                              type: string
                              example: $2.99
                            thumbnail:
                              type: string
                              example: https://example.com/test_image.jpg
                            variant:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Sample Variant
                                image_path:
                                  type:
                                    - string
                                    - 'null'
                                  example: /images/sample.png
                                image_url:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/sample.png
                                primary_image:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/primary.png
                                price:
                                  type:
                                    - string
                                    - 'null'
                                  example: '34.44'
                                price_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $34.44
                                sku:
                                  type:
                                    - string
                                    - 'null'
                                  example: SKU12345
                                options:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      title:
                                        type: string
                                        example: Size
                                      value:
                                        type: string
                                        example: XL
                      discount_in_currency:
                        type: string
                        example: $10.00 USD
                      tax_in_currency:
                        type: string
                        example: $8.00 USD
                      cv:
                        type: integer
                        example: 100
                      qv:
                        type: integer
                        example: 100
                      status:
                        type: string
                        example: awaiting_payment
                      external_id:
                        type:
                          - string
                          - 'null'
                        example: '1234567890'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - Order not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                metadata:
                  type: object
                  description: >-
                    A JSON object that can store any custom data structure. When
                    provided, merges with existing metadata data.
              required:
                - metadata
  /api/v2/orders/{id}/remove_metadata:
    patch:
      summary: Remove metadata field(s)
      tags:
        - Orders
      operationId: orderRemoveMetadataField
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Order ID
          schema:
            type: integer
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  order:
                    type: object
                    properties:
                      id:
                        type: integer
                      order_number:
                        type: string
                        example: F1248177316463
                      currency_code:
                        type: string
                        example: USD
                      currency_symbol:
                        type: string
                        example: $
                      created_at:
                        type: string
                        example: '2023-07-24T10:00:00.000Z'
                      customer:
                        type: object
                        properties:
                          id:
                            type: integer
                          account_id:
                            type: string
                          first_name:
                            type: string
                          last_name:
                            type: string
                          full_name:
                            type: string
                          email:
                            type: string
                          verified_email:
                            type: boolean
                          phone:
                            type: string
                          orders_count:
                            type: integer
                          total_spent:
                            type:
                              - number
                              - string
                          display_total_spent:
                            type: string
                          last_order_id:
                            type:
                              - integer
                              - 'null'
                          notes:
                            type:
                              - string
                              - 'null'
                          user_company_id:
                            type:
                              - integer
                              - 'null'
                          created_at:
                            type: string
                          active:
                            type: boolean
                          active_subscriptions_count:
                            type: integer
                          inactive_subscriptions_count:
                            type: integer
                          is_rep:
                            type: boolean
                          external_id:
                            type:
                              - string
                              - 'null'
                          metadata:
                            type: object
                            description: >-
                              A JSON object that can store any custom data
                              structure.
                          default_address:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          addresses:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                name:
                                  type:
                                    - string
                                    - 'null'
                                  example: John Doe
                                first_name:
                                  type:
                                    - string
                                    - 'null'
                                  example: John
                                last_name:
                                  type:
                                    - string
                                    - 'null'
                                  example: Doe
                                address1:
                                  type: string
                                  example: 123 Main St
                                address2:
                                  type:
                                    - string
                                    - 'null'
                                  example: Apt 4B
                                address3:
                                  type:
                                    - string
                                    - 'null'
                                  example: Building 5
                                city:
                                  type: string
                                  example: New York
                                state:
                                  type: string
                                  example: NY
                                postal_code:
                                  type: string
                                  example: '10001'
                                country_code:
                                  type: string
                                  example: US
                                subdivision_code:
                                  type:
                                    - string
                                    - 'null'
                                  example: NY
                                default:
                                  type: boolean
                                  example: true
                          customer_notes:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                customer_id:
                                  type: integer
                                user_company_id:
                                  type:
                                    - integer
                                    - 'null'
                                note:
                                  type: string
                                resource_type:
                                  type:
                                    - string
                                    - 'null'
                                resource_id:
                                  type:
                                    - integer
                                    - 'null'
                                created_at:
                                  type: string
                          total_orders:
                            type: integer
                            example: 12
                          user_id:
                            type:
                              - integer
                              - 'null'
                      fulfillment_status:
                        type: string
                        example: Fulfilled
                      payment_status:
                        type: string
                        example: Paid
                      note:
                        type:
                          - string
                          - 'null'
                        example: Order notes
                      notes:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              description: Id of the customer note
                            user_company_id:
                              type:
                                - integer
                                - 'null'
                              description: Id of UserCompany who created the customer note
                            customer_id:
                              type: integer
                              description: Id of Customer associated with the customer note
                            note:
                              type: string
                              description: Note of the customer note
                            resource_type:
                              type:
                                - string
                                - 'null'
                              description: Type of Resource attached with the customer note
                            resource_id:
                              type:
                                - integer
                                - 'null'
                              description: >-
                                Id of Resource specified in the `resource_type`
                                field
                            created_at:
                              type: string
                              description: Time the customer note was created
                      rep:
                        type:
                          - object
                          - 'null'
                        example:
                          email:
                            type: string
                            example: john.doe@example.com
                          name:
                            type: string
                            example: John Doe
                          id:
                            type: integer
                            example: 1
                          image_url:
                            type: string
                            example: https://example.com/image.png
                          external_id:
                            type: string
                            example: '1234567890'
                      company:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                          primary_domain_hostname:
                            type:
                              - string
                              - 'null'
                            example: fluid.com
                          subdomain:
                            type:
                              - string
                              - 'null'
                            example: myco
                          logo_url:
                            type:
                              - string
                              - 'null'
                            example: https://example.com/logo.png
                          fluid_shop:
                            type:
                              - string
                              - 'null'
                            example: https://fluid-sample-shop.fluid.com
                          collect_phone:
                            type:
                              - boolean
                              - 'null'
                            example: true
                          require_phone:
                            type:
                              - boolean
                              - 'null'
                            example: false
                          require_billing_zip:
                            type:
                              - boolean
                              - 'null'
                            example: false
                          checkout_primary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                          checkout_primary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_button_color:
                            type:
                              - string
                              - 'null'
                            example: '#FFFFFF'
                          checkout_secondary_text_color:
                            type:
                              - string
                              - 'null'
                            example: '#000000'
                      refunds:
                        type:
                          - array
                          - 'null'
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            amount:
                              type: string
                              example: '10.00'
                            reason:
                              type: string
                              example: Refund reason
                            cv:
                              type: integer
                              example: 1
                            qv:
                              type: integer
                              example: 1
                            refund_type:
                              type: string
                              example: Refund type
                      activities:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            user_id:
                              type: integer
                            relation_type:
                              type: string
                            relation_id:
                              type: integer
                            contact_id:
                              type: integer
                            title:
                              type: string
                              example: A new order has been placed
                            description:
                              type: string
                              example: Samantha Joseph placed an order on Vandelay Shop
                            formatted_description:
                              type: string
                              example: >-
                                Samantha Joseph placed an order on Vandelay Shop
                                recently
                            read_at:
                              type: string
                            slug:
                              type: string
                            company_id:
                              type: integer
                            created_at:
                              type: string
                      payment_method:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          spreedly_token:
                            type: string
                          full_name:
                            type: string
                          month:
                            type: integer
                          year:
                            type: integer
                          number:
                            type: string
                          last_four_digits:
                            type:
                              - string
                              - 'null'
                          first_six_digits:
                            type:
                              - string
                              - 'null'
                          card_type:
                            type:
                              - string
                              - 'null'
                          default:
                            type: boolean
                          email:
                            type:
                              - string
                              - 'null'
                          source:
                            type: string
                      total:
                        type: string
                        example: '100.00'
                      total_in_currency:
                        type: string
                        example: $100.00 USD
                      sub_total:
                        type: string
                        example: '90.00'
                      subtotal:
                        type: string
                        example: '90.00'
                      sub_total_in_currency:
                        type: string
                        example: $90.00 USD
                      shipping:
                        type: object
                        properties:
                          amount:
                            type: string
                            example: '5.00'
                          surcharge:
                            type: string
                            example: '2.00'
                          amount_in_currency:
                            type: string
                            example: $5.00 USD
                          surcharge_in_currency:
                            type: string
                            example: $2.00 USD
                      items_count:
                        type: integer
                        example: 10
                      metadata:
                        type: object
                        example:
                          level: gold
                          tags:
                            - Tag1
                            - Tag2
                          camapaign:
                            id: 1
                            name: Winter 2025
                      transaction_fee:
                        type:
                          - number
                          - string
                        example: 3
                      transaction_fee_in_currency:
                        type: string
                        example: $3.00 USD
                      enrollment_fee:
                        type:
                          - number
                          - string
                        example: 3
                      enrollment_fee_in_currency:
                        type: string
                        example: $3.00 USD
                      discount:
                        type: string
                        example: '10.00'
                      tax:
                        type: string
                        example: '8.00'
                      dynamic_charges:
                        type: object
                        example:
                          handling: 2
                      dynamic_charges_in_currency:
                        type: object
                        example:
                          handling: $2.00 USD
                      shipping_address:
                        type: object
                        properties:
                          id:
                            type: integer
                          address1:
                            type: string
                            example: 123 Ship St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 123
                          city:
                            type: string
                            example: Ship City
                          state:
                            type: string
                            example: ST
                          postal_code:
                            type: string
                            example: '12345'
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: ST
                          country_code:
                            type: string
                            example: US
                      billing_address:
                        type: object
                        properties:
                          id:
                            type: integer
                          address1:
                            type: string
                            example: 456 Bill St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 456
                          city:
                            type: string
                            example: Bill City
                          state:
                            type: string
                            example: ST
                          postal_code:
                            type: string
                            example: '67890'
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: ST
                          country_code:
                            type: string
                            example: US
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            title:
                              type: string
                              example: Hula Hoop
                            quantity:
                              type: integer
                              example: 3
                            price:
                              type:
                                - number
                                - string
                              example: 5.5
                            display_price:
                              type: string
                              example: $5.5 USD
                            total:
                              type:
                                - number
                                - string
                              example: 16.5
                            display_total:
                              type: string
                              example: $16.5 USD
                            image_url:
                              type:
                                - string
                                - 'null'
                              example: https://example.com/test_image.jpg
                            sku:
                              type:
                                - string
                                - 'null'
                              example: ABC-12345-S-BL
                            cv:
                              type: integer
                              example: 100
                            qv:
                              type: integer
                              example: 100
                            ordered_variant:
                              type: array
                              items:
                                type: object
                                properties:
                                  option_type:
                                    type: string
                                    example: Size
                                  value:
                                    type: string
                                    example: XXL
                            hs_code:
                              type: string
                              example: HS123
                            total_in_currency:
                              type: string
                              example: $11.0 USD
                            price_in_currency:
                              type: string
                              example: $29.99
                            tax:
                              type: string
                              example: '2.99'
                            tax_in_currency:
                              type: string
                              example: $2.99
                            thumbnail:
                              type: string
                              example: https://example.com/test_image.jpg
                            variant:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Sample Variant
                                image_path:
                                  type:
                                    - string
                                    - 'null'
                                  example: /images/sample.png
                                image_url:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/sample.png
                                primary_image:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/primary.png
                                price:
                                  type:
                                    - string
                                    - 'null'
                                  example: '34.44'
                                price_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $34.44
                                sku:
                                  type:
                                    - string
                                    - 'null'
                                  example: SKU12345
                                options:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      title:
                                        type: string
                                        example: Size
                                      value:
                                        type: string
                                        example: XL
                      discount_in_currency:
                        type: string
                        example: $10.00 USD
                      tax_in_currency:
                        type: string
                        example: $8.00 USD
                      cv:
                        type: integer
                        example: 100
                      qv:
                        type: integer
                        example: 100
                      status:
                        type: string
                        example: awaiting_payment
                      external_id:
                        type:
                          - string
                          - 'null'
                        example: '1234567890'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                metadata:
                  type: array
                  items:
                    type: string
                  description: Array of metadata keys to remove
              required:
                - metadata
  /api/v2/orders/{id}/update_sponsor:
    patch:
      summary: Update Order Sponsor
      description: Update the sponsor (user_company) of an order
      tags:
        - Orders
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Order ID
          schema:
            type: integer
      responses:
        '200':
          description: successful
        '422':
          description: sponsor not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: fail
                  data:
                    type: object
                    properties:
                      error:
                        type: string
                        example: Sponsor not found
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                order:
                  type: object
                  properties:
                    user_company_id:
                      type: integer
                      description: ID of the UserCompany (sponsor)
                  required:
                    - user_company_id
              required:
                - order
        required: true
    parameters:
      - name: id
        in: path
        description: Order ID
        required: true
        schema:
          type: string
  /api/v2/orders/{id}/archive:
    patch:
      summary: Archive an Order
      description: Archive an order
      tags:
        - Orders
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Order ID
          schema:
            type: integer
      responses:
        '200':
          description: successful - order archived
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Order archived successfully
        '422':
          description: validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: fail
                  data:
                    type: object
                    properties:
                      error:
                        type: string
                        example: Status cannot be archived for cancelled order
    parameters:
      - name: id
        in: path
        description: Order ID
        required: true
        schema:
          type: string
  /api/v2/orders/{id}/unarchive:
    patch:
      summary: Unarchive an Order
      description: Unarchive an order
      tags:
        - Orders
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Order ID
          schema:
            type: integer
      responses:
        '200':
          description: successful - order unarchived
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Order unarchived successfully
        '422':
          description: validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: fail
                  data:
                    type: object
                    properties:
                      error:
                        type: string
                        example: Order is not archived
    parameters:
      - name: id
        in: path
        description: Order ID
        required: true
        schema:
          type: string
  /api/v202506/pages:
    get:
      summary: List pages
      description: Get a list of pages with optional filtering and sorting
      tags:
        - Pages
      operationId: listPagesApi
      security:
        - bearer_auth: []
      parameters:
        - name: sorted_by
          in: query
          required: false
          schema:
            type: string
            enum:
              - priority_asc
              - priority_desc
              - title_asc
              - title_desc
              - updated_at_asc
              - updated_at_desc
              - views_asc
              - views_desc
              - leads_admin_asc
              - leads_admin_desc
              - created_at_asc
              - created_at_desc
              - status_asc
              - status_desc
            default: priority_desc
            description: >-
              Sort field and direction (leads_user_{user_id}_asc and
              leads_user_{user_id}_desc are also supported)
        - name: search_query
          in: query
          required: false
          schema:
            type: string
            description: Search term to filter pages by title or slug
        - name: status
          in: query
          required: false
          schema:
            type: string
            enum:
              - active
              - draft
            description: Filter pages by publish status
        - name: with_tag_id
          in: query
          required: false
          schema:
            type: integer
            description: Filter pages by tag ID
        - name: with_category_id
          in: query
          required: false
          schema:
            type: integer
            description: Filter pages by category ID
        - name: country_id
          in: query
          required: false
          schema:
            type: integer
            description: Filter pages by country ID
        - name: by_language
          in: query
          required: false
          schema:
            type: string
            description: Filter pages by language code (e.g., 'en', 'es')
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
            description: Page number for pagination
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
            default: 20
            description: Number of items per page
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                          description: Unique identifier for the page
                        title:
                          type: string
                          example: New Page
                          description: Title of the page
                        slug:
                          type: string
                          example: new-page
                          description: URL-friendly version of the title
                        active:
                          type: boolean
                          example: true
                          description: Whether the page is currently active
                        views:
                          type: integer
                          example: 0
                          description: Number of times the page has been viewed
                        leads:
                          type: integer
                          example: 0
                          description: Number of leads generated from the page
                        source:
                          type: string
                          example: builder
                          description: Origin or tool used to create the page
                        created_at:
                          type: string
                          example: '2021-01-01T00:00:00Z'
                          description: Date and time when the page was created
                        updated_at:
                          type: string
                          example: '2021-01-01T00:00:00Z'
                          description: Date and time when the page was last updated
                        image_url:
                          type: string
                          example: https://example.com/image.jpg
                          description: URL of the page's featured image
                        metadata:
                          type: object
                          example: {}
                          description: Additional data associated with the page
                        publish:
                          type: boolean
                          example: true
                          description: Whether the page is published
                        prompts_enabled:
                          type: boolean
                          example: true
                          description: Whether prompts are enabled on the page
                        use_fluid_menu:
                          type: boolean
                          example: true
                          description: Whether to use the fluid menu on the page
                        default:
                          type: boolean
                          example: false
                          description: Whether this is the default page
                        use_for_enrollment_completion:
                          type: boolean
                          example: false
                          description: Whether the page is used for enrollment completion
                        use_search_engine:
                          type: boolean
                          example: true
                          description: Whether the page should be indexed by search engines
                        show_on_site_search:
                          type: boolean
                          example: true
                          description: Whether the page appears in site search results
                        email:
                          type:
                            - string
                            - 'null'
                          example: page@example.com
                          description: Email address associated with the page
                        application_theme_template_id:
                          type:
                            - integer
                            - 'null'
                          example: 1
                          description: >-
                            ID of the application theme template used for the
                            page
                      required:
                        - id
                        - title
                        - slug
                    description: List of pages
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        description: Unique identifier for the request
                      timestamp:
                        type: string
                        description: Time when the request was processed
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            description: Current page number in the pagination
                          total_pages:
                            type: integer
                            description: Total number of pages available
                          total_count:
                            type: integer
                            description: Total number of items across all pages
                          per_page:
                            type: integer
                            description: Number of items per page
                        description: Pagination information for the response
                    description: Metadata about the request and response
                description: Successful response with pages list and metadata
    post:
      summary: Creates a page
      description: Create a new page
      tags:
        - Pages
      operationId: createPageApi
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: page created with content, variables, and stylesheet
        '422':
          description: missing page parameter
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                page:
                  type: object
                  properties:
                    title:
                      type: string
                      example: New Page
                      description: Title of the page
                    label:
                      type:
                        - string
                        - 'null'
                      example: Featured
                      description: Label for categorizing the page
                    display_tag:
                      type:
                        - string
                        - 'null'
                      example: Tag
                      description: Tag to be displayed on the page
                    stripped_description:
                      type:
                        - string
                        - 'null'
                      example: Page description
                      description: Plain text description without formatting
                    image_url:
                      type:
                        - string
                        - 'null'
                      example: https://example.com/image.jpg
                      description: URL of the page's featured image
                    source:
                      type:
                        - string
                        - 'null'
                      example: builder
                      description: Origin or tool used to create the page
                    publish:
                      type: boolean
                      example: true
                      description: Whether the page is published
                    prompts_enabled:
                      type: boolean
                      example: true
                      description: Whether prompts are enabled on the page
                    json:
                      type:
                        - string
                        - 'null'
                      example: '{}'
                      description: JSON data associated with the page
                    use_search_engine:
                      type: boolean
                      example: true
                      description: Whether the page should be indexed by search engines
                    show_on_site_search:
                      type: boolean
                      example: true
                      description: Whether the page appears in site search results
                    email:
                      type:
                        - string
                        - 'null'
                      example: page@example.com
                      description: Email address associated with the page
                    countries:
                      type: array
                      items:
                        type: string
                        example: US
                      description: List of country codes where the page is available
                    metadata:
                      type: object
                      example:
                        key: value
                      description: Additional data associated with the page
                    search_engine_optimizer:
                      type: object
                      properties:
                        title:
                          type: string
                          example: SEO Title
                          description: Page title optimized for search engines
                        description:
                          type: string
                          example: SEO Description
                          description: Page description optimized for search engines
                        image_url:
                          type: string
                          example: https://example.com/seo-image.jpg
                          description: Image URL optimized for search engines
                      description: SEO settings for the page
                    open_graph:
                      type: object
                      properties:
                        title:
                          type: string
                          example: OG Title
                          description: Title for Open Graph sharing
                        description:
                          type: string
                          example: OG Description
                          description: Description for Open Graph sharing
                        image_url:
                          type: string
                          example: https://example.com/og-image.jpg
                          description: Image URL for Open Graph sharing
                      description: Open Graph metadata for social media sharing
                    content:
                      type:
                        - string
                        - 'null'
                      example: <h1>Hello, world!</h1>
                      description: HTML content of the page
                    variables:
                      type:
                        - object
                        - 'null'
                      example:
                        company_name: ACME Inc.
                        site_url: https://example.com
                        current_year: '2025'
                      description: Variables for dynamic content substitution
                    stylesheet:
                      type:
                        - string
                        - 'null'
                      example: '<style>body { background-color: #f0f0f0; }</style>'
                      description: Custom CSS styling for the page
                    taggings_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          tag_id:
                            type: integer
                            example: 1
                            description: ID of the tag to associate with the page
                      description: Tags to associate with the page
                  description: Page attributes
              description: Create request payload
        required: true
  /api/v202506/pages/{id}/available_variables:
    get:
      summary: Get available variables for a page
      description: Get available variables that can be used in the page template
      tags:
        - Pages
      operationId: getPageAvailableVariablesApi
      security:
        - bearer_auth: []
      responses:
        '200':
          description: available variables found
          content:
            application/json:
              schema:
                type: object
                properties:
                  available_variables:
                    type: object
                    example:
                      company:
                        name: ACME Inc.
                        subdomain: acme
                      page:
                        company_name: ACME Inc.
                        site_url: https://example.com
                    description: Object containing available template variables
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        description: Unique identifier for the request
                      timestamp:
                        type: string
                        description: Time when the request was processed
                    required:
                      - request_id
                      - timestamp
                    description: Metadata about the request and response
                description: Successful response with available variables and metadata
        '404':
          description: page not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Page not found
                    description: Error message
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - Page not found
                        description: List of error messages for the id field
                    description: Detailed error information
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        description: Unique identifier for the request
                      timestamp:
                        type: string
                        description: Time when the request was processed
                    required:
                      - request_id
                      - timestamp
                    description: Metadata about the request and response
                description: Error response when page is not found
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
  /api/v202506/pages/{id}:
    get:
      summary: Retrieves a page
      description: Get a specific page by ID
      tags:
        - Pages
      operationId: getPageApi
      security:
        - bearer_auth: []
      responses:
        '200':
          description: page found
          content:
            application/json:
              schema:
                type: object
                properties:
                  item:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                        description: Unique identifier for the page
                      title:
                        type: string
                        example: New Page
                        description: Title of the page
                      slug:
                        type: string
                        example: new-page
                        description: URL-friendly version of the title
                      share_link:
                        type:
                          - string
                          - 'null'
                        example: https://example.com/p/abc123
                        description: Public shareable URL for the page
                      active:
                        type: boolean
                        example: true
                        description: Whether the page is currently active
                      stripped_description:
                        type:
                          - string
                          - 'null'
                        example: This is a page description
                        description: Plain text description of the page without formatting
                      views:
                        type: integer
                        example: 0
                        description: Number of times the page has been viewed
                      leads:
                        type: integer
                        example: 0
                        description: Number of leads generated from the page
                      image_url:
                        type: string
                        example: https://example.com/image.jpg
                        description: URL of the page's featured image
                      metadata:
                        type: object
                        example: {}
                        description: Additional data associated with the page
                      publish:
                        type: boolean
                        example: true
                        description: Whether the page is published
                      label:
                        type:
                          - string
                          - 'null'
                        example: Featured
                        description: Label for categorizing the page
                      display_tag:
                        type:
                          - string
                          - 'null'
                        example: Tag
                        description: Tag displayed on the page
                      versions:
                        type:
                          - array
                          - 'null'
                        items:
                          type: object
                        description: History of page versions
                      prompts_enabled:
                        type: boolean
                        example: true
                        description: Whether prompts are enabled on the page
                      use_fluid_menu:
                        type: boolean
                        example: true
                        description: Whether to use the fluid menu on the page
                      default:
                        type: boolean
                        example: false
                        description: Whether this is the default page
                      use_for_enrollment_completion:
                        type: boolean
                        example: false
                        description: Whether the page is used for enrollment completion
                      use_search_engine:
                        type: boolean
                        example: true
                        description: Whether the page should be indexed by search engines
                      show_on_site_search:
                        type: boolean
                        example: true
                        description: Whether the page appears in site search results
                      email:
                        type:
                          - string
                          - 'null'
                        example: page@example.com
                        description: Email address associated with the page
                      application_theme_template_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                        description: ID of the application theme template used for the page
                      created_at:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                        description: Date and time when the page was created
                      updated_at:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                        description: Date and time when the page was last updated
                      url:
                        type: string
                        example: https://example.com/page
                        description: URL of the page
                      prompts:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 39
                            content:
                              type: string
                              example: Check out this product
                            title:
                              type: string
                              example: Social Media
                        description: List of prompts configured for the page
                      source:
                        type: string
                        example: builder
                        description: Origin or tool used to create the page
                      countries:
                        type: array
                        description: List of countries where the page is available
                      content:
                        type:
                          - string
                          - 'null'
                        example: <h1>Hello, world!</h1>
                        description: HTML content of the page
                      variables:
                        type:
                          - object
                          - 'null'
                        example:
                          company_name: ACME Inc.
                        description: Variables for dynamic content substitution
                      stylesheet:
                        type:
                          - string
                          - 'null'
                        example: '<style>body { background-color: #f0f0f0; }</style>'
                        description: Custom CSS styling for the page
                      use_active_application_theme:
                        type: boolean
                        example: true
                        description: >-
                          Whether the page is using the active application
                          theme's stylesheet
                      open_graph:
                        type:
                          - object
                          - 'null'
                        properties:
                          title:
                            type: string
                            example: OG Title
                          description:
                            type: string
                            example: OG Description
                          image_url:
                            type: string
                            example: https://example.com/og-image.jpg
                        description: Open Graph metadata for social sharing
                      search_engine_optimizer:
                        type:
                          - object
                          - 'null'
                        properties:
                          title:
                            type: string
                            example: SEO Title
                          description:
                            type: string
                            example: SEO Description
                          image_url:
                            type: string
                            example: https://example.com/seo-image.jpg
                        description: SEO settings for the page
                    required:
                      - id
                      - title
                      - slug
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        description: Unique identifier for the request
                      timestamp:
                        type: string
                        description: Time when the request was processed
                    required:
                      - request_id
                      - timestamp
                    description: Metadata about the request and response
                description: Successful response with page details and metadata
        '404':
          description: not found
    put:
      summary: Updates a page
      description: Update an existing page
      tags:
        - Pages
      operationId: updatePageApi
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: page updated with tag removed
        '404':
          description: not found
        '422':
          description: page parameter missing
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                page:
                  type: object
                  properties:
                    title:
                      type: string
                      example: Updated Page
                      description: Title of the page
                    label:
                      type:
                        - string
                        - 'null'
                      example: Trending
                      description: Label for categorizing the page
                    display_tag:
                      type:
                        - string
                        - 'null'
                      example: Display tag
                      description: Tag to be displayed on the page
                    stripped_description:
                      type:
                        - string
                        - 'null'
                      example: Updated description
                      description: Plain text description without formatting
                    image_url:
                      type:
                        - string
                        - 'null'
                      example: https://example.com/image.jpg
                      description: URL of the page's featured image
                    source:
                      type:
                        - string
                        - 'null'
                      example: builder
                      description: Origin or tool used to create the page
                    publish:
                      type: boolean
                      example: true
                      description: Whether the page is published
                    prompts_enabled:
                      type: boolean
                      example: true
                      description: Whether prompts are enabled on the page
                    json:
                      type:
                        - string
                        - 'null'
                      example: '{}'
                      description: JSON data associated with the page
                    use_search_engine:
                      type: boolean
                      example: true
                      description: Whether the page should be indexed by search engines
                    show_on_site_search:
                      type: boolean
                      example: true
                      description: Whether the page appears in site search results
                    email:
                      type:
                        - string
                        - 'null'
                      example: page@example.com
                      description: Email address associated with the page
                    countries:
                      type: array
                      items:
                        type: string
                        example: US
                      description: List of country codes where the page is available
                    metadata:
                      type: object
                      example:
                        key: value
                      description: Additional data associated with the page
                    search_engine_optimizer:
                      type: object
                      properties:
                        title:
                          type: string
                          example: SEO Title
                          description: Page title optimized for search engines
                        description:
                          type: string
                          example: SEO Description
                          description: Page description optimized for search engines
                        image_url:
                          type: string
                          example: https://example.com/seo-image.jpg
                          description: Image URL optimized for search engines
                      description: SEO settings for the page
                    open_graph:
                      type: object
                      properties:
                        title:
                          type: string
                          example: OG Title
                          description: Title for Open Graph sharing
                        description:
                          type: string
                          example: OG Description
                          description: Description for Open Graph sharing
                        image_url:
                          type: string
                          example: https://example.com/og-image.jpg
                          description: Image URL for Open Graph sharing
                      description: Open Graph metadata for social media sharing
                    content:
                      type:
                        - string
                        - 'null'
                      example: <h1>Hello, world!</h1>
                      description: HTML content of the page
                    variables:
                      type:
                        - object
                        - 'null'
                      example:
                        company_name: ACME Inc.
                        site_url: https://example.com
                        current_year: '2025'
                      description: Variables for dynamic content substitution
                    stylesheet:
                      type:
                        - string
                        - 'null'
                      example: '<style>body { background-color: #f0f0f0; }</style>'
                      description: Custom CSS styling for the page
                  description: Page attributes to update
              description: Update request payload
        required: true
    delete:
      summary: Deletes a page
      description: Delete a page
      tags:
        - Pages
      operationId: deletePageApi
      security:
        - bearer_auth: []
      responses:
        '200':
          description: page deleted
        '404':
          description: not found
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: version
        in: query
        required: false
        description: Version of the page to retrieve
        schema:
          type: string
  /api/v202506/pages/{id}/clone:
    post:
      summary: Clones a page
      description: Clone an existing page
      tags:
        - Pages
      operationId: clonePageApi
      security:
        - bearer_auth: []
      responses:
        '201':
          description: page cloned
        '404':
          description: not found
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
  /api/v202506/pages/{id}/views:
    get:
      summary: Get page views
      description: Get views for a specific page
      tags:
        - Pages
      operationId: getPageViewsApi
      security:
        - bearer_auth: []
      responses:
        '200':
          description: returns views when page has views
        '404':
          description: page not found
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
  /api/v202506/pages/{id}/leads:
    get:
      summary: Get page leads
      description: Get leads for a specific page
      tags:
        - Pages
      operationId: getPageLeadsApi
      security:
        - bearer_auth: []
      responses:
        '200':
          description: returns structured contact data
        '404':
          description: page not found
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
  /api/v202506/pages/bulk_status_update:
    patch:
      summary: Bulk update page statuses
      description: Update status for multiple pages
      tags:
        - Pages
      operationId: bulkUpdatePageStatusesApi
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: successful with delete status
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Pages were successfully deleted.
                    description: Success message
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        description: Unique identifier for the request
                      timestamp:
                        type: string
                        description: Time when the request was processed
                    description: Metadata about the request and response
                description: Successful bulk delete response
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Error while updating pages.
                    description: Error message describing what went wrong
                  errors:
                    type: object
                    properties:
                      bulk_update:
                        type: array
                        items:
                          type: string
                          example: failed
                        description: List of error messages related to the bulk update
                    description: Detailed error information
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        description: Unique identifier for the request
                      timestamp:
                        type: string
                        description: Time when the request was processed
                    description: Metadata about the request and response
                description: Error response for bulk update
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - active
                    - draft
                    - delete
                  example: active
                  description: >-
                    Set the status of the page(s) or 'delete' to perform soft
                    deletion
                page_ids:
                  type: array
                  items:
                    type: integer
                  description: IDs of pages to update
              required:
                - status
                - page_ids
              description: Bulk update request payload
        required: true
  /api/v202506/pages/import:
    post:
      summary: Imports pages from a zip file
      description: Import pages from a zip file
      tags:
        - Pages
      operationId: importPagesApi
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: import started
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Import has successfully started. Please check back later.
                    description: Success message
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        description: Unique identifier for the request
                      timestamp:
                        type: string
                        description: Time when the request was processed
                    description: Metadata about the request and response
                description: Successful import response
        '422':
          description: invalid zip file
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Please upload a valid zip file.
                    description: Error message describing what went wrong
                  errors:
                    type: object
                    properties:
                      zip:
                        type: array
                        items:
                          type: string
                        description: List of error messages related to the zip file
                    description: Detailed error information
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        description: Unique identifier for the request
                      timestamp:
                        type: string
                        description: Time when the request was processed
                    description: Metadata about the request and response
                description: Error response for import
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: string
        required: true
        description: Zip file containing pages
  /api/v202506/pages/{id}/promote_to_template:
    post:
      summary: Promotes a page to a template
      description: Convert a page into an application theme template
      tags:
        - Pages
      operationId: promotePageToTemplateApi
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: successfully promoted to template
          content:
            application/json:
              schema:
                type: object
                properties:
                  item:
                    type: object
                    properties:
                      application_theme_template:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                            description: ID of the created template
                          application_theme_id:
                            type: integer
                            example: 1
                            description: ID of the associated theme
                          name:
                            type: string
                            example: Template Name
                            description: Name of the template
                          themeable_type:
                            type: string
                            example: product
                            description: Type of template
                          status:
                            type: string
                            example: active
                            description: Status of the template
                          default:
                            type: boolean
                            example: false
                            description: Whether this is the default template
                          content:
                            type: string
                            example: <h1>Hello</h1>
                            description: Template content
                          stylesheet:
                            type: string
                            example: 'body { color: red; }'
                            description: Template stylesheet
                          url:
                            type: string
                            example: https://example.com/preview?theme_template_id=1
                            description: Preview URL of the template
                          variables:
                            type: object
                            example: {}
                            description: Template variables
                          created_at:
                            type: string
                            format: date_time
                            description: Creation timestamp
                          updated_at:
                            type: string
                            format: date_time
                            description: Update timestamp
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        description: Unique identifier for the request
                      timestamp:
                        type: string
                        format: date_time
                        description: Timestamp of the response
                description: Template creation success response
        '404':
          description: page not found
        '422':
          description: promotion failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unprocessable entity
                    description: Error message
                  errors:
                    type: object
                    properties:
                      base:
                        type: array
                        items:
                          type: string
                        description: List of error messages
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        description: Unique identifier for the request
                      timestamp:
                        type: string
                        format: date_time
                        description: Timestamp of the response
                description: Error response for failed promotion
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                themeable_type:
                  type: string
                  example: product
                  description: >-
                    Type of template to promote it to. Possible values:
                    'home_page', 'cart_page', 'product', 'medium',
                    'enrollment_pack', 'library', 'shop_page', 'category_page',
                    'collection_page'
              required:
                - themeable_type
              description: Parameters for page promotion
        required: true
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
  /api/v202506/pages/{id}/version_diff:
    get:
      summary: Gets version diff information
      tags:
        - Pages
      security:
        - bearer_auth: []
      responses:
        '200':
          description: version diff found
          content:
            application/json:
              schema:
                type: object
                properties:
                  audit:
                    type: object
                    properties:
                      version:
                        type: integer
                      created_at:
                        type: string
                        format: date-time
                      user_id:
                        type:
                          - string
                          - 'null'
                      user_name:
                        type:
                          - string
                          - 'null'
                      changes:
                        type: object
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: aec35efe-1cdc-48ac-94e6-616831786625
                      timestamp:
                        type: string
                        format: date-time
                        example: '2025-05-03T04:58:11Z'
        '404':
          description: version not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: aec35efe-1cdc-48ac-94e6-616831786625
                      timestamp:
                        type: string
                        format: date-time
                        example: '2025-05-03T04:58:11Z'
    parameters:
      - name: id
        in: path
        description: ID of the page
        required: true
        schema:
          type: string
      - name: version
        in: query
        description: Version number to compare with
        schema:
          type: integer
  /api/v202506/pages/{id}/publish:
    post:
      summary: Publish the page
      description: Get a specific page by ID
      tags:
        - Pages
      operationId: publishPageApi
      security:
        - bearer_auth: []
      responses:
        '200':
          description: publishes sepecified version
          content:
            application/json:
              schema:
                type: object
                properties:
                  item:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                        description: Unique identifier for the page
                      title:
                        type: string
                        example: New Page
                        description: Title of the page
                      slug:
                        type: string
                        example: new-page
                        description: URL-friendly version of the title
                      share_link:
                        type:
                          - string
                          - 'null'
                        example: https://example.com/p/abc123
                        description: Public shareable URL for the page
                      active:
                        type: boolean
                        example: true
                        description: Whether the page is currently active
                      stripped_description:
                        type:
                          - string
                          - 'null'
                        example: This is a page description
                        description: Plain text description of the page without formatting
                      views:
                        type: integer
                        example: 0
                        description: Number of times the page has been viewed
                      leads:
                        type: integer
                        example: 0
                        description: Number of leads generated from the page
                      image_url:
                        type: string
                        example: https://example.com/image.jpg
                        description: URL of the page's featured image
                      metadata:
                        type: object
                        example: {}
                        description: Additional data associated with the page
                      publish:
                        type: boolean
                        example: true
                        description: Whether the page is published
                      label:
                        type:
                          - string
                          - 'null'
                        example: Featured
                        description: Label for categorizing the page
                      display_tag:
                        type:
                          - string
                          - 'null'
                        example: Tag
                        description: Tag displayed on the page
                      versions:
                        type:
                          - array
                          - 'null'
                        items:
                          type: object
                        description: History of page versions
                      prompts_enabled:
                        type: boolean
                        example: true
                        description: Whether prompts are enabled on the page
                      use_fluid_menu:
                        type: boolean
                        example: true
                        description: Whether to use the fluid menu on the page
                      default:
                        type: boolean
                        example: false
                        description: Whether this is the default page
                      use_for_enrollment_completion:
                        type: boolean
                        example: false
                        description: Whether the page is used for enrollment completion
                      use_search_engine:
                        type: boolean
                        example: true
                        description: Whether the page should be indexed by search engines
                      show_on_site_search:
                        type: boolean
                        example: true
                        description: Whether the page appears in site search results
                      email:
                        type:
                          - string
                          - 'null'
                        example: page@example.com
                        description: Email address associated with the page
                      application_theme_template_id:
                        type:
                          - integer
                          - 'null'
                        example: 1
                        description: ID of the application theme template used for the page
                      created_at:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                        description: Date and time when the page was created
                      updated_at:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                        description: Date and time when the page was last updated
                      url:
                        type: string
                        example: https://example.com/page
                        description: URL of the page
                      prompts:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 39
                            content:
                              type: string
                              example: Check out this product
                            title:
                              type: string
                              example: Social Media
                        description: List of prompts configured for the page
                      source:
                        type: string
                        example: builder
                        description: Origin or tool used to create the page
                      countries:
                        type: array
                        description: List of countries where the page is available
                      content:
                        type:
                          - string
                          - 'null'
                        example: <h1>Hello, world!</h1>
                        description: HTML content of the page
                      variables:
                        type:
                          - object
                          - 'null'
                        example:
                          company_name: ACME Inc.
                        description: Variables for dynamic content substitution
                      stylesheet:
                        type:
                          - string
                          - 'null'
                        example: '<style>body { background-color: #f0f0f0; }</style>'
                        description: Custom CSS styling for the page
                      use_active_application_theme:
                        type: boolean
                        example: true
                        description: >-
                          Whether the page is using the active application
                          theme's stylesheet
                      open_graph:
                        type:
                          - object
                          - 'null'
                        properties:
                          title:
                            type: string
                            example: OG Title
                          description:
                            type: string
                            example: OG Description
                          image_url:
                            type: string
                            example: https://example.com/og-image.jpg
                        description: Open Graph metadata for social sharing
                      search_engine_optimizer:
                        type:
                          - object
                          - 'null'
                        properties:
                          title:
                            type: string
                            example: SEO Title
                          description:
                            type: string
                            example: SEO Description
                          image_url:
                            type: string
                            example: https://example.com/seo-image.jpg
                        description: SEO settings for the page
                    required:
                      - id
                      - title
                      - slug
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        description: Unique identifier for the request
                      timestamp:
                        type: string
                        description: Time when the request was processed
                    required:
                      - request_id
                      - timestamp
                    description: Metadata about the request and response
                description: Successful response with page details and metadata
        '404':
          description: not found
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: version
        in: query
        required: false
        description: Version of the page to retrieve
        schema:
          type: string
  /api/v202506/payments/tokenize_card:
    post:
      summary: Tokenize credit card
      tags:
        - Payment
      parameters: []
      responses:
        '200':
          description: Credit card response
          content:
            application/json:
              schema:
                type: object
                properties:
                  transaction:
                    type: object
                    properties:
                      token:
                        type: string
                        example: test_token_123
                      created_at:
                        type: string
                        example: '2025-03-06T12:00:00'
                      updated_at:
                        type: string
                        example: '2025-03-06T12:00:00'
                      succeeded:
                        type: boolean
                        example: true
                      transaction_type:
                        type: string
                        example: AddPaymentMethod
                      retained:
                        type: boolean
                        example: true
                      state:
                        type: string
                        example: succeeded
                      message_key:
                        type: string
                        example: messages.transaction_succeeded
                      message:
                        type: string
                        example: Succeeded!
                      payment_method:
                        type: object
                        properties:
                          token:
                            type: string
                            example: test_token_123
                          created_at:
                            type: string
                            example: '2025-03-06T12:00:00'
                          updated_at:
                            type: string
                            example: '2025-03-06T12:00:00'
                          storage_state:
                            type: string
                            example: cached
                          test:
                            type: boolean
                            example: true
                          last_four_digits:
                            type: string
                            example: '1111'
                          first_six_digits:
                            type: string
                            example: '411111'
                          card_type:
                            type: string
                            example: visa
                          first_name:
                            type: string
                            example: John
                          last_name:
                            type: string
                            example: Doe
                          month:
                            type: integer
                            example: 11
                          year:
                            type: integer
                            example: 2030
                          full_name:
                            type: string
                            example: John Doe
                          payment_method_type:
                            type: string
                            example: credit_card
                          errors:
                            type: array
                            example: []
                          fingerprint:
                            type: string
                            example: randomstring
                          verification_value:
                            type: string
                            example: '123'
                          number:
                            type: string
                            example: XXXX-XXXX-XXXX-1111
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2025-02-03T08:04:10Z'
        '400':
          description: Invalid credit card details
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Invalid credit card details.
                  errors:
                    type: object
                    example:
                      credit_card:
                        month:
                          - is invalid
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2025-02-03T08:04:10Z'
        '422':
          description: Incomplete credit card details
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Invalid parameters.
                  errors:
                    type: object
                    example:
                      credit_card:
                        month:
                          - is missing
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2025-02-03T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                credit_card:
                  type: object
                  properties:
                    first_name:
                      type: string
                    last_name:
                      type: string
                    number:
                      type: string
                    verification_value:
                      type: string
                    month:
                      type: string
                    year:
                      type: string
                    email:
                      type: string
                  required:
                    - first_name
                    - last_name
                    - number
                    - verification_value
                    - month
                    - year
              required:
                - credit_card
  /api/v202506/payments/{payment_account_id}:
    post:
      summary: Create payment record using payment account id and cart info
      tags:
        - Payment
      parameters:
        - name: payment_account_id
          in: path
          required: true
          description: ID of the existing payment account
          example: 123
          schema:
            type: integer
      responses:
        '201':
          description: Credit card response
          content:
            application/json:
              schema:
                type: object
                properties:
                  payment:
                    title: Commerce::Payment
                    type: object
                    properties:
                      id:
                        type: integer
                      uuid:
                        type: string
                      action:
                        type: string
                      status:
                        type: string
                        enum:
                          - unsent
                          - sent
                          - received
                          - success
                          - declined
                          - pending
                          - error
                          - expired
                      payment_account:
                        type: integer
                      cart_token:
                        type: string
                    required:
                      - id
                      - uuid
                      - action
                      - status
                      - payment_account
                      - cart_token
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '404':
          description: Payment Account is not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                cart_token:
                  type: string
                  example: cart_token
                payment_method:
                  type: object
                  properties:
                    integration_class:
                      type: string
                      example: Droplet
                    source:
                      type: string
                      example: droplet
                  required:
                    - integration_class
                    - source
              required:
                - cart_token
                - payment_method
        required: true
  /api/payment_accounts:
    get:
      summary: List of payment accounts
      description: List all payment accounts
      tags:
        - Payment Accounts
      operationId: listPaymentAccounts
      security:
        - bearer_auth: []
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  payment_accounts:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        active:
                          type: boolean
                          example: true
                        integration_class:
                          type: string
                          example: Paypal
                        adapter_class:
                          type:
                            - string
                            - 'null'
                          example: ActiveMerchant::Billing::SpreedlyCoreGateway
                        adapter_class_label:
                          type:
                            - string
                            - 'null'
                          example: SpreedlyCoreGateway
                        name:
                          type: string
                          example: Test Payment
                        settings:
                          type: object
                          example: {}
                        test:
                          type: boolean
                          example: false
                        domain:
                          type:
                            - object
                            - 'null'
                          properties:
                            domain:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 101
                                hostname:
                                  type: string
                                  example: example.com
                                created_at:
                                  type: string
                                  example: '2024-04-20T12:34:56.000Z'
                                updated_at:
                                  type: string
                                  example: '2024-08-20T12:34:56.000Z'
                                apex_domain:
                                  type: string
                                  example: example1.com
                                certificate_domain_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 101
                                company_id:
                                  type: integer
                                  example: 101
                                dns_config:
                                  type:
                                    - object
                                    - 'null'
                                  example: {}
                                primary:
                                  type: boolean
                                  example: false
                                redirection_domain_id:
                                  type:
                                    - integer
                                    - 'null'
                                  example: 101
                                redirection_domain_hostname:
                                  type:
                                    - string
                                    - 'null'
                                  example: example2.com
                                verification_status:
                                  type: string
                                  example: pending_cname
                                wildcard_subdomain:
                                  type: boolean
                                  example: false
                                dns_fluid_verified:
                                  type: string
                                  example: 'no'
                                cert_created:
                                  type: boolean
                                  example: true
                                connected:
                                  type: boolean
                                  example: false
                                verifying_cname:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: false
                            meta:
                              type: object
                              properties:
                                request_id:
                                  type: string
                                  example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                                timestamp:
                                  type: string
                                  example: '2024-12-10T08:04:10Z'
                        droplet_installation:
                          oneOf:
                            - type: 'null'
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                uuid:
                                  type: string
                                  example: drp_p4r9jsl305iduqrsl0ujdth35jhuy2al
                                droplet_uuid:
                                  type: string
                                  example: drp_p4r9jsl305iduqrsl0ujdth35jhuy2al
                                droplet_name:
                                  type: string
                                  example: Sample Droplet
                                active:
                                  type: boolean
                                  example: true
                              required:
                                - uuid
                                - droplet_uuid
                                - droplet_name
                                - active
                                - id
                        auto_assign_to_cart:
                          type: boolean
                          example: false
                        countries:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type: string
                                example: United States
                              iso:
                                type: string
                                example: US
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
    post:
      summary: Create a payment account
      description: Create a payment account
      tags:
        - Payment Accounts
      operationId: createPaymentAccount
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: created
          content:
            application/json:
              schema:
                type: object
                properties:
                  payment_account:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      active:
                        type: boolean
                        example: true
                      integration_class:
                        type: string
                        example: Paypal
                      adapter_class:
                        type:
                          - string
                          - 'null'
                        example: ActiveMerchant::Billing::SpreedlyCoreGateway
                      adapter_class_label:
                        type:
                          - string
                          - 'null'
                        example: SpreedlyCoreGateway
                      name:
                        type: string
                        example: Test Payment
                      settings:
                        type: object
                        example: {}
                      test:
                        type: boolean
                        example: false
                      domain:
                        type:
                          - object
                          - 'null'
                        properties:
                          domain:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 101
                              hostname:
                                type: string
                                example: example.com
                              created_at:
                                type: string
                                example: '2024-04-20T12:34:56.000Z'
                              updated_at:
                                type: string
                                example: '2024-08-20T12:34:56.000Z'
                              apex_domain:
                                type: string
                                example: example1.com
                              certificate_domain_id:
                                type:
                                  - integer
                                  - 'null'
                                example: 101
                              company_id:
                                type: integer
                                example: 101
                              dns_config:
                                type:
                                  - object
                                  - 'null'
                                example: {}
                              primary:
                                type: boolean
                                example: false
                              redirection_domain_id:
                                type:
                                  - integer
                                  - 'null'
                                example: 101
                              redirection_domain_hostname:
                                type:
                                  - string
                                  - 'null'
                                example: example2.com
                              verification_status:
                                type: string
                                example: pending_cname
                              wildcard_subdomain:
                                type: boolean
                                example: false
                              dns_fluid_verified:
                                type: string
                                example: 'no'
                              cert_created:
                                type: boolean
                                example: true
                              connected:
                                type: boolean
                                example: false
                              verifying_cname:
                                type:
                                  - boolean
                                  - 'null'
                                example: false
                          meta:
                            type: object
                            properties:
                              request_id:
                                type: string
                                example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                              timestamp:
                                type: string
                                example: '2024-12-10T08:04:10Z'
                      droplet_installation:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              uuid:
                                type: string
                                example: drp_p4r9jsl305iduqrsl0ujdth35jhuy2al
                              droplet_uuid:
                                type: string
                                example: drp_p4r9jsl305iduqrsl0ujdth35jhuy2al
                              droplet_name:
                                type: string
                                example: Sample Droplet
                              active:
                                type: boolean
                                example: true
                            required:
                              - uuid
                              - droplet_uuid
                              - droplet_name
                              - active
                              - id
                      auto_assign_to_cart:
                        type: boolean
                        example: false
                      countries:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type: string
                              example: United States
                            iso:
                              type: string
                              example: US
                      sandbox:
                        type:
                          - 'null'
                          - boolean
                        example: false
                      apple_pay_enabled:
                        type:
                          - 'null'
                          - boolean
                        example: false
                      google_pay_enabled:
                        type:
                          - 'null'
                          - boolean
                        example: false
                      sub_adapter:
                        type:
                          - 'null'
                          - string
                        example: acapture
                      credentials:
                        type:
                          - 'null'
                          - object
                        example: {}
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '400':
          description: error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: There was an error in creating payment account.
                  errors:
                    type: object
                    example: {}
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Invalid credentials schema
                  errors:
                    type: object
                    example: {}
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payment_account:
                  type: object
                  properties:
                    name:
                      type: string
                    integration_class:
                      type: string
                    adapter_class:
                      type: string
                    active:
                      type: boolean
                    test:
                      type: boolean
                    gateway_type:
                      type: string
                    sandbox:
                      type: boolean
                    apple_pay_enabled:
                      type: boolean
                    google_pay_enabled:
                      type: boolean
                    sub_adapter:
                      type: string
                    credentials:
                      type: object
                    company_country_ids:
                      type: array
                      items:
                        type: integer
                    droplet_installation_id:
                      type: integer
                    auto_assign_to_cart:
                      type: boolean
                  required:
                    - name
                    - integration_class
                    - credentials
              required:
                - payment_account
  /api/payment_accounts/{id}:
    get:
      summary: Get a payment account
      description: Get a payment account
      tags:
        - Payment Accounts
      operationId: getPaymentAccount
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Id of payment account.
          example: '1'
          schema:
            type: string
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  payment_account:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      active:
                        type: boolean
                        example: true
                      integration_class:
                        type: string
                        example: Paypal
                      adapter_class:
                        type:
                          - string
                          - 'null'
                        example: ActiveMerchant::Billing::SpreedlyCoreGateway
                      adapter_class_label:
                        type:
                          - string
                          - 'null'
                        example: SpreedlyCoreGateway
                      name:
                        type: string
                        example: Test Payment
                      settings:
                        type: object
                        example: {}
                      test:
                        type: boolean
                        example: false
                      domain:
                        type:
                          - object
                          - 'null'
                        properties:
                          domain:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 101
                              hostname:
                                type: string
                                example: example.com
                              created_at:
                                type: string
                                example: '2024-04-20T12:34:56.000Z'
                              updated_at:
                                type: string
                                example: '2024-08-20T12:34:56.000Z'
                              apex_domain:
                                type: string
                                example: example1.com
                              certificate_domain_id:
                                type:
                                  - integer
                                  - 'null'
                                example: 101
                              company_id:
                                type: integer
                                example: 101
                              dns_config:
                                type:
                                  - object
                                  - 'null'
                                example: {}
                              primary:
                                type: boolean
                                example: false
                              redirection_domain_id:
                                type:
                                  - integer
                                  - 'null'
                                example: 101
                              redirection_domain_hostname:
                                type:
                                  - string
                                  - 'null'
                                example: example2.com
                              verification_status:
                                type: string
                                example: pending_cname
                              wildcard_subdomain:
                                type: boolean
                                example: false
                              dns_fluid_verified:
                                type: string
                                example: 'no'
                              cert_created:
                                type: boolean
                                example: true
                              connected:
                                type: boolean
                                example: false
                              verifying_cname:
                                type:
                                  - boolean
                                  - 'null'
                                example: false
                          meta:
                            type: object
                            properties:
                              request_id:
                                type: string
                                example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                              timestamp:
                                type: string
                                example: '2024-12-10T08:04:10Z'
                      droplet_installation:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              uuid:
                                type: string
                                example: drp_p4r9jsl305iduqrsl0ujdth35jhuy2al
                              droplet_uuid:
                                type: string
                                example: drp_p4r9jsl305iduqrsl0ujdth35jhuy2al
                              droplet_name:
                                type: string
                                example: Sample Droplet
                              active:
                                type: boolean
                                example: true
                            required:
                              - uuid
                              - droplet_uuid
                              - droplet_name
                              - active
                              - id
                      auto_assign_to_cart:
                        type: boolean
                        example: false
                      countries:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type: string
                              example: United States
                            iso:
                              type: string
                              example: US
                      sandbox:
                        type:
                          - 'null'
                          - boolean
                        example: false
                      apple_pay_enabled:
                        type:
                          - 'null'
                          - boolean
                        example: false
                      google_pay_enabled:
                        type:
                          - 'null'
                          - boolean
                        example: false
                      sub_adapter:
                        type:
                          - 'null'
                          - string
                        example: acapture
                      credentials:
                        type:
                          - 'null'
                          - object
                        example: {}
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: 'Payment account with id: 1 not found'
                  errors:
                    type: array
                    example: []
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
    put:
      summary: Update a payment account
      description: Update a payment account
      tags:
        - Payment Accounts
      operationId: updatePaymentAccount
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  payment_account:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      active:
                        type: boolean
                        example: true
                      integration_class:
                        type: string
                        example: Paypal
                      adapter_class:
                        type:
                          - string
                          - 'null'
                        example: ActiveMerchant::Billing::SpreedlyCoreGateway
                      adapter_class_label:
                        type:
                          - string
                          - 'null'
                        example: SpreedlyCoreGateway
                      name:
                        type: string
                        example: Test Payment
                      settings:
                        type: object
                        example: {}
                      test:
                        type: boolean
                        example: false
                      domain:
                        type:
                          - object
                          - 'null'
                        properties:
                          domain:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 101
                              hostname:
                                type: string
                                example: example.com
                              created_at:
                                type: string
                                example: '2024-04-20T12:34:56.000Z'
                              updated_at:
                                type: string
                                example: '2024-08-20T12:34:56.000Z'
                              apex_domain:
                                type: string
                                example: example1.com
                              certificate_domain_id:
                                type:
                                  - integer
                                  - 'null'
                                example: 101
                              company_id:
                                type: integer
                                example: 101
                              dns_config:
                                type:
                                  - object
                                  - 'null'
                                example: {}
                              primary:
                                type: boolean
                                example: false
                              redirection_domain_id:
                                type:
                                  - integer
                                  - 'null'
                                example: 101
                              redirection_domain_hostname:
                                type:
                                  - string
                                  - 'null'
                                example: example2.com
                              verification_status:
                                type: string
                                example: pending_cname
                              wildcard_subdomain:
                                type: boolean
                                example: false
                              dns_fluid_verified:
                                type: string
                                example: 'no'
                              cert_created:
                                type: boolean
                                example: true
                              connected:
                                type: boolean
                                example: false
                              verifying_cname:
                                type:
                                  - boolean
                                  - 'null'
                                example: false
                          meta:
                            type: object
                            properties:
                              request_id:
                                type: string
                                example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                              timestamp:
                                type: string
                                example: '2024-12-10T08:04:10Z'
                      droplet_installation:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              uuid:
                                type: string
                                example: drp_p4r9jsl305iduqrsl0ujdth35jhuy2al
                              droplet_uuid:
                                type: string
                                example: drp_p4r9jsl305iduqrsl0ujdth35jhuy2al
                              droplet_name:
                                type: string
                                example: Sample Droplet
                              active:
                                type: boolean
                                example: true
                            required:
                              - uuid
                              - droplet_uuid
                              - droplet_name
                              - active
                              - id
                      auto_assign_to_cart:
                        type: boolean
                        example: false
                      countries:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type: string
                              example: United States
                            iso:
                              type: string
                              example: US
                      sandbox:
                        type:
                          - 'null'
                          - boolean
                        example: false
                      apple_pay_enabled:
                        type:
                          - 'null'
                          - boolean
                        example: false
                      google_pay_enabled:
                        type:
                          - 'null'
                          - boolean
                        example: false
                      sub_adapter:
                        type:
                          - 'null'
                          - string
                        example: acapture
                      credentials:
                        type:
                          - 'null'
                          - object
                        example: {}
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '400':
          description: error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: There was an error in creating payment account.
                  errors:
                    type: object
                    example: {}
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Invalid credentials schema
                  errors:
                    type: object
                    example: {}
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Invalid credentials schema
                  errors:
                    type: object
                    example: {}
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                payment_account:
                  type: object
                  properties:
                    name:
                      type: string
                      minLength: 1
                    integration_class:
                      type: string
                      minLength: 1
                    adapter_class:
                      type: string
                      minLength: 1
                    active:
                      type: boolean
                      not:
                        type: 'null'
                    test:
                      type: boolean
                      not:
                        type: 'null'
                    gateway_type:
                      type: string
                    sandbox:
                      type: boolean
                    apple_pay_enabled:
                      type: boolean
                    google_pay_enabled:
                      type: boolean
                    sub_adapter:
                      type: string
                    credentials:
                      type: object
                    company_country_ids:
                      type: array
                      items:
                        type: integer
                    droplet_installation_id:
                      type: integer
                    auto_assign_to_cart:
                      type: boolean
                  required: []
              required:
                - id
                - payment_account
    delete:
      summary: Delete a payment account
      description: Delete a single payment account
      tags:
        - Payment Accounts
      operationId: deletePaymentAccount
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Id of payment account to be deleted.
          example: '1'
          schema:
            type: string
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  payment_account:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: 'Payment account with id: 1 not found'
                  errors:
                    type: object
                    example: {}
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
        '422':
          description: error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: 'Payment account with id: 1 could not be deleted'
                  errors:
                    type: object
                    example: {}
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - error_message
  /api/payment_accounts/credentials_schema:
    get:
      summary: Get credentials schema for a payment integration
      description: Returns the credentials schema for a specific payment integration
      tags:
        - Payment Accounts
      operationId: getCredentialsSchemaForPaymentIntegration
      security:
        - bearer_auth: []
      parameters:
        - name: integration_class
          in: query
          required: true
          example: CreditCard
          description: Name of Integration
          schema:
            type: string
        - name: adapter_class
          in: query
          required: false
          example: ActiveMerchant::Billing::SpreedlyCoreGateway
          description: Optional adapter class for integrations that support it
          schema:
            type: string
        - name: sub_adapter
          in: query
          required: false
          example: adyen
          description: Optional sub-adapter for integrations that support it
          schema:
            type: string
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  credentials_schema:
                    type: object
                    description: Schema for credentials required by the integration
                    example:
                      merchant_account:
                        label: Merchant Account
                        type: string
                        required: true
                        safe: true
                      username:
                        label: Username
                        type: string
                        required: true
                        safe: true
                      password:
                        label: Password
                        type: string
                        required: true
                        safe: false
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: integration class not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Integration class not found
                  errors:
                    type: object
                    example:
                      integration_class:
                        - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Invalid parameters
                  errors:
                    type: object
                    example:
                      payment_account:
                        integration_class:
                          - is missing
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
  /api/payment_integrations:
    get:
      summary: List payment integrations
      description: List payment integrations
      tags:
        - Payment Integrations
      operationId: listPaymentIntegrations
      security:
        - bearer_auth: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  payment_integrations:
                    type: array
                    items:
                      title: Commerce::Payments::Integrations::Integration
                      type: object
                      properties:
                        integration_class:
                          example: CreditCard
                          type: string
                        title:
                          example: Credit Card
                          type: string
                        image_url:
                          example: >-
                            https://assets.fluid.app/images/payment_icons/generic.svg
                          type: string
                        features:
                          example:
                            subscription: false
                            test_mode: false
                            sandbox: true
                          type: object
                      required:
                        - integration_class
                        - title
                        - image_url
                        - features
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - payment_integrations
  /api/payment_integrations/{integration_class}:
    get:
      summary: Show a payment integration
      description: Show a payment integration
      tags:
        - Payment Integrations
      operationId: showPaymentIntegration
      security:
        - bearer_auth: []
      parameters:
        - name: integration_class
          in: path
          required: true
          example: CreditCard
          description: The integration class of payment integration to show
          schema:
            type: string
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  payment_integration:
                    title: Commerce::Payments::Integrations::Integration
                    type: object
                    properties:
                      integration_class:
                        example: CreditCard
                        type: string
                      title:
                        example: Credit Card
                        type: string
                      image_url:
                        example: >-
                          https://assets.fluid.app/images/payment_icons/generic.svg
                        type: string
                      features:
                        example:
                          subscription: false
                          test_mode: false
                          sandbox: true
                        type: object
                      adapters:
                        example:
                          adapter_label: Gateway
                          sub_adapter_label: Merchant Gateway
                          adapter_classes:
                            - label: SpreedlyCoreGateway
                              class_name: ActiveMerchant::Billing::SpreedlyCoreGateway
                              sub_adapter_list:
                                - label: Acapture
                                  class_name: acapture
                                - label: Stripe Payment Intents
                                  class_name: stripe_payment_intents
                                - label: Spreedly Test
                                  class_name: test
                                - label: X Pay
                                  class_name: xpay
                            - label: Bogus
                              class_name: ActiveMerchant::Billing::Bogus
                              sub_adapter_list:
                                - label: Acapture
                                  class_name: acapture
                                - label: Quantum
                                  class_name: quantum
                                - label: Quickbooks
                                  class_name: quickbooks
                                - label: Worldpay US
                                  class_name: worldpay_us
                        type:
                          - object
                          - 'null'
                    required:
                      - integration_class
                      - title
                      - image_url
                      - features
                      - adapters
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - payment_integration
        '404':
          description: integration class not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Integration class not found
                  errors:
                    type: object
                    example:
                      integration_class:
                        - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
  /api/v202506/carts/{cart_token}/klarna/create_session:
    post:
      summary: Creates a Klarna payment session
      tags:
        - Payments
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
      responses:
        '201':
          description: session created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  session_id:
                    type: string
                    example: test_session_id
                  client_token:
                    type: string
                    example: test_client_token
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
        '400':
          description: invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                    example:
                      - Invalid request
                  error_message:
                    type: string
                    example: Failed to create Klarna session
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
        '404':
          description: cart not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Cart with cart_token non_existent_token not found.
                  errors:
                    type: object
                    properties:
                      cart_token:
                        type: array
                        items:
                          type: string
                        example:
                          - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                intent:
                  type: string
                  enum:
                    - buy
                    - tokenize
                    - buy_and_tokenize
                    - buy_and_default_tokenize
  /api/v202506/carts/{cart_token}/klarna/update_session:
    post:
      summary: Updates a Klarna session
      tags:
        - Payments
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: session updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
        '400':
          description: failed to update session
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                    example:
                      - Invalid session
                  error_message:
                    type: string
                    example: Failed to update Klarna session
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
        '404':
          description: cart not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Cart with cart_token non_existent_token not found.
                  errors:
                    type: object
                    properties:
                      cart_token:
                        type: array
                        items:
                          type: string
                        example:
                          - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                session_id:
                  type: string
                  description: Klarna session ID
                  example: test_session_id
              required:
                - session_id
  /api/v202506/carts/{cart_token}/paypal/create_order:
    post:
      summary: Create order in paypal
      tags:
        - Paypal
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
      responses:
        '201':
          description: Order Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  order_id:
                    type:
                      - string
                      - 'null'
                    example: test1232
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
        '404':
          description: Cart not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Cart with token test-cart-token not found.
                  errors:
                    type: object
                    example:
                      cart_token:
                        - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
  /api/v202506/carts/{cart_token}/paypal/authorize_order:
    post:
      summary: Authorize order in paypal
      tags:
        - Paypal
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
      responses:
        '400':
          description: Invalid order id
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Invalid order_id test-order-id.
                  errors:
                    type: object
                    example:
                      order_id:
                        - is invalid
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
        '404':
          description: Cart not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Cart with token test-cart-token not found.
                  errors:
                    type: object
                    example:
                      cart_token:
                        - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
        required: true
  /api/company/v1/products:
    get:
      summary: List products
      tags:
        - Products
      security:
        - bearer_auth: []
      operationId: listProducts
      parameters:
        - name: status[]
          in: query
          description: >-
            Filter by status. Supported values: 'active', 'draft', 'archived'.
            If no filter is sent, returns all products regardless of status.
          required: false
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
        - name: availability[]
          in: query
          description: >-
            Filter by availability. Supported values: 'All', 'in_stock',
            'keep_selling'. If no filter is sent, returns all products
            regardless of availability.
          required: false
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
        - name: country_code[]
          in: query
          description: >-
            Filter by country codes. If no country code is selected it returns
            product in all country
          required: false
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
        - name: category_title
          in: query
          required: false
          description: Filter by category title
          schema:
            type: string
        - name: category_id
          in: query
          required: false
          description: Filter by category ID
          schema:
            type: string
        - name: category_ids[]
          in: query
          description: Filter by category IDs
          required: false
          schema:
            type: array
            items:
              type: integer
          style: form
          explode: true
        - name: collection_id
          in: query
          required: false
          description: Filter by collection ID
          schema:
            type: string
        - name: collection_ids[]
          in: query
          description: Filter by collection IDs
          required: false
          schema:
            type: array
            items:
              type: integer
          style: form
          explode: true
        - name: bundle
          in: query
          required: false
          description: Filter by bundle
          schema:
            type: boolean
        - name: order_by[]
          in: query
          description: Sort results by specified field in specified direction.
          required: false
          schema:
            type: array
            items:
              type: string
            minItems: 2
            maxItems: 2
          style: form
          explode: true
        - name: search_query
          in: query
          required: false
          description: Search the products by title
          schema:
            type: string
        - name: by_metadata
          in: query
          schema:
            type: string
            default: '{}'
            format: json
          required: false
          description: Search JSON meta data
        - name: page
          in: query
          schema:
            type: integer
            default: 1
          required: false
          description: Page number for pagination
        - name: per_page
          in: query
          schema:
            type: integer
            default: 10
          required: false
          description: Number of records per page
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  products:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        sku:
                          type:
                            - string
                            - 'null'
                        title:
                          type:
                            - string
                            - 'null'
                        description:
                          type:
                            - string
                            - 'null'
                        image_url:
                          type: string
                        status:
                          type: string
                        price:
                          type: string
                        commission:
                          type: string
                        public:
                          type: boolean
                        slug:
                          type: string
                        active:
                          type: boolean
                        introduction:
                          type:
                            - string
                            - 'null'
                        feature_text:
                          type:
                            - string
                            - 'null'
                        stripped:
                          type:
                            - string
                            - 'null'
                        review_count:
                          type: integer
                        show_reviews:
                          type: boolean
                        upc:
                          type:
                            - string
                            - 'null'
                        hs_code:
                          type:
                            - string
                            - 'null'
                        compressed_image_url:
                          type:
                            - string
                            - 'null'
                        image_path:
                          type:
                            - string
                            - 'null'
                        external_url:
                          type:
                            - string
                            - 'null'
                        display_price:
                          type: string
                        subscription_price:
                          type: string
                        tax_inclusive_price:
                          type: string
                        tax_inclusive_wholesale:
                          type: string
                        tax_inclusive_subscription_price:
                          type: string
                        tax_inclusive_wholesale_subscription_price:
                          type: string
                        currency_code:
                          type: string
                        tax_category_id:
                          type: integer
                        tax_category:
                          title: TaxCategory
                          type: object
                          properties:
                            id:
                              type: integer
                            code:
                              example: SV010020
                              type: string
                            title:
                              example: Tangible personal property (tpp)
                              type: string
                          required:
                            - id
                            - code
                            - title
                        international_tax_type:
                          type:
                            - string
                            - 'null'
                        in_stock:
                          type: boolean
                        keep_selling:
                          type: boolean
                        track_quantity:
                          type: boolean
                        no_index:
                          type: boolean
                        publish_to_retail_store:
                          type: boolean
                        publish_to_rep_store:
                          type: boolean
                        publish_to_share_tab:
                          type: boolean
                        affiliate_commission:
                          type:
                            - string
                            - 'null'
                        integration_id:
                          type:
                            - string
                            - 'null'
                        external_id:
                          type:
                            - string
                            - 'null'
                        application_theme_template_id:
                          type:
                            - string
                            - 'null'
                        last_synced_at:
                          type:
                            - string
                            - 'null'
                        updated_at:
                          type:
                            - string
                            - 'null'
                        option_attrs:
                          type: array
                          items:
                            type: string
                        metadata:
                          type: object
                          description: >-
                            A JSON object that can store any custom data
                            structure.
                        product_subscription_plans:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                              default:
                                type: boolean
                              products_count:
                                type: integer
                              subscribers_count:
                                type: integer
                              subscription_plan:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                  name:
                                    type: string
                                  billing_interval:
                                    type: integer
                                  billing_interval_unit:
                                    type: string
                                  price_adjustment_amount:
                                    type:
                                      - string
                                      - 'null'
                                  price_adjustment_type:
                                    type:
                                      - string
                                      - 'null'
                        product_bundles:
                          type: array
                          items:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                              bundled_variant:
                                type: object
                              quantity:
                                type: integer
                              tax_percentage:
                                type: number
                        collections:
                          type: array
                        tags:
                          type: array
                        label:
                          oneOf:
                            - type: 'null'
                            - type: object
                              properties:
                                id:
                                  type: integer
                                title:
                                  type: string
                                background:
                                  type: string
                                icon:
                                  type: string
                                color:
                                  type: string
                        search_engine_optimizer:
                          oneOf:
                            - type: 'null'
                            - type: object
                              properties:
                                id:
                                  type: integer
                                title:
                                  type: string
                                description:
                                  type: string
                                image_url:
                                  type: string
                                image_path:
                                  type: string
                                block_crawler:
                                  type: boolean
                        category:
                          oneOf:
                            - type: 'null'
                            - type: object
                              properties:
                                id:
                                  type: integer
                                title:
                                  type: string
                                description:
                                  type: string
                                image_url:
                                  type: string
                                image_path:
                                  type: string
                                position:
                                  type: integer
                                public:
                                  type: boolean
                        images:
                          type: array
                        options:
                          type: array
                        variants:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                              is_master:
                                type: boolean
                              title:
                                type:
                                  - string
                                  - 'null'
                              image_url:
                                type:
                                  - string
                                  - 'null'
                              buyable:
                                type: boolean
                              allow_subscription:
                                type: boolean
                              subscription_only:
                                type: boolean
                              shipping_included_in_price:
                                type: boolean
                              images:
                                type: array
                              track_quantity:
                                type: boolean
                              inventory_quantity:
                                type:
                                  - 'null'
                                  - integer
                              bar_code:
                                type:
                                  - string
                                  - 'null'
                              limit_subscription:
                                type: boolean
                              subscription_max_qty:
                                type:
                                  - 'null'
                                  - integer
                              customer_limit:
                                type:
                                  - 'null'
                                  - integer
                              keep_selling:
                                type: boolean
                              limit_quantity_per_customer:
                                type: boolean
                              option_attrs:
                                type: array
                                items:
                                  type: string
                              inventory_levels:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                    available:
                                      type: integer
                                    committed:
                                      type: integer
                                    on_hand:
                                      type: integer
                                    unavailable:
                                      type: integer
                                    warehouse:
                                      type: object
                                      properties:
                                        id:
                                          type: integer
                                        name:
                                          type: string
                                        active:
                                          type: boolean
                                        country_iso:
                                          type: string
                              variant_countries:
                                type: object
                      required:
                        - id
                        - title
                        - description
                        - image_url
                        - status
                        - price
                        - public
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            example: 1
                          total_pages:
                            type: integer
                            example: 10
                          total_count:
                            type: integer
                            example: 100
                          per_page:
                            type: integer
                            example: 10
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Invalid parameters
                  errors:
                    type: object
                    example:
                      by_metadata:
                        - >-
                          The value `{referred_by: {user: 'John},}` in parameter
                          `by_metadata` is not a valid JSON
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
    post:
      summary: Create a product
      tags:
        - Products
      operationId: createProduct
      security:
        - bearer_auth: []
      description: Create a new product
      parameters: []
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    type: object
                    properties:
                      id:
                        type: integer
                      sku:
                        type:
                          - string
                          - 'null'
                      title:
                        type:
                          - string
                          - 'null'
                      description:
                        type:
                          - string
                          - 'null'
                      image_url:
                        type: string
                      status:
                        type: string
                      price:
                        type: string
                      commission:
                        type: string
                      public:
                        type: boolean
                      slug:
                        type: string
                      active:
                        type: boolean
                      introduction:
                        type:
                          - string
                          - 'null'
                      feature_text:
                        type:
                          - string
                          - 'null'
                      stripped:
                        type:
                          - string
                          - 'null'
                      review_count:
                        type: integer
                      show_reviews:
                        type: boolean
                      upc:
                        type:
                          - string
                          - 'null'
                      hs_code:
                        type:
                          - string
                          - 'null'
                      compressed_image_url:
                        type:
                          - string
                          - 'null'
                      image_path:
                        type:
                          - string
                          - 'null'
                      external_url:
                        type:
                          - string
                          - 'null'
                      display_price:
                        type: string
                      subscription_price:
                        type: string
                      tax_inclusive_price:
                        type: string
                      tax_inclusive_wholesale:
                        type: string
                      tax_inclusive_subscription_price:
                        type: string
                      tax_inclusive_wholesale_subscription_price:
                        type: string
                      currency_code:
                        type: string
                      tax_category_id:
                        type: integer
                      tax_category:
                        title: TaxCategory
                        type: object
                        properties:
                          id:
                            type: integer
                          code:
                            example: SV010020
                            type: string
                          title:
                            example: Tangible personal property (tpp)
                            type: string
                        required:
                          - id
                          - code
                          - title
                      international_tax_type:
                        type:
                          - string
                          - 'null'
                      in_stock:
                        type: boolean
                      keep_selling:
                        type: boolean
                      track_quantity:
                        type: boolean
                      no_index:
                        type: boolean
                      publish_to_retail_store:
                        type: boolean
                      publish_to_rep_store:
                        type: boolean
                      publish_to_share_tab:
                        type: boolean
                      affiliate_commission:
                        type:
                          - string
                          - 'null'
                      integration_id:
                        type:
                          - string
                          - 'null'
                      external_id:
                        type:
                          - string
                          - 'null'
                      application_theme_template_id:
                        type:
                          - string
                          - 'null'
                      last_synced_at:
                        type:
                          - string
                          - 'null'
                      updated_at:
                        type:
                          - string
                          - 'null'
                      option_attrs:
                        type: array
                        items:
                          type: string
                      metadata:
                        type: object
                        description: >-
                          A JSON object that can store any custom data
                          structure.
                      product_subscription_plans:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            default:
                              type: boolean
                            products_count:
                              type: integer
                            subscribers_count:
                              type: integer
                            subscription_plan:
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  type: string
                                billing_interval:
                                  type: integer
                                billing_interval_unit:
                                  type: string
                                price_adjustment_amount:
                                  type:
                                    - string
                                    - 'null'
                                price_adjustment_type:
                                  type:
                                    - string
                                    - 'null'
                      product_bundles:
                        type: array
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                            bundled_variant:
                              type: object
                            quantity:
                              type: integer
                            tax_percentage:
                              type: number
                      collections:
                        type: array
                      tags:
                        type: array
                      label:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              background:
                                type: string
                              icon:
                                type: string
                              color:
                                type: string
                      search_engine_optimizer:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              description:
                                type: string
                              image_url:
                                type: string
                              image_path:
                                type: string
                              block_crawler:
                                type: boolean
                      category:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              description:
                                type: string
                              image_url:
                                type: string
                              image_path:
                                type: string
                              position:
                                type: integer
                              public:
                                type: boolean
                      images:
                        type: array
                      options:
                        type: array
                      variants:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            is_master:
                              type: boolean
                            title:
                              type:
                                - string
                                - 'null'
                            image_url:
                              type:
                                - string
                                - 'null'
                            buyable:
                              type: boolean
                            allow_subscription:
                              type: boolean
                            subscription_only:
                              type: boolean
                            shipping_included_in_price:
                              type: boolean
                            images:
                              type: array
                            track_quantity:
                              type: boolean
                            inventory_quantity:
                              type:
                                - 'null'
                                - integer
                            bar_code:
                              type:
                                - string
                                - 'null'
                            limit_subscription:
                              type: boolean
                            subscription_max_qty:
                              type:
                                - 'null'
                                - integer
                            customer_limit:
                              type:
                                - 'null'
                                - integer
                            keep_selling:
                              type: boolean
                            option_attrs:
                              type: array
                              items:
                                type: string
                            inventory_levels:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                  available:
                                    type: integer
                                  committed:
                                    type: integer
                                  on_hand:
                                    type: integer
                                  unavailable:
                                    type: integer
                                  warehouse:
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      name:
                                        type: string
                                      active:
                                        type: boolean
                                      country_iso:
                                        type: string
                            variant_countries:
                              type: object
                    required:
                      - id
                      - title
                      - description
                      - image_url
                      - status
                      - price
                      - public
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '422':
          description: validation failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Invalid parameters
                  errors:
                    type: object
                    description: Hash of field names and error messages
                    example:
                      product:
                        title:
                          - is missing
                        price:
                          - must be a decimal
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                product:
                  type: object
                  properties:
                    title:
                      type: string
                      minLength: 1
                    image_url:
                      type: string
                    sku:
                      type: string
                    introduction:
                      type: string
                    feature_text:
                      type: string
                    description:
                      type: string
                    status:
                      type: string
                    commission:
                      type: number
                    public:
                      type: boolean
                    metadata:
                      type: object
                    publish_to_retail_store:
                      type: boolean
                    publish_to_rep_store:
                      type: boolean
                    publish_to_share_tab:
                      type: boolean
                    show_reviews:
                      type: boolean
                    application_theme_template_id:
                      type: integer
                    tax_category_id:
                      type: integer
                    international_tax_type:
                      type: string
                    collection_ids:
                      type: array
                      items:
                        type: integer
                    tag_ids:
                      type: array
                      items:
                        type: integer
                    label_id:
                      type: integer
                    category_id:
                      type: integer
                    keep_selling:
                      type: boolean
                    option_attrs:
                      type: array
                      items:
                        type: string
                    no_index:
                      type: boolean
                    search_engine_optimizer_attributes:
                      type: object
                      properties:
                        title:
                          type: string
                        description:
                          type: string
                        image_url:
                          type: string
                        image_path:
                          type: string
                        block_crawler:
                          type: boolean
                      required: []
                    images_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          position:
                            type: integer
                          image_url:
                            type: string
                        required:
                          - position
                          - image_url
                    product_subscription_plans_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                          subscription_plan_id:
                            type: integer
                          default:
                            type: boolean
                          _destroy:
                            type: boolean
                        required: []
                    variants_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          option_attrs:
                            type: array
                            items:
                              type: string
                          sku:
                            type: string
                          is_master:
                            type: boolean
                          title:
                            type: string
                          track_quantity:
                            type: boolean
                          bar_code:
                            type: string
                          limit_subscription:
                            type: boolean
                          subscription_max_qty:
                            type: integer
                          customer_limit:
                            type: integer
                          keep_selling:
                            type: boolean
                          images_attributes:
                            type: array
                            items:
                              type: object
                              properties:
                                position:
                                  type: integer
                                image_url:
                                  type: string
                              required:
                                - position
                                - image_url
                          inventory_levels_attributes:
                            type: array
                            items:
                              type: object
                              properties:
                                warehouse_id:
                                  type: integer
                                  not:
                                    type: 'null'
                                available:
                                  type: integer
                                  not:
                                    type: 'null'
                                committed:
                                  type: integer
                                  not:
                                    type: 'null'
                                on_hand:
                                  type: integer
                                  not:
                                    type: 'null'
                                unavailable:
                                  type: integer
                                  not:
                                    type: 'null'
                              required: []
                          variant_countries_attributes:
                            type: array
                            items:
                              type: object
                              properties:
                                active:
                                  type: boolean
                                country_id:
                                  type: integer
                                price:
                                  type: number
                                wholesale:
                                  type: number
                                compare_price:
                                  type: number
                                cv:
                                  type: integer
                                qv:
                                  type: integer
                                pc_cv:
                                  type: integer
                                pc_qv:
                                  type: integer
                                cost_of_goods_sold:
                                  type: number
                                shipping:
                                  type: number
                                tax:
                                  type: number
                              required:
                                - active
                                - country_id
                                - price
                        required:
                          - variant_countries_attributes
                    bundle:
                      type: boolean
                    product_bundles_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                          bundled_variant_id:
                            type: integer
                          quantity:
                            type: integer
                          _destroy:
                            type: boolean
                        required: []
                  required:
                    - title
              required:
                - product
  /api/company/v1/products/{id}:
    get:
      summary: Show a product
      tags:
        - Products
      operationId: showProduct
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Product's Id or slug
          schema:
            type: integer
        - name: lang
          in: query
          required: false
          description: >
            Determines language to be used to display translations, if
            applicable.

            - If not specified, the company's default language is used.

            - This is the 2 letter ISO language code. Examples: 'en', 'es', 'fr'

            - It can be upper case or lower case
          schema:
            type: string
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    type: object
                    properties:
                      id:
                        type: integer
                      sku:
                        type:
                          - string
                          - 'null'
                      title:
                        type:
                          - string
                          - 'null'
                      description:
                        type:
                          - string
                          - 'null'
                      image_url:
                        type: string
                      status:
                        type: string
                      price:
                        type: string
                      commission:
                        type: string
                      public:
                        type: boolean
                      slug:
                        type: string
                      active:
                        type: boolean
                      introduction:
                        type:
                          - string
                          - 'null'
                      feature_text:
                        type:
                          - string
                          - 'null'
                      stripped:
                        type:
                          - string
                          - 'null'
                      review_count:
                        type: integer
                      show_reviews:
                        type: boolean
                      upc:
                        type:
                          - string
                          - 'null'
                      hs_code:
                        type:
                          - string
                          - 'null'
                      compressed_image_url:
                        type:
                          - string
                          - 'null'
                      image_path:
                        type:
                          - string
                          - 'null'
                      external_url:
                        type:
                          - string
                          - 'null'
                      display_price:
                        type: string
                      subscription_price:
                        type: string
                      tax_inclusive_price:
                        type: string
                      tax_inclusive_wholesale:
                        type: string
                      tax_inclusive_subscription_price:
                        type: string
                      tax_inclusive_wholesale_subscription_price:
                        type: string
                      currency_code:
                        type: string
                      tax_category_id:
                        type: integer
                      tax_category:
                        title: TaxCategory
                        type: object
                        properties:
                          id:
                            type: integer
                          code:
                            example: SV010020
                            type: string
                          title:
                            example: Tangible personal property (tpp)
                            type: string
                        required:
                          - id
                          - code
                          - title
                      international_tax_type:
                        type:
                          - string
                          - 'null'
                      in_stock:
                        type: boolean
                      keep_selling:
                        type: boolean
                      track_quantity:
                        type: boolean
                      no_index:
                        type: boolean
                      publish_to_retail_store:
                        type: boolean
                      publish_to_rep_store:
                        type: boolean
                      publish_to_share_tab:
                        type: boolean
                      affiliate_commission:
                        type:
                          - string
                          - 'null'
                      integration_id:
                        type:
                          - string
                          - 'null'
                      external_id:
                        type:
                          - string
                          - 'null'
                      application_theme_template_id:
                        type:
                          - string
                          - 'null'
                      last_synced_at:
                        type:
                          - string
                          - 'null'
                      updated_at:
                        type:
                          - string
                          - 'null'
                      option_attrs:
                        type: array
                        items:
                          type: string
                      metadata:
                        type: object
                        description: >-
                          A JSON object that can store any custom data
                          structure.
                      product_subscription_plans:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            default:
                              type: boolean
                            products_count:
                              type: integer
                            subscribers_count:
                              type: integer
                            subscription_plan:
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  type: string
                                billing_interval:
                                  type: integer
                                billing_interval_unit:
                                  type: string
                                price_adjustment_amount:
                                  type:
                                    - string
                                    - 'null'
                                price_adjustment_type:
                                  type:
                                    - string
                                    - 'null'
                      product_bundles:
                        type: array
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                            bundled_variant:
                              type: object
                            quantity:
                              type: integer
                            tax_percentage:
                              type: number
                      collections:
                        type: array
                      tags:
                        type: array
                      label:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              background:
                                type: string
                              icon:
                                type: string
                              color:
                                type: string
                      search_engine_optimizer:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              description:
                                type: string
                              image_url:
                                type: string
                              image_path:
                                type: string
                              block_crawler:
                                type: boolean
                      category:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              description:
                                type: string
                              image_url:
                                type: string
                              image_path:
                                type: string
                              position:
                                type: integer
                              public:
                                type: boolean
                      images:
                        type: array
                      options:
                        type: array
                      variants:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            is_master:
                              type: boolean
                            title:
                              type:
                                - string
                                - 'null'
                            image_url:
                              type:
                                - string
                                - 'null'
                            buyable:
                              type: boolean
                            allow_subscription:
                              type: boolean
                            subscription_only:
                              type: boolean
                            shipping_included_in_price:
                              type: boolean
                            images:
                              type: array
                            track_quantity:
                              type: boolean
                            inventory_quantity:
                              type:
                                - 'null'
                                - integer
                            bar_code:
                              type:
                                - string
                                - 'null'
                            limit_subscription:
                              type: boolean
                            subscription_max_qty:
                              type:
                                - 'null'
                                - integer
                            customer_limit:
                              type:
                                - 'null'
                                - integer
                            keep_selling:
                              type: boolean
                            limit_quantity_per_customer:
                              type: boolean
                            option_attrs:
                              type: array
                              items:
                                type: string
                            inventory_levels:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                  available:
                                    type: integer
                                  committed:
                                    type: integer
                                  on_hand:
                                    type: integer
                                  unavailable:
                                    type: integer
                                  warehouse:
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      name:
                                        type: string
                                      active:
                                        type: boolean
                                      country_iso:
                                        type: string
                            variant_countries:
                              type: object
                    required:
                      - id
                      - title
                      - description
                      - image_url
                      - status
                      - price
                      - public
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
    patch:
      summary: Update a product
      tags:
        - Products
      operationId: updateProduct
      security:
        - bearer_auth: []
      description: Update an existing product
      parameters:
        - name: id
          in: path
          required: true
          description: 'Product''s Id '
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    type: object
                    properties:
                      id:
                        type: integer
                      sku:
                        type:
                          - string
                          - 'null'
                      title:
                        type:
                          - string
                          - 'null'
                      description:
                        type:
                          - string
                          - 'null'
                      image_url:
                        type: string
                      status:
                        type: string
                      price:
                        type: string
                      commission:
                        type: string
                      public:
                        type: boolean
                      slug:
                        type: string
                      active:
                        type: boolean
                      introduction:
                        type:
                          - string
                          - 'null'
                      feature_text:
                        type:
                          - string
                          - 'null'
                      stripped:
                        type:
                          - string
                          - 'null'
                      review_count:
                        type: integer
                      show_reviews:
                        type: boolean
                      upc:
                        type:
                          - string
                          - 'null'
                      hs_code:
                        type:
                          - string
                          - 'null'
                      compressed_image_url:
                        type:
                          - string
                          - 'null'
                      image_path:
                        type:
                          - string
                          - 'null'
                      external_url:
                        type:
                          - string
                          - 'null'
                      display_price:
                        type: string
                      subscription_price:
                        type: string
                      tax_inclusive_price:
                        type: string
                      tax_inclusive_wholesale:
                        type: string
                      tax_inclusive_subscription_price:
                        type: string
                      tax_inclusive_wholesale_subscription_price:
                        type: string
                      currency_code:
                        type: string
                      tax_category_id:
                        type: integer
                      tax_category:
                        title: TaxCategory
                        type: object
                        properties:
                          id:
                            type: integer
                          code:
                            example: SV010020
                            type: string
                          title:
                            example: Tangible personal property (tpp)
                            type: string
                        required:
                          - id
                          - code
                          - title
                      international_tax_type:
                        type:
                          - string
                          - 'null'
                      in_stock:
                        type: boolean
                      keep_selling:
                        type: boolean
                      track_quantity:
                        type: boolean
                      no_index:
                        type: boolean
                      publish_to_retail_store:
                        type: boolean
                      publish_to_rep_store:
                        type: boolean
                      publish_to_share_tab:
                        type: boolean
                      affiliate_commission:
                        type:
                          - string
                          - 'null'
                      integration_id:
                        type:
                          - string
                          - 'null'
                      external_id:
                        type:
                          - string
                          - 'null'
                      application_theme_template_id:
                        type:
                          - string
                          - 'null'
                      last_synced_at:
                        type:
                          - string
                          - 'null'
                      updated_at:
                        type:
                          - string
                          - 'null'
                      option_attrs:
                        type: array
                        items:
                          type: string
                      metadata:
                        type: object
                        description: >-
                          A JSON object that can store any custom data
                          structure.
                      product_subscription_plans:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            default:
                              type: boolean
                            products_count:
                              type: integer
                            subscribers_count:
                              type: integer
                            subscription_plan:
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  type: string
                                billing_interval:
                                  type: integer
                                billing_interval_unit:
                                  type: string
                                price_adjustment_amount:
                                  type:
                                    - string
                                    - 'null'
                                price_adjustment_type:
                                  type:
                                    - string
                                    - 'null'
                      product_bundles:
                        type: array
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                            bundled_variant:
                              type: object
                            quantity:
                              type: integer
                            tax_percentage:
                              type: number
                      collections:
                        type: array
                      tags:
                        type: array
                      label:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              background:
                                type: string
                              icon:
                                type: string
                              color:
                                type: string
                      search_engine_optimizer:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              description:
                                type: string
                              image_url:
                                type: string
                              image_path:
                                type: string
                              block_crawler:
                                type: boolean
                      category:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              description:
                                type: string
                              image_url:
                                type: string
                              image_path:
                                type: string
                              position:
                                type: integer
                              public:
                                type: boolean
                      images:
                        type: array
                      options:
                        type: array
                      variants:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            is_master:
                              type: boolean
                            title:
                              type:
                                - string
                                - 'null'
                            image_url:
                              type:
                                - string
                                - 'null'
                            buyable:
                              type: boolean
                            allow_subscription:
                              type: boolean
                            subscription_only:
                              type: boolean
                            shipping_included_in_price:
                              type: boolean
                            images:
                              type: array
                            track_quantity:
                              type: boolean
                            inventory_quantity:
                              type:
                                - 'null'
                                - integer
                            bar_code:
                              type:
                                - string
                                - 'null'
                            limit_subscription:
                              type: boolean
                            subscription_max_qty:
                              type:
                                - 'null'
                                - integer
                            customer_limit:
                              type:
                                - 'null'
                                - integer
                            keep_selling:
                              type: boolean
                            option_attrs:
                              type: array
                              items:
                                type: string
                            inventory_levels:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                  available:
                                    type: integer
                                  committed:
                                    type: integer
                                  on_hand:
                                    type: integer
                                  unavailable:
                                    type: integer
                                  warehouse:
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      name:
                                        type: string
                                      active:
                                        type: boolean
                                      country_iso:
                                        type: string
                            variant_countries:
                              type: object
                    required:
                      - id
                      - title
                      - description
                      - image_url
                      - status
                      - price
                      - public
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    description: Hash of field names and error messages
                    example:
                      product:
                        title:
                          - is missing
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  minLength: 1
                product:
                  type: object
                  properties:
                    title:
                      type: string
                      minLength: 1
                    image_url:
                      type: string
                    sku:
                      type: string
                    introduction:
                      type: string
                    feature_text:
                      type: string
                    description:
                      type: string
                    status:
                      type: string
                    commission:
                      type: number
                    public:
                      type: boolean
                    metadata:
                      type: object
                    publish_to_retail_store:
                      type: boolean
                    publish_to_rep_store:
                      type: boolean
                    publish_to_share_tab:
                      type: boolean
                    show_reviews:
                      type: boolean
                    application_theme_template_id:
                      type: integer
                    tax_category_id:
                      type: integer
                    international_tax_type:
                      type: string
                    collection_ids:
                      type: array
                      items:
                        type: integer
                    tag_ids:
                      type: array
                      items:
                        type: integer
                    label_id:
                      type: integer
                    category_id:
                      type: integer
                    keep_selling:
                      type: boolean
                    option_attrs:
                      type: array
                      items:
                        type: string
                    no_index:
                      type: boolean
                    search_engine_optimizer_attributes:
                      type: object
                      properties:
                        id:
                          type: integer
                        title:
                          type: string
                        description:
                          type: string
                        image_url:
                          type: string
                        image_path:
                          type: string
                        block_crawler:
                          type: boolean
                      required: []
                    images_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                          position:
                            type: integer
                          image_url:
                            type: string
                          _destroy:
                            type: boolean
                        required:
                          - position
                          - image_url
                    product_subscription_plans_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                          subscription_plan_id:
                            type: integer
                          default:
                            type: boolean
                          _destroy:
                            type: boolean
                        required: []
                    variants_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                          option_attrs:
                            type: array
                            items:
                              type: string
                          sku:
                            type: string
                          is_master:
                            type: boolean
                          title:
                            type: string
                          _destroy:
                            type: boolean
                          track_quantity:
                            type: boolean
                          bar_code:
                            type: string
                          limit_subscription:
                            type: boolean
                          subscription_max_qty:
                            type: integer
                          customer_limit:
                            type: integer
                          keep_selling:
                            type: boolean
                          images_attributes:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                position:
                                  type: integer
                                image_url:
                                  type: string
                                _destroy:
                                  type: boolean
                              required:
                                - position
                                - image_url
                          inventory_levels_attributes:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                warehouse_id:
                                  type: integer
                                  not:
                                    type: 'null'
                                available:
                                  type: integer
                                  not:
                                    type: 'null'
                                committed:
                                  type: integer
                                  not:
                                    type: 'null'
                                on_hand:
                                  type: integer
                                  not:
                                    type: 'null'
                                unavailable:
                                  type: integer
                                  not:
                                    type: 'null'
                                _destroy:
                                  type: boolean
                              required: []
                          variant_countries_attributes:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                active:
                                  type: boolean
                                country_id:
                                  type: integer
                                price:
                                  type: number
                                wholesale:
                                  type: number
                                compare_price:
                                  type: number
                                cv:
                                  type: integer
                                qv:
                                  type: integer
                                pc_cv:
                                  type: integer
                                pc_qv:
                                  type: integer
                                cost_of_goods_sold:
                                  type: number
                                shipping:
                                  type: number
                                tax:
                                  type: number
                                _destroy:
                                  type: boolean
                              required: []
                        required: []
                    bundle:
                      type: boolean
                    product_bundles_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                          bundled_variant_id:
                            type: integer
                          quantity:
                            type: integer
                          _destroy:
                            type: boolean
                        required: []
                  required:
                    - title
              required:
                - id
                - product
    delete:
      summary: Delete a product
      tags:
        - Products
      operationId: deleteProduct
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Product's Id or slug
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    description: Product ID
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    description: Hash of field names and error messages
                    example:
                      errors:
                        product:
                          - >-
                            with orders cannot be deleted. You can set it as
                            draft instead.
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
  /api/company/v1/products/{id}/add_to_collection:
    post:
      summary: Add product to collection
      tags:
        - Products
      operationId: addProductToCollection
      security:
        - bearer_auth: []
      description: Add a Product to a Collection
      parameters:
        - name: id
          in: path
          required: true
          description: Product's Id or slug
          schema:
            type: integer
        - name: collection_id
          in: query
          required: true
          description: Collection's Id
          schema:
            type: string
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Product (1373) added to Collection (2402)
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    description: Hash of field names and error messages
                    example:
                      collection_id:
                        - is already taken
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
  /api/company/v1/products/{id}/remove_from_collection:
    delete:
      summary: Remove product from collection
      tags:
        - Products
      operationId: removeProductFromCollection
      security:
        - bearer_auth: []
      description: Remove a Product from a Collection
      parameters:
        - name: id
          in: path
          required: true
          description: Product's Id or slug
          schema:
            type: integer
        - name: collection_id
          in: query
          required: true
          description: Collection's Id
          schema:
            type: string
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Product (1373) removed from Collection (2402)
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: product collection not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Product Collection not found
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - not found
                    description: Hash of field names and error messages
                    example:
                      base:
                        - Product Collection not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
  /api/company/v1/products/{id}/duplicate:
    post:
      summary: Duplicate a product
      tags:
        - Products
      operationId: duplicateProduct
      security:
        - bearer_auth: []
      description: Create a duplicate copy of an existing product
      parameters:
        - name: id
          in: path
          required: true
          description: Product's Id or slug
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    type: object
                    properties:
                      id:
                        type: integer
                      sku:
                        type:
                          - string
                          - 'null'
                      title:
                        type:
                          - string
                          - 'null'
                      description:
                        type:
                          - string
                          - 'null'
                      image_url:
                        type: string
                      status:
                        type: string
                      price:
                        type: string
                      commission:
                        type: string
                      public:
                        type: boolean
                      slug:
                        type: string
                      active:
                        type: boolean
                      introduction:
                        type:
                          - string
                          - 'null'
                      feature_text:
                        type:
                          - string
                          - 'null'
                      stripped:
                        type:
                          - string
                          - 'null'
                      review_count:
                        type: integer
                      show_reviews:
                        type: boolean
                      upc:
                        type:
                          - string
                          - 'null'
                      hs_code:
                        type:
                          - string
                          - 'null'
                      compressed_image_url:
                        type:
                          - string
                          - 'null'
                      image_path:
                        type:
                          - string
                          - 'null'
                      external_url:
                        type:
                          - string
                          - 'null'
                      display_price:
                        type: string
                      subscription_price:
                        type: string
                      tax_inclusive_price:
                        type: string
                      tax_inclusive_wholesale:
                        type: string
                      tax_inclusive_subscription_price:
                        type: string
                      tax_inclusive_wholesale_subscription_price:
                        type: string
                      currency_code:
                        type: string
                      tax_category_id:
                        type: integer
                      tax_category:
                        title: TaxCategory
                        type: object
                        properties:
                          id:
                            type: integer
                          code:
                            example: SV010020
                            type: string
                          title:
                            example: Tangible personal property (tpp)
                            type: string
                        required:
                          - id
                          - code
                          - title
                      international_tax_type:
                        type:
                          - string
                          - 'null'
                      in_stock:
                        type: boolean
                      keep_selling:
                        type: boolean
                      track_quantity:
                        type: boolean
                      no_index:
                        type: boolean
                      publish_to_retail_store:
                        type: boolean
                      publish_to_rep_store:
                        type: boolean
                      publish_to_share_tab:
                        type: boolean
                      affiliate_commission:
                        type:
                          - string
                          - 'null'
                      integration_id:
                        type:
                          - string
                          - 'null'
                      external_id:
                        type:
                          - string
                          - 'null'
                      application_theme_template_id:
                        type:
                          - string
                          - 'null'
                      last_synced_at:
                        type:
                          - string
                          - 'null'
                      updated_at:
                        type:
                          - string
                          - 'null'
                      option_attrs:
                        type: array
                        items:
                          type: string
                      metadata:
                        type: object
                        description: >-
                          A JSON object that can store any custom data
                          structure.
                      product_subscription_plans:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            default:
                              type: boolean
                            products_count:
                              type: integer
                            subscribers_count:
                              type: integer
                            subscription_plan:
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  type: string
                                billing_interval:
                                  type: integer
                                billing_interval_unit:
                                  type: string
                                price_adjustment_amount:
                                  type:
                                    - string
                                    - 'null'
                                price_adjustment_type:
                                  type:
                                    - string
                                    - 'null'
                      product_bundles:
                        type: array
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                            bundled_variant:
                              type: object
                            quantity:
                              type: integer
                            tax_percentage:
                              type: number
                      collections:
                        type: array
                      tags:
                        type: array
                      label:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              background:
                                type: string
                              icon:
                                type: string
                              color:
                                type: string
                      search_engine_optimizer:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              description:
                                type: string
                              image_url:
                                type: string
                              image_path:
                                type: string
                              block_crawler:
                                type: boolean
                      category:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              description:
                                type: string
                              image_url:
                                type: string
                              image_path:
                                type: string
                              position:
                                type: integer
                              public:
                                type: boolean
                      images:
                        type: array
                      options:
                        type: array
                      variants:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            is_master:
                              type: boolean
                            title:
                              type:
                                - string
                                - 'null'
                            image_url:
                              type:
                                - string
                                - 'null'
                            buyable:
                              type: boolean
                            allow_subscription:
                              type: boolean
                            subscription_only:
                              type: boolean
                            shipping_included_in_price:
                              type: boolean
                            images:
                              type: array
                            track_quantity:
                              type: boolean
                            inventory_quantity:
                              type:
                                - 'null'
                                - integer
                            bar_code:
                              type:
                                - string
                                - 'null'
                            limit_subscription:
                              type: boolean
                            subscription_max_qty:
                              type:
                                - 'null'
                                - integer
                            customer_limit:
                              type:
                                - 'null'
                                - integer
                            keep_selling:
                              type: boolean
                            option_attrs:
                              type: array
                              items:
                                type: string
                            inventory_levels:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                  available:
                                    type: integer
                                  committed:
                                    type: integer
                                  on_hand:
                                    type: integer
                                  unavailable:
                                    type: integer
                                  warehouse:
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      name:
                                        type: string
                                      active:
                                        type: boolean
                                      country_iso:
                                        type: string
                            variant_countries:
                              type: object
                    required:
                      - id
                      - title
                      - description
                      - image_url
                      - status
                      - price
                      - public
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    description: Hash of field names and error messages
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
  /api/company/v1/products/{id}/send_to_top:
    patch:
      summary: Send product to top
      tags:
        - Products
      operationId: sendProductToTop
      security:
        - bearer_auth: []
      description: >-
        Change the priority attribute of a product to the highest priority. This
        will move the product to the top of the default order in the index API
      parameters:
        - name: id
          in: path
          required: true
          description: Product's Id or slug
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: priority set to 1000
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    description: Hash of field names and error messages
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
  /api/company/v1/products/{product_id}/find_by_shop_id:
    post:
      summary: Find product by external shop ID
      tags:
        - Products
      operationId: findProductByShopId
      security:
        - bearer_auth: []
      description: >-
        Find or optionally sync a product using external shop ID. Currently,
        support is limited to Shopify Integrations only.
      parameters:
        - name: product_id
          in: path
          required: true
          description: External ID of the product
          schema:
            type: string
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    type: object
                    properties:
                      id:
                        type: integer
                      sku:
                        type:
                          - string
                          - 'null'
                      title:
                        type:
                          - string
                          - 'null'
                      description:
                        type:
                          - string
                          - 'null'
                      image_url:
                        type: string
                      status:
                        type: string
                      price:
                        type: string
                      commission:
                        type: string
                      public:
                        type: boolean
                      slug:
                        type: string
                      active:
                        type: boolean
                      introduction:
                        type:
                          - string
                          - 'null'
                      feature_text:
                        type:
                          - string
                          - 'null'
                      stripped:
                        type:
                          - string
                          - 'null'
                      review_count:
                        type: integer
                      show_reviews:
                        type: boolean
                      upc:
                        type:
                          - string
                          - 'null'
                      hs_code:
                        type:
                          - string
                          - 'null'
                      compressed_image_url:
                        type:
                          - string
                          - 'null'
                      image_path:
                        type:
                          - string
                          - 'null'
                      external_url:
                        type:
                          - string
                          - 'null'
                      display_price:
                        type: string
                      subscription_price:
                        type: string
                      tax_inclusive_price:
                        type: string
                      tax_inclusive_wholesale:
                        type: string
                      tax_inclusive_subscription_price:
                        type: string
                      tax_inclusive_wholesale_subscription_price:
                        type: string
                      currency_code:
                        type: string
                      tax_category_id:
                        type: integer
                      tax_category:
                        title: TaxCategory
                        type: object
                        properties:
                          id:
                            type: integer
                          code:
                            example: SV010020
                            type: string
                          title:
                            example: Tangible personal property (tpp)
                            type: string
                        required:
                          - id
                          - code
                          - title
                      international_tax_type:
                        type:
                          - string
                          - 'null'
                      in_stock:
                        type: boolean
                      keep_selling:
                        type: boolean
                      track_quantity:
                        type: boolean
                      no_index:
                        type: boolean
                      publish_to_retail_store:
                        type: boolean
                      publish_to_rep_store:
                        type: boolean
                      publish_to_share_tab:
                        type: boolean
                      affiliate_commission:
                        type:
                          - string
                          - 'null'
                      integration_id:
                        type:
                          - string
                          - 'null'
                      external_id:
                        type:
                          - string
                          - 'null'
                      application_theme_template_id:
                        type:
                          - string
                          - 'null'
                      last_synced_at:
                        type:
                          - string
                          - 'null'
                      updated_at:
                        type:
                          - string
                          - 'null'
                      option_attrs:
                        type: array
                        items:
                          type: string
                      metadata:
                        type: object
                        description: >-
                          A JSON object that can store any custom data
                          structure.
                      product_subscription_plans:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            default:
                              type: boolean
                            products_count:
                              type: integer
                            subscribers_count:
                              type: integer
                            subscription_plan:
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  type: string
                                billing_interval:
                                  type: integer
                                billing_interval_unit:
                                  type: string
                                price_adjustment_amount:
                                  type:
                                    - string
                                    - 'null'
                                price_adjustment_type:
                                  type:
                                    - string
                                    - 'null'
                      product_bundles:
                        type: array
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                            bundled_variant:
                              type: object
                            quantity:
                              type: integer
                            tax_percentage:
                              type: number
                      collections:
                        type: array
                      tags:
                        type: array
                      label:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              background:
                                type: string
                              icon:
                                type: string
                              color:
                                type: string
                      search_engine_optimizer:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              description:
                                type: string
                              image_url:
                                type: string
                              image_path:
                                type: string
                              block_crawler:
                                type: boolean
                      category:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              description:
                                type: string
                              image_url:
                                type: string
                              image_path:
                                type: string
                              position:
                                type: integer
                              public:
                                type: boolean
                      images:
                        type: array
                      options:
                        type: array
                      variants:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            is_master:
                              type: boolean
                            title:
                              type:
                                - string
                                - 'null'
                            image_url:
                              type:
                                - string
                                - 'null'
                            buyable:
                              type: boolean
                            allow_subscription:
                              type: boolean
                            subscription_only:
                              type: boolean
                            shipping_included_in_price:
                              type: boolean
                            images:
                              type: array
                            track_quantity:
                              type: boolean
                            inventory_quantity:
                              type:
                                - 'null'
                                - integer
                            bar_code:
                              type:
                                - string
                                - 'null'
                            limit_subscription:
                              type: boolean
                            subscription_max_qty:
                              type:
                                - 'null'
                                - integer
                            customer_limit:
                              type:
                                - 'null'
                                - integer
                            keep_selling:
                              type: boolean
                            option_attrs:
                              type: array
                              items:
                                type: string
                            inventory_levels:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                  available:
                                    type: integer
                                  committed:
                                    type: integer
                                  on_hand:
                                    type: integer
                                  unavailable:
                                    type: integer
                                  warehouse:
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      name:
                                        type: string
                                      active:
                                        type: boolean
                                      country_iso:
                                        type: string
                            variant_countries:
                              type: object
                    required:
                      - id
                      - title
                      - description
                      - image_url
                      - status
                      - price
                      - public
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '400':
          description: shopify integration not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Shopify integration not found
                  errors:
                    type: object
                    description: Hash of field names and error messages
                    example:
                      base:
                        - shopify integration not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: product not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Product not found
                  errors:
                    type: object
                    description: Hash of field names and error messages
                    example:
                      base:
                        - product could not be found with external_id 1233423423
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
  /api/company/v1/products/{product_id}/shop_update:
    patch:
      summary: Update product by shop ID
      tags:
        - Products
      operationId: shopUpdateProduct
      security:
        - bearer_auth: []
      description: >-
        Update a product using external shop ID. Currently, support is limited
        to Shopify Integrations only.
      parameters:
        - name: product_id
          in: path
          required: true
          description: External ID of the product
          schema:
            type: string
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    type: object
                    properties:
                      id:
                        type: integer
                      sku:
                        type:
                          - string
                          - 'null'
                      title:
                        type:
                          - string
                          - 'null'
                      description:
                        type:
                          - string
                          - 'null'
                      image_url:
                        type: string
                      status:
                        type: string
                      price:
                        type: string
                      commission:
                        type: string
                      public:
                        type: boolean
                      slug:
                        type: string
                      active:
                        type: boolean
                      introduction:
                        type:
                          - string
                          - 'null'
                      feature_text:
                        type:
                          - string
                          - 'null'
                      stripped:
                        type:
                          - string
                          - 'null'
                      review_count:
                        type: integer
                      show_reviews:
                        type: boolean
                      upc:
                        type:
                          - string
                          - 'null'
                      hs_code:
                        type:
                          - string
                          - 'null'
                      compressed_image_url:
                        type:
                          - string
                          - 'null'
                      image_path:
                        type:
                          - string
                          - 'null'
                      external_url:
                        type:
                          - string
                          - 'null'
                      display_price:
                        type: string
                      subscription_price:
                        type: string
                      tax_inclusive_price:
                        type: string
                      tax_inclusive_wholesale:
                        type: string
                      tax_inclusive_subscription_price:
                        type: string
                      tax_inclusive_wholesale_subscription_price:
                        type: string
                      currency_code:
                        type: string
                      tax_category_id:
                        type: integer
                      tax_category:
                        title: TaxCategory
                        type: object
                        properties:
                          id:
                            type: integer
                          code:
                            example: SV010020
                            type: string
                          title:
                            example: Tangible personal property (tpp)
                            type: string
                        required:
                          - id
                          - code
                          - title
                      international_tax_type:
                        type:
                          - string
                          - 'null'
                      in_stock:
                        type: boolean
                      keep_selling:
                        type: boolean
                      track_quantity:
                        type: boolean
                      no_index:
                        type: boolean
                      publish_to_retail_store:
                        type: boolean
                      publish_to_rep_store:
                        type: boolean
                      publish_to_share_tab:
                        type: boolean
                      affiliate_commission:
                        type:
                          - string
                          - 'null'
                      integration_id:
                        type:
                          - string
                          - 'null'
                      external_id:
                        type:
                          - string
                          - 'null'
                      application_theme_template_id:
                        type:
                          - string
                          - 'null'
                      last_synced_at:
                        type:
                          - string
                          - 'null'
                      updated_at:
                        type:
                          - string
                          - 'null'
                      option_attrs:
                        type: array
                        items:
                          type: string
                      metadata:
                        type: object
                        description: >-
                          A JSON object that can store any custom data
                          structure.
                      product_subscription_plans:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            default:
                              type: boolean
                            products_count:
                              type: integer
                            subscribers_count:
                              type: integer
                            subscription_plan:
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  type: string
                                billing_interval:
                                  type: integer
                                billing_interval_unit:
                                  type: string
                                price_adjustment_amount:
                                  type:
                                    - string
                                    - 'null'
                                price_adjustment_type:
                                  type:
                                    - string
                                    - 'null'
                      product_bundles:
                        type: array
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                            bundled_variant:
                              type: object
                            quantity:
                              type: integer
                            tax_percentage:
                              type: number
                      collections:
                        type: array
                      tags:
                        type: array
                      label:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              background:
                                type: string
                              icon:
                                type: string
                              color:
                                type: string
                      search_engine_optimizer:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              description:
                                type: string
                              image_url:
                                type: string
                              image_path:
                                type: string
                              block_crawler:
                                type: boolean
                      category:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              description:
                                type: string
                              image_url:
                                type: string
                              image_path:
                                type: string
                              position:
                                type: integer
                              public:
                                type: boolean
                      images:
                        type: array
                      options:
                        type: array
                      variants:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            is_master:
                              type: boolean
                            title:
                              type:
                                - string
                                - 'null'
                            image_url:
                              type:
                                - string
                                - 'null'
                            buyable:
                              type: boolean
                            allow_subscription:
                              type: boolean
                            subscription_only:
                              type: boolean
                            shipping_included_in_price:
                              type: boolean
                            images:
                              type: array
                            track_quantity:
                              type: boolean
                            inventory_quantity:
                              type:
                                - 'null'
                                - integer
                            bar_code:
                              type:
                                - string
                                - 'null'
                            limit_subscription:
                              type: boolean
                            subscription_max_qty:
                              type:
                                - 'null'
                                - integer
                            customer_limit:
                              type:
                                - 'null'
                                - integer
                            keep_selling:
                              type: boolean
                            option_attrs:
                              type: array
                              items:
                                type: string
                            inventory_levels:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                  available:
                                    type: integer
                                  committed:
                                    type: integer
                                  on_hand:
                                    type: integer
                                  unavailable:
                                    type: integer
                                  warehouse:
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      name:
                                        type: string
                                      active:
                                        type: boolean
                                      country_iso:
                                        type: string
                            variant_countries:
                              type: object
                    required:
                      - id
                      - title
                      - description
                      - image_url
                      - status
                      - price
                      - public
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '400':
          description: shopify integration not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    properties:
                      base:
                        type: array
                        items:
                          type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: product not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    properties:
                      base:
                        type: array
                        items:
                          type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: validation failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Invalid parameters
                  errors:
                    type: object
                    description: Hash of field names and error messages
                    example:
                      product:
                        price:
                          - must be a decimal
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                product:
                  type: object
                  properties:
                    sku:
                      type: string
                      description: Product SKU
                    title:
                      type: string
                      description: Product title
                    image_url:
                      type: string
                      description: URL of the product image
                    price:
                      type:
                        - number
                        - string
                      description: Product price
                    shipping:
                      type:
                        - number
                        - string
                      description: Shipping cost
                    country_code:
                      type: string
                      description: Two-letter ISO country code
                    description:
                      type: string
                      description: Product description
                    status:
                      type: string
                      description: Product status
                      enum:
                        - active
                        - draft
                        - archived
                    commission:
                      type:
                        - number
                        - string
                      description: Commission rate
                    public:
                      type: boolean
                      description: Product visibility
                    metadata:
                      type: object
                      description: Custom metadata key-value pairs
              required:
                - product
  /api/company/v1/products/search_by_external_id:
    get:
      summary: Search products by external ID
      tags:
        - Products
      operationId: searchProductsByExternalId
      security:
        - bearer_auth: []
      description: >-
        Search for products using an external ID. Searches through
        variant_countries, variants, and products in that order.
      parameters:
        - name: external_id
          in: query
          required: true
          description: External ID to search for
          schema:
            type: string
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  products:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        sku:
                          type:
                            - string
                            - 'null'
                        title:
                          type:
                            - string
                            - 'null'
                        description:
                          type:
                            - string
                            - 'null'
                        image_url:
                          type: string
                        status:
                          type: string
                        price:
                          type: string
                        commission:
                          type: string
                        public:
                          type: boolean
                        slug:
                          type: string
                        active:
                          type: boolean
                        introduction:
                          type:
                            - string
                            - 'null'
                        feature_text:
                          type:
                            - string
                            - 'null'
                        stripped:
                          type:
                            - string
                            - 'null'
                        review_count:
                          type: integer
                        show_reviews:
                          type: boolean
                        upc:
                          type:
                            - string
                            - 'null'
                        hs_code:
                          type:
                            - string
                            - 'null'
                        compressed_image_url:
                          type:
                            - string
                            - 'null'
                        image_path:
                          type:
                            - string
                            - 'null'
                        external_url:
                          type:
                            - string
                            - 'null'
                        display_price:
                          type: string
                        subscription_price:
                          type: string
                        tax_inclusive_price:
                          type: string
                        tax_inclusive_wholesale:
                          type: string
                        tax_inclusive_subscription_price:
                          type: string
                        tax_inclusive_wholesale_subscription_price:
                          type: string
                        currency_code:
                          type: string
                        tax_category_id:
                          type: integer
                        tax_category:
                          title: TaxCategory
                          type: object
                          properties:
                            id:
                              type: integer
                            code:
                              example: SV010020
                              type: string
                            title:
                              example: Tangible personal property (tpp)
                              type: string
                          required:
                            - id
                            - code
                            - title
                        international_tax_type:
                          type:
                            - string
                            - 'null'
                        in_stock:
                          type: boolean
                        keep_selling:
                          type: boolean
                        track_quantity:
                          type: boolean
                        no_index:
                          type: boolean
                        publish_to_retail_store:
                          type: boolean
                        publish_to_rep_store:
                          type: boolean
                        publish_to_share_tab:
                          type: boolean
                        affiliate_commission:
                          type:
                            - string
                            - 'null'
                        integration_id:
                          type:
                            - string
                            - 'null'
                        external_id:
                          type:
                            - string
                            - 'null'
                        application_theme_template_id:
                          type:
                            - string
                            - 'null'
                        last_synced_at:
                          type:
                            - string
                            - 'null'
                        updated_at:
                          type:
                            - string
                            - 'null'
                        option_attrs:
                          type: array
                          items:
                            type: string
                        metadata:
                          type: object
                          description: >-
                            A JSON object that can store any custom data
                            structure.
                        product_subscription_plans:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                              default:
                                type: boolean
                              products_count:
                                type: integer
                              subscribers_count:
                                type: integer
                              subscription_plan:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                  name:
                                    type: string
                                  billing_interval:
                                    type: integer
                                  billing_interval_unit:
                                    type: string
                                  price_adjustment_amount:
                                    type:
                                      - string
                                      - 'null'
                                  price_adjustment_type:
                                    type:
                                      - string
                                      - 'null'
                        product_bundles:
                          type: array
                          items:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                              bundled_variant:
                                type: object
                              quantity:
                                type: integer
                              tax_percentage:
                                type: number
                        collections:
                          type: array
                        tags:
                          type: array
                        label:
                          oneOf:
                            - type: 'null'
                            - type: object
                              properties:
                                id:
                                  type: integer
                                title:
                                  type: string
                                background:
                                  type: string
                                icon:
                                  type: string
                                color:
                                  type: string
                        search_engine_optimizer:
                          oneOf:
                            - type: 'null'
                            - type: object
                              properties:
                                id:
                                  type: integer
                                title:
                                  type: string
                                description:
                                  type: string
                                image_url:
                                  type: string
                                image_path:
                                  type: string
                                block_crawler:
                                  type: boolean
                        category:
                          oneOf:
                            - type: 'null'
                            - type: object
                              properties:
                                id:
                                  type: integer
                                title:
                                  type: string
                                description:
                                  type: string
                                image_url:
                                  type: string
                                image_path:
                                  type: string
                                position:
                                  type: integer
                                public:
                                  type: boolean
                        images:
                          type: array
                        options:
                          type: array
                        variants:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                              is_master:
                                type: boolean
                              title:
                                type:
                                  - string
                                  - 'null'
                              image_url:
                                type:
                                  - string
                                  - 'null'
                              buyable:
                                type: boolean
                              allow_subscription:
                                type: boolean
                              subscription_only:
                                type: boolean
                              shipping_included_in_price:
                                type: boolean
                              images:
                                type: array
                              track_quantity:
                                type: boolean
                              inventory_quantity:
                                type:
                                  - 'null'
                                  - integer
                              bar_code:
                                type:
                                  - string
                                  - 'null'
                              limit_subscription:
                                type: boolean
                              subscription_max_qty:
                                type:
                                  - 'null'
                                  - integer
                              customer_limit:
                                type:
                                  - 'null'
                                  - integer
                              keep_selling:
                                type: boolean
                              option_attrs:
                                type: array
                                items:
                                  type: string
                              inventory_levels:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                    available:
                                      type: integer
                                    committed:
                                      type: integer
                                    on_hand:
                                      type: integer
                                    unavailable:
                                      type: integer
                                    warehouse:
                                      type: object
                                      properties:
                                        id:
                                          type: integer
                                        name:
                                          type: string
                                        active:
                                          type: boolean
                                        country_iso:
                                          type: string
                              variant_countries:
                                type: object
                      required:
                        - id
                        - title
                        - description
                        - image_url
                        - status
                        - price
                        - public
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '404':
          description: products not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Products not found
                  errors:
                    type: object
                    description: Hash of field names and error messages
                    example:
                      base:
                        - 'Products not found. external_id: nonexistent-id'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
  /api/company/v1/products/{id}/append_metadata:
    patch:
      summary: Append metadata field
      tags:
        - Products
      operationId: productAppendMetadataField
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: Product's Id or SKU
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    type: object
                    properties:
                      id:
                        type: integer
                      sku:
                        type:
                          - string
                          - 'null'
                      title:
                        type:
                          - string
                          - 'null'
                      description:
                        type:
                          - string
                          - 'null'
                      image_url:
                        type: string
                      status:
                        type: string
                      price:
                        type: string
                      commission:
                        type: string
                      public:
                        type: boolean
                      slug:
                        type: string
                      active:
                        type: boolean
                      introduction:
                        type:
                          - string
                          - 'null'
                      feature_text:
                        type:
                          - string
                          - 'null'
                      stripped:
                        type:
                          - string
                          - 'null'
                      review_count:
                        type: integer
                      show_reviews:
                        type: boolean
                      upc:
                        type:
                          - string
                          - 'null'
                      hs_code:
                        type:
                          - string
                          - 'null'
                      compressed_image_url:
                        type:
                          - string
                          - 'null'
                      image_path:
                        type:
                          - string
                          - 'null'
                      external_url:
                        type:
                          - string
                          - 'null'
                      display_price:
                        type: string
                      subscription_price:
                        type: string
                      tax_inclusive_price:
                        type: string
                      tax_inclusive_wholesale:
                        type: string
                      tax_inclusive_subscription_price:
                        type: string
                      tax_inclusive_wholesale_subscription_price:
                        type: string
                      currency_code:
                        type: string
                      tax_category_id:
                        type: integer
                      tax_category:
                        title: TaxCategory
                        type: object
                        properties:
                          id:
                            type: integer
                          code:
                            example: SV010020
                            type: string
                          title:
                            example: Tangible personal property (tpp)
                            type: string
                        required:
                          - id
                          - code
                          - title
                      international_tax_type:
                        type:
                          - string
                          - 'null'
                      in_stock:
                        type: boolean
                      keep_selling:
                        type: boolean
                      track_quantity:
                        type: boolean
                      no_index:
                        type: boolean
                      publish_to_retail_store:
                        type: boolean
                      publish_to_rep_store:
                        type: boolean
                      publish_to_share_tab:
                        type: boolean
                      affiliate_commission:
                        type:
                          - string
                          - 'null'
                      integration_id:
                        type:
                          - string
                          - 'null'
                      external_id:
                        type:
                          - string
                          - 'null'
                      application_theme_template_id:
                        type:
                          - string
                          - 'null'
                      last_synced_at:
                        type:
                          - string
                          - 'null'
                      updated_at:
                        type:
                          - string
                          - 'null'
                      option_attrs:
                        type: array
                        items:
                          type: string
                      metadata:
                        type: object
                        description: >-
                          A JSON object that can store any custom data
                          structure.
                      product_subscription_plans:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            default:
                              type: boolean
                            products_count:
                              type: integer
                            subscribers_count:
                              type: integer
                            subscription_plan:
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  type: string
                                billing_interval:
                                  type: integer
                                billing_interval_unit:
                                  type: string
                                price_adjustment_amount:
                                  type:
                                    - string
                                    - 'null'
                                price_adjustment_type:
                                  type:
                                    - string
                                    - 'null'
                      product_bundles:
                        type: array
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                            bundled_variant:
                              type: object
                            quantity:
                              type: integer
                            tax_percentage:
                              type: number
                      collections:
                        type: array
                      tags:
                        type: array
                      label:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              background:
                                type: string
                              icon:
                                type: string
                              color:
                                type: string
                      search_engine_optimizer:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              description:
                                type: string
                              image_url:
                                type: string
                              image_path:
                                type: string
                              block_crawler:
                                type: boolean
                      category:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              description:
                                type: string
                              image_url:
                                type: string
                              image_path:
                                type: string
                              position:
                                type: integer
                              public:
                                type: boolean
                      images:
                        type: array
                      options:
                        type: array
                      variants:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            is_master:
                              type: boolean
                            title:
                              type:
                                - string
                                - 'null'
                            image_url:
                              type:
                                - string
                                - 'null'
                            buyable:
                              type: boolean
                            allow_subscription:
                              type: boolean
                            subscription_only:
                              type: boolean
                            shipping_included_in_price:
                              type: boolean
                            images:
                              type: array
                            track_quantity:
                              type: boolean
                            inventory_quantity:
                              type:
                                - 'null'
                                - integer
                            bar_code:
                              type:
                                - string
                                - 'null'
                            limit_subscription:
                              type: boolean
                            subscription_max_qty:
                              type:
                                - 'null'
                                - integer
                            customer_limit:
                              type:
                                - 'null'
                                - integer
                            keep_selling:
                              type: boolean
                            option_attrs:
                              type: array
                              items:
                                type: string
                            inventory_levels:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                  available:
                                    type: integer
                                  committed:
                                    type: integer
                                  on_hand:
                                    type: integer
                                  unavailable:
                                    type: integer
                                  warehouse:
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      name:
                                        type: string
                                      active:
                                        type: boolean
                                      country_iso:
                                        type: string
                            variant_countries:
                              type: object
                    required:
                      - id
                      - title
                      - description
                      - image_url
                      - status
                      - price
                      - public
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - Product not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                metada:
                  type: object
                  description: A JSON object that can store any custom data structure.
                  example:
                    brand: CoffeePro
                    warranty_months: 24
                    features:
                      - built-in-grinder
                      - timer
                      - auto-shutoff
              required:
                - metadata
  /api/company/v1/products/{id}/remove_metadata:
    patch:
      summary: Remove metadata fields
      tags:
        - Products
      operationId: productRemoveMetadataFields
      security:
        - bearer_auth: []
      description: Remove specific metadata fields from a product
      parameters:
        - name: id
          in: path
          required: true
          description: Product's Id or slug
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    type: object
                    properties:
                      id:
                        type: integer
                      sku:
                        type:
                          - string
                          - 'null'
                      title:
                        type:
                          - string
                          - 'null'
                      description:
                        type:
                          - string
                          - 'null'
                      image_url:
                        type: string
                      status:
                        type: string
                      price:
                        type: string
                      commission:
                        type: string
                      public:
                        type: boolean
                      slug:
                        type: string
                      active:
                        type: boolean
                      introduction:
                        type:
                          - string
                          - 'null'
                      feature_text:
                        type:
                          - string
                          - 'null'
                      stripped:
                        type:
                          - string
                          - 'null'
                      review_count:
                        type: integer
                      show_reviews:
                        type: boolean
                      upc:
                        type:
                          - string
                          - 'null'
                      hs_code:
                        type:
                          - string
                          - 'null'
                      compressed_image_url:
                        type:
                          - string
                          - 'null'
                      image_path:
                        type:
                          - string
                          - 'null'
                      external_url:
                        type:
                          - string
                          - 'null'
                      display_price:
                        type: string
                      subscription_price:
                        type: string
                      tax_inclusive_price:
                        type: string
                      tax_inclusive_wholesale:
                        type: string
                      tax_inclusive_subscription_price:
                        type: string
                      tax_inclusive_wholesale_subscription_price:
                        type: string
                      currency_code:
                        type: string
                      tax_category_id:
                        type: integer
                      tax_category:
                        title: TaxCategory
                        type: object
                        properties:
                          id:
                            type: integer
                          code:
                            example: SV010020
                            type: string
                          title:
                            example: Tangible personal property (tpp)
                            type: string
                        required:
                          - id
                          - code
                          - title
                      international_tax_type:
                        type:
                          - string
                          - 'null'
                      in_stock:
                        type: boolean
                      keep_selling:
                        type: boolean
                      track_quantity:
                        type: boolean
                      no_index:
                        type: boolean
                      publish_to_retail_store:
                        type: boolean
                      publish_to_rep_store:
                        type: boolean
                      publish_to_share_tab:
                        type: boolean
                      affiliate_commission:
                        type:
                          - string
                          - 'null'
                      integration_id:
                        type:
                          - string
                          - 'null'
                      external_id:
                        type:
                          - string
                          - 'null'
                      application_theme_template_id:
                        type:
                          - string
                          - 'null'
                      last_synced_at:
                        type:
                          - string
                          - 'null'
                      updated_at:
                        type:
                          - string
                          - 'null'
                      option_attrs:
                        type: array
                        items:
                          type: string
                      metadata:
                        type: object
                        description: >-
                          A JSON object that can store any custom data
                          structure.
                      product_subscription_plans:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            default:
                              type: boolean
                            products_count:
                              type: integer
                            subscribers_count:
                              type: integer
                            subscription_plan:
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  type: string
                                billing_interval:
                                  type: integer
                                billing_interval_unit:
                                  type: string
                                price_adjustment_amount:
                                  type:
                                    - string
                                    - 'null'
                                price_adjustment_type:
                                  type:
                                    - string
                                    - 'null'
                      product_bundles:
                        type: array
                        items:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                            bundled_variant:
                              type: object
                            quantity:
                              type: integer
                            tax_percentage:
                              type: number
                      collections:
                        type: array
                      tags:
                        type: array
                      label:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              background:
                                type: string
                              icon:
                                type: string
                              color:
                                type: string
                      search_engine_optimizer:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              description:
                                type: string
                              image_url:
                                type: string
                              image_path:
                                type: string
                              block_crawler:
                                type: boolean
                      category:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              description:
                                type: string
                              image_url:
                                type: string
                              image_path:
                                type: string
                              position:
                                type: integer
                              public:
                                type: boolean
                      images:
                        type: array
                      options:
                        type: array
                      variants:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            is_master:
                              type: boolean
                            title:
                              type:
                                - string
                                - 'null'
                            image_url:
                              type:
                                - string
                                - 'null'
                            buyable:
                              type: boolean
                            allow_subscription:
                              type: boolean
                            subscription_only:
                              type: boolean
                            shipping_included_in_price:
                              type: boolean
                            images:
                              type: array
                            track_quantity:
                              type: boolean
                            inventory_quantity:
                              type:
                                - 'null'
                                - integer
                            bar_code:
                              type:
                                - string
                                - 'null'
                            limit_subscription:
                              type: boolean
                            subscription_max_qty:
                              type:
                                - 'null'
                                - integer
                            customer_limit:
                              type:
                                - 'null'
                                - integer
                            keep_selling:
                              type: boolean
                            option_attrs:
                              type: array
                              items:
                                type: string
                            inventory_levels:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                  available:
                                    type: integer
                                  committed:
                                    type: integer
                                  on_hand:
                                    type: integer
                                  unavailable:
                                    type: integer
                                  warehouse:
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      name:
                                        type: string
                                      active:
                                        type: boolean
                                      country_iso:
                                        type: string
                            variant_countries:
                              type: object
                    required:
                      - id
                      - title
                      - description
                      - image_url
                      - status
                      - price
                      - public
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: product not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                product:
                  type: object
                  properties:
                    metadata:
                      type: array
                      items:
                        type: string
                      description: Array of metadata field keys to remove
                      example:
                        - brand
                        - warranty_months
                  required:
                    - metadata
              required:
                - product
  /api/company/v1/products/tax_categories:
    get:
      summary: Get tax categories
      tags:
        - Products
      operationId: getProductTaxCategories
      security:
        - bearer_auth: []
      description: Get the tax categories
      parameters:
        - name: parent_id
          in: query
          required: false
          description: Children of this Category id
          schema:
            type: integer
        - name: search
          in: query
          required: false
          description: Search Keyword
          example: 'Tangible personal property '
          schema:
            type: string
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  tax_categories:
                    type: array
                    items:
                      title: TaxCategory
                      type: object
                      properties:
                        id:
                          type: integer
                        code:
                          example: SV010020
                          type: string
                        title:
                          example: Tangible personal property (tpp)
                          type: string
                        has_children:
                          description: >-
                            Indicates whether the tax category has any
                            sub-categories
                          example: true
                          type: boolean
                        selectable:
                          description: >-
                            Indicates whether the tax category can be
                            selected.          Only categories with tax codes
                            are selectable
                          example: true
                          type: boolean
                        parent_id:
                          description: >-
                            ID of the parent tax category, null for root
                            categories
                          example: 123
                          type:
                            - integer
                            - 'null'
                        parent_title:
                          description: >-
                            Title of the parent tax category, null for root
                            categories
                          example: Parent Category
                          type:
                            - string
                            - 'null'
                      required:
                        - id
                        - code
                        - title
                        - has_children
                        - selectable
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
  /api/company/v1/products/international_tax_types:
    get:
      summary: Get international tax types
      tags:
        - Products
      operationId: getInternationalTaxTypes
      security:
        - bearer_auth: []
      description: Get international tax types
      parameters:
        - name: search
          in: query
          required: false
          description: Search Keyword
          example: pharmaceuticals
          schema:
            type: string
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  international_tax_types:
                    type: array
                    items:
                      type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
  /api/company/v1/products/options:
    get:
      summary: Retrieve product options
      tags:
        - Products
      description: >-
        Returns all available product options with their values for the
        authenticated company
      operationId: getProductOptions
      security:
        - bearer_auth: []
      responses:
        '200':
          description: returns a list of product options available
          content:
            application/json:
              schema:
                type: object
                properties:
                  options:
                    type: array
                    items:
                      title: Option
                      type: object
                      properties:
                        id:
                          type: integer
                        title:
                          type: string
                        position:
                          type:
                            - integer
                            - 'null'
                          default: 1
                        presentation:
                          type: string
                        external_id:
                          type:
                            - string
                            - 'null'
                        created_at:
                          type: string
                          format: date-time
                        updated_at:
                          type: string
                          format: date-time
                        option_values:
                          type: array
                          items:
                            title: OptionValue
                            type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              position:
                                type:
                                  - integer
                                  - 'null'
                                default: 1
                              presentation:
                                type:
                                  - string
                                  - 'null'
                              created_at:
                                type: string
                                format: date-time
                              updated_at:
                                type: string
                                format: date-time
                            required:
                              - id
                              - title
                              - created_at
                              - updated_at
                      required:
                        - id
                        - title
                        - presentation
                        - created_at
                        - updated_at
                        - option_values
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - options
                  - meta
  /api/prompts:
    get:
      summary: List all prompts for a relateable object
      description: Get a list of prompts for a specific Page, Medium, Product, or Promotion
      tags:
        - Prompts
      operationId: listPrompts
      security:
        - bearer_auth: []
      parameters:
        - name: relateable_type
          in: query
          required: true
          description: >-
            Type of the relateable object. Can be 'Page', 'Medium', 'Product',
            or 'Promotion'.
          schema:
            type: string
            enum:
              - Page
              - Medium
              - Product
              - Promotion
        - name: relateable_id
          in: query
          required: true
          description: ID of the relateable object
          schema:
            type: integer
        - name: page
          in: query
          schema:
            type: integer
            default: 1
          required: false
          description: Page number for pagination
        - name: per_page
          in: query
          schema:
            type: integer
            default: 20
          required: false
          description: Number of records per page
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  prompts:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                          description: Unique identifier for the prompt
                        title:
                          type: string
                          example: Social Media
                          description: Title of the prompt
                        content:
                          type: string
                          example: Check out this product
                          description: Content of the prompt
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                      total_count:
                        type: integer
                        example: 42
                      total_pages:
                        type: integer
                        example: 3
                      current_page:
                        type: integer
                        example: 1
    post:
      summary: Create a prompt
      description: >-
        Create a new prompt associated with a Page, Medium, Product, or
        Promotion
      tags:
        - Prompts
      operationId: createPrompt
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: prompt created
          content:
            application/json:
              schema:
                type: object
                properties:
                  prompt:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                        description: Unique identifier for the prompt
                      title:
                        type: string
                        example: Social Media
                        description: Title of the prompt
                      content:
                        type: string
                        example: Check out this product
                        description: Content of the prompt
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: relateable not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Resource not found
                    description: Human-readable error message
                  errors:
                    type: object
                    example:
                      id:
                        - Resource not found
                    description: Detailed error information by field
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                description: Error response schema
        '422':
          description: prompts not enabled for page
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Resource not found
                    description: Human-readable error message
                  errors:
                    type: object
                    example:
                      id:
                        - Resource not found
                    description: Detailed error information by field
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                description: Error response schema
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                relateable_type:
                  type: string
                  example: Page
                  description: >-
                    Type of entity this prompt is related to. Can be 'Page',
                    'Medium', 'Product', or 'Promotion'
                  enum:
                    - Page
                    - Medium
                    - Product
                    - Promotion
                relateable_id:
                  type: integer
                  example: 1
                  description: ID of the entity this prompt is related to
                prompt:
                  type: object
                  properties:
                    title:
                      type: string
                      example: Social Media
                      description: Title of the prompt
                    content:
                      type: string
                      example: Check out this product
                      description: Content of the prompt
                  required:
                    - title
                    - content
              required:
                - relateable_type
                - relateable_id
                - prompt
        required: true
        description: >-
          Prompt details with relateable info. A prompt must be associated with
          a Page, Medium, Product, or Promotion.
  /api/prompts/{id}:
    patch:
      summary: Update a prompt
      description: Update an existing prompt's title and content
      tags:
        - Prompts
      operationId: updatePrompt
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: ID of the prompt
          schema:
            type: integer
      responses:
        '200':
          description: prompt updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  prompt:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                        description: Unique identifier for the prompt
                      title:
                        type: string
                        example: Social Media
                        description: Title of the prompt
                      content:
                        type: string
                        example: Check out this product
                        description: Content of the prompt
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: prompt not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Resource not found
                    description: Human-readable error message
                  errors:
                    type: object
                    example:
                      id:
                        - Resource not found
                    description: Detailed error information by field
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                description: Error response schema
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                prompt:
                  type: object
                  properties:
                    title:
                      type: string
                    content:
                      type: string
                  required:
                    - title
                    - content
              required:
                - prompt
        required: true
        description: Prompt details to update
    delete:
      summary: Delete a prompt
      description: Delete an existing prompt
      tags:
        - Prompts
      operationId: deletePrompt
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: ID of the prompt
          schema:
            type: integer
      responses:
        '200':
          description: prompt deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                    description: Indicates whether the operation was successful
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: prompt not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Resource not found
                    description: Human-readable error message
                  errors:
                    type: object
                    example:
                      id:
                        - Resource not found
                    description: Detailed error information by field
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                description: Error response schema
  /api/company:
    post:
      summary: Create a company
      tags:
        - Public Companies
      description: >-
        Create a company, user, and user company. Additional information can be
        added in the onboarding_info field.
      operationId: createCompany
      parameters: []
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  company:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1321
                      name:
                        type: string
                        example: Acme, Inc.
                      subdomain:
                        type: string
                        example: acme
                      fluid_shop:
                        type: string
                        example: acme.fluid.app
                  user_company:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1321
                      email:
                        type: string
                        example: john@fluid.app
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2025-01-28T12:00:00Z'
        '422':
          description: validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unprocessable entity
                  errors:
                    type: object
                    properties:
                      company:
                        type: object
                        properties:
                          name:
                            type: array
                            items:
                              type: string
                              example: is taken
                          subdomain:
                            type: array
                            items:
                              type: string
                              example: is taken
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2025-01-28T12:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                user:
                  type: object
                  properties:
                    first_name:
                      type: string
                      minLength: 1
                    last_name:
                      type: string
                      minLength: 1
                    email:
                      type: string
                      minLength: 1
                    password:
                      type: string
                      minLength: 1
                  required:
                    - first_name
                    - last_name
                    - email
                    - password
                company:
                  type: object
                  properties:
                    name:
                      type: string
                      minLength: 1
                    subdomain:
                      type: string
                      minLength: 1
                    domain:
                      type: string
                      minLength: 1
                    color:
                      type: string
                      minLength: 1
                    onboarding_info:
                      type: object
                      not:
                        type: 'null'
                  required:
                    - name
                    - subdomain
              required:
                - user
                - company
  /api/public/drop_zones:
    get:
      summary: An array of available checkout drop zones (public)
      tags:
        - Public Drop Zones
      operationId: indexPublicDropZones
      parameters:
        - name: fluid_shop
          in: query
          required: true
          description: Company subdomain
          schema:
            type: string
        - name: page
          in: query
          required: false
          schema:
            type: integer
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
      responses:
        '200':
          description: returns a list of checkout drop zones
          content:
            application/json:
              schema:
                type: object
                properties:
                  drop_zones:
                    type: array
                    items:
                      title: DropZone
                      type: object
                      properties:
                        uuid:
                          type: string
                        name:
                          type: string
                        active:
                          type:
                            - boolean
                            - 'null'
                          default: false
                        settings:
                          type:
                            - object
                            - 'null'
                          default: '{}'
                        embed_url:
                          type: string
                      required:
                        - uuid
                        - name
                        - embed_url
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            example: 1
                          total_pages:
                            type: integer
                            example: 10
                          total_count:
                            type: integer
                            example: 100
                          per_page:
                            type: integer
                            example: 10
                required:
                  - drop_zones
                  - meta
        '404':
          description: company not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
                  meta:
                    type: object
                required:
                  - error_message
                  - errors
                  - meta
  /api/v202506/ranks:
    get:
      summary: Lists all ranks for the current company
      tags:
        - Ranks
      operationId: listRanks
      security:
        - bearer_auth: []
      responses:
        '200':
          description: successfully returns list of ranks
          content:
            application/json:
              schema:
                type: object
                properties:
                  ranks:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          type: string
                        external_id:
                          type: string
                        created_at:
                          type: string
                        updated_at:
                          type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
        '401':
          description: unauthorized
    post:
      summary: Creates a rank for a company
      tags:
        - Ranks
      operationId: createRank
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: successfully creates the rank
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  external_id:
                    type: string
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - id
                  - name
                  - external_id
                  - created_at
                  - updated_at
                  - meta
        '400':
          description: rank with external_id already exists
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                external_id:
                  type: string
                name:
                  type: string
              required:
                - external_id
                - name
  /api/v202506/ranks/{id}:
    patch:
      summary: Updates a rank
      tags:
        - Ranks
      operationId: updateRank
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: updates rank with new external_id and name
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  external_id:
                    type: string
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - id
                  - name
                  - external_id
                  - created_at
                  - updated_at
                  - meta
        '401':
          description: unauthorized
        '404':
          description: rank not found
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                external_id:
                  type: string
                name:
                  type: string
              required:
                - external_id
                - name
  /api/redirects:
    get:
      summary: Lists redirects
      tags:
        - Redirects
      operationId: listRedirects
      security:
        - bearer_auth: []
      parameters:
        - name: search_query
          in: query
          required: false
          description: Search by (`path` or `target`)
          schema:
            type: string
        - name: sorted_by
          in: query
          required: false
          description: >-
            Sort by field (`created_at_desc`, `updated_at_desc`, `path_asc`,
            `target_desc`, etc.)
          schema:
            type: string
        - name: page
          in: query
          schema:
            type: integer
            default: 1
          required: false
          description: Page number for pagination
        - name: per_page
          in: query
          schema:
            type: integer
            default: 10
          required: false
          description: Number of records per page
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  redirects:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 101
                        path:
                          type: string
                          example: /old-path-1
                        target:
                          type: string
                          example: https://example.com/new-1
                        domain:
                          oneOf:
                            - type: 'null'
                            - type: object
                              properties:
                                id:
                                  type: integer
                                  example: 201
                                hostname:
                                  type: string
                                  example: http://fluid.lvh.me
                                verification_status:
                                  type: string
                                  example: unknown
                                created_at:
                                  type: string
                                  example: '2024-04-20T12:34:56.000Z'
                                updated_at:
                                  type: string
                                  example: '2024-08-20T12:34:56.000Z'
                        created_at:
                          type: string
                          example: '2024-04-20T12:34:56.000Z'
                        updated_at:
                          type: string
                          example: '2024-08-20T12:34:56.000Z'
                  meta:
                    type: object
                    properties:
                      total_count:
                        type: integer
                        example: 20
                      total_pages:
                        type: integer
                        example: 2
                      current_page:
                        type: integer
                        example: 1
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
    post:
      summary: Create Redirect
      description: Create a new redirect
      tags:
        - Redirects
      operationId: createRedirect
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  redirect:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 101
                      path:
                        type: string
                        example: /old-path
                      target:
                        type: string
                        example: https://example.com/new-path
                      domain:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type: string
                                example: example.com
                      created_at:
                        type: string
                        example: '2024-04-20T12:34:56.000Z'
                      updated_at:
                        type: string
                        example: '2024-08-20T12:34:56.000Z'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Invalid parameters
                  errors:
                    type: object
                    properties:
                      redirect:
                        type: object
                        properties:
                          path:
                            type: array
                            items:
                              type: string
                            example:
                              - must be filled
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                redirect:
                  type: object
                  properties:
                    path:
                      type: string
                      example: /old-path
                    target:
                      type: string
                      example: /home/new-path
                    domain_id:
                      oneOf:
                        - type: 'null'
                        - type: integer
                          example: 1
                      description: >-
                        The ID of the associated domain, or null to remove the
                        association
              required:
                - path
                - target
  /api/redirects/{id}:
    get:
      summary: Retrieves a redirect
      tags:
        - Redirects
      operationId: getRedirect
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  redirect:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 101
                      path:
                        type: string
                        example: /old-path
                      target:
                        type: string
                        example: https://example.com/new-path
                      domain:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type: string
                                example: example.com
                      created_at:
                        type: string
                        example: '2024-04-20T12:34:56.000Z'
                      updated_at:
                        type: string
                        example: '2024-08-20T12:34:56.000Z'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
    put:
      summary: Updates a redirect
      tags:
        - Redirects
      operationId: updateRedirect
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  redirect:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 101
                      path:
                        type: string
                        example: /updated-path
                      target:
                        type: string
                        example: https://example.com/updated
                      domain:
                        oneOf:
                          - type: 'null'
                          - type: object
                            properties:
                              id:
                                type: integer
                                example: 201
                              hostname:
                                type: string
                                example: http://fluid.lvh.me
                              verification_status:
                                type: string
                                example: unknown
                              created_at:
                                type: string
                                example: '2024-04-20T12:34:56.000Z'
                              updated_at:
                                type: string
                                example: '2024-08-20T12:34:56.000Z'
                      created_at:
                        type: string
                        example: '2024-04-20T12:34:56.000Z'
                      updated_at:
                        type: string
                        example: '2024-08-20T12:34:56.000Z'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Redirect not found
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unprocessable entity
                  errors:
                    type: object
                    properties:
                      redirect:
                        type: object
                        properties:
                          target:
                            type: array
                            items:
                              type: string
                            example:
                              - Target can't be blank
                              - >-
                                Target must be either a path starting with / or
                                a valid http(s) URL
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                redirect:
                  type: object
                  properties:
                    path:
                      type: string
                      example: /updated-path
                    target:
                      type: string
                      example: https://example.com/updated-path
                    domain_id:
                      oneOf:
                        - type: 'null'
                        - type: integer
                          example: 1
                      description: >-
                        The ID of the associated domain, or null to remove the
                        association
    delete:
      summary: Deletes a redirect
      tags:
        - Redirects
      operationId: deleteRedirect
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  redirect:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: '101'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Redirect not found
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
  /api/redirects/presigned_csv_url:
    post:
      summary: Generate a signed URL to upload csv for bulk importing redirects
      description: >-
        Generate signed URL to allow users without credentials to perform upload
        (time-limited access to Cloud Storage)
      tags:
        - Redirects
      operationId: getPresignedCsvUrlForRedirectsImport
      security:
        - bearer_auth: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    example: https://path/to/file/sth.csv
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                required:
                  - url
        '400':
          description: error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: fail
                  data:
                    type: object
                    properties:
                      error:
                        type: string
                required:
                  - status
  /api/redirects/import_csv:
    post:
      summary: Import redirects via csv file in the url
      tags:
        - Redirects
      operationId: importRedirectsViaCSV
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  created:
                    type: integer
                    example: 10
                  failed:
                    type: integer
                    example: 2
                  invalid_rows:
                    type: integer
                    example: 1
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                required:
                  - created
                  - failed
                  - invalid_rows
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unprocessable_entity
                  errors:
                    type: object
                    properties:
                      import:
                        type: string
                        example: Bad Request
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                required:
                  - error_message
                  - errors
                  - meta
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  example: https://example.com/path/to/csv
              required:
                - url
  /api/redirects/export_csv:
    post:
      summary: Export redirects data in a CSV file
      description: Export redirects data in a CSV file
      tags:
        - Redirects
      operationId: exportRedirectsinCSV
      security:
        - bearer_auth: []
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    example: https://fake-url.com/file.csv
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                required:
                  - url
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unprocessable_entity
                  errors:
                    type: object
                    properties:
                      export:
                        type: string
                        example: Bad Request
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                required:
                  - error_message
                  - errors
                  - meta
  /api/refunds:
    post:
      summary: Create refund
      tags:
        - Refunds
      operationId: createRefund
      parameters: []
      responses:
        '201':
          description: Refund created
          content:
            application/json:
              schema:
                type: object
                properties:
                  refund:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 100
                      order_id:
                        type: integer
                        example: 1111
                      amount:
                        type:
                          - number
                          - string
                        example: 10.5
                      reason:
                        type: string
                        example: Damaged product
                      refund_type:
                        type: string
                        example: all
                      order:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 123
                          amount:
                            type:
                              - number
                              - string
                            example: 100
                          created_at:
                            type: string
                            example: '2024-01-01T11:50:11'
                          currency_code:
                            type: string
                            example: USD
                          email:
                            type: string
                            example: test@example.com
                          first_name:
                            type: string
                            example: John
                          last_name:
                            type: string
                            example: Doe
                          metadata:
                            type: object
                            example: {}
                          note:
                            type: string
                            example: ''
                          order_number:
                            type: string
                            example: O-1112323
                          token:
                            type: string
                            example: fo_12323
                          order_type:
                            type: string
                            example: purchased
                          phone:
                            type: string
                            example: '11222111'
                          refundable_amount:
                            type:
                              - number
                              - string
                            format: float
                            example: 10.5
                          status:
                            type: string
                            example: awaiting_shipment
                          updated_at:
                            type: string
                            example: 2024-01-02T11:;12:13
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '400':
          description: Unable to create refund
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Unable to create refund.
                  errors:
                    type: object
                    example: {}
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: Order not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Couldn't find Commerce::Order with id 100
                  errors:
                    type: object
                    example:
                      order_id:
                        - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: Refund error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Unable to create refund.
                  errors:
                    type: object
                    example:
                      type:
                        - is missing
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                order_id:
                  type: integer
                  example: 1
                amount:
                  type: number
                  example: 10
                type:
                  type: string
                  example: all
                  enum:
                    - all
                    - tax
                    - shipping
                    - product_price
                    - cv
                    - qv
                shipping:
                  type: number
                  example: 10
                tax:
                  type: number
                  example: 5
                cv:
                  type: number
                  example: 20
                qv:
                  type: number
                  example: 15
                restock_items:
                  type: array
                  items:
                    type: object
                    properties:
                      item_id:
                        type: integer
                        example: 101
                      quantity:
                        type: integer
                        example: 1
                    required:
                      - item_id
                      - quantity
                reason:
                  type: string
                  example: Damaged product
              required:
                - order_id
  /api/refunds/items:
    post:
      summary: Create refund for items
      tags:
        - Refunds
      operationId: createRefundForItems
      parameters: []
      responses:
        '201':
          description: Refund created
          content:
            application/json:
              schema:
                type: object
                properties:
                  refund:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 100
                      order_id:
                        type: integer
                        example: 1111
                      amount:
                        type:
                          - number
                          - string
                        example: 10.5
                      reason:
                        type: string
                        example: Damaged product
                      refund_type:
                        type: string
                        example: all
                      order:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 123
                          amount:
                            type:
                              - number
                              - string
                            example: 100
                          created_at:
                            type: string
                            example: '2024-01-01T11:50:11'
                          currency_code:
                            type: string
                            example: USD
                          email:
                            type: string
                            example: test@example.com
                          first_name:
                            type: string
                            example: John
                          last_name:
                            type: string
                            example: Doe
                          metadata:
                            type: object
                            example: {}
                          note:
                            type: string
                            example: ''
                          order_number:
                            type: string
                            example: O-1112323
                          token:
                            type: string
                            example: fo_12323
                          order_type:
                            type: string
                            example: purchased
                          phone:
                            type: string
                            example: '11222111'
                          refundable_amount:
                            type:
                              - number
                              - string
                            format: float
                            example: 10.5
                          status:
                            type: string
                            example: awaiting_shipment
                          updated_at:
                            type: string
                            example: 2024-01-02T11:;12:13
                      order_item_refunds:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type:
                                - integer
                                - string
                              example: 1
                            item:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 101
                                price:
                                  type:
                                    - number
                                    - string
                                  example: 43.41
                                price_in_currency:
                                  type: string
                                  example: $43.41
                                tax:
                                  type: string
                                  example: '2.99'
                                tax_in_currency:
                                  type: string
                                  example: $2.99
                                cv:
                                  type: integer
                                  example: 5
                                cv_in_currency:
                                  type: string
                                  example: $5.00
                                qv:
                                  type: integer
                                  example: 7
                                qv_in_currency:
                                  type: string
                                  example: $7.00
                                product_title:
                                  type: string
                                  example: Sample Product
                                variant_title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Sample Variant
                                variant_image:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/image.png
                                variant_id:
                                  type: integer
                                  example: 202
                                quantity:
                                  type: integer
                                  example: 3
                                title:
                                  type: string
                                total:
                                  type:
                                    - number
                                    - string
                                image_url:
                                  type:
                                    - string
                                    - 'null'
                                sku:
                                  type:
                                    - string
                                    - 'null'
                                display_price:
                                  type: string
                                display_total:
                                  type: string
                                refundable_amount:
                                  type:
                                    - number
                                    - string
                                  format: float
                                  example: 10.5
                                enrollment_pack_id:
                                  type:
                                    - integer
                                    - 'null'
                                display_to_customer:
                                  type:
                                    - boolean
                                    - 'null'
                                  example: true
                                ordered_variant:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      option_type:
                                        type: string
                                      value:
                                        type: string
                                product:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type: string
                                      example: Sample Product
                                    cv:
                                      type: integer
                                      example: 10
                                    cv_in_currency:
                                      type: string
                                      example: $10.00
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/product.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/product.png
                                    price:
                                      type: string
                                      example: '29.99'
                                    price_in_currency:
                                      type: string
                                      example: $29.99
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    tax:
                                      type: string
                                      example: '2.99'
                                    tax_in_currency:
                                      type: string
                                      example: $2.99
                                variant:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: Sample Variant
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/sample.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/sample.png
                                    primary_image:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/primary.png
                                    price:
                                      type:
                                        - string
                                        - 'null'
                                      example: '34.44'
                                    price_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $34.44
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    options:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          title:
                                            type: string
                                            example: Size
                                          value:
                                            type: string
                                            example: XL
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '400':
          description: Unable to create refund
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Unable to create refund.
                  errors:
                    type: object
                    example: {}
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: Order not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Couldn't find Commerce::Order with id 100
                  errors:
                    type: object
                    example:
                      order_id:
                        - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: Refund error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Unable to create refund.
                  errors:
                    type: object
                    example:
                      order_items:
                        - can't be blank
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                order_id:
                  type: integer
                  example: 1
                order_items:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 101
                      amount:
                        type: number
                        example: 100.5
                      quantity:
                        type: integer
                        example: 2
                      cv:
                        type: integer
                        example: 10
                      qv:
                        type: integer
                        example: 10
                    required:
                      - id
                reason:
                  type: string
                  example: Damaged product
              required:
                - order_id
                - order_items
  /api/v2/reps:
    get:
      summary: List all reps
      tags:
        - Reps
      security:
        - bearer_auth: []
      parameters:
        - name: pagination
          in: query
          schema:
            type: object
            properties:
              page:
                type: integer
                exclusiveMinimum: 0
              per_page:
                type: integer
                exclusiveMinimum: 0
                maximum: 100
              search_query:
                type: string
              sorted_by:
                type: string
              active:
                type: boolean
            required: []
      responses:
        '200':
          description: reps found
          content:
            application/json:
              schema:
                type: object
                properties:
                  reps:
                    type: array
                    items:
                      title: UserCompany
                      type: object
                      properties:
                        id:
                          type: integer
                        active:
                          type:
                            - boolean
                            - 'null'
                          default: true
                        external_id:
                          type:
                            - string
                            - 'null'
                        username:
                          type:
                            - string
                            - 'null'
                        first_name:
                          type: string
                        last_name:
                          type: string
                        created_at:
                          type: string
                          format: date-time
                        image_url:
                          type:
                            - string
                            - 'null'
                        roles:
                          type:
                            - string
                            - 'null'
                          default: user
                        share_guid:
                          type: string
                          pattern: \A[a-z0-9\-_]+\z
                          minLength: 2
                        computed_full_name:
                          type:
                            - string
                            - 'null'
                        computed_email:
                          type:
                            - string
                            - 'null'
                        phone:
                          type:
                            - string
                            - 'null'
                      required:
                        - id
                        - first_name
                        - last_name
                        - created_at
                        - share_guid
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            example: 1
                          total_pages:
                            type: integer
                            example: 10
                          total_count:
                            type: integer
                            example: 100
                          per_page:
                            type: integer
                            example: 10
                required:
                  - reps
                  - meta
    post:
      summary: Create a rep
      tags:
        - Reps
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: rep created with custom share_guid
          content:
            application/json:
              schema:
                type: object
                properties:
                  rep:
                    title: UserCompany
                    type: object
                    properties:
                      id:
                        type: integer
                      active:
                        type:
                          - boolean
                          - 'null'
                        default: true
                      external_id:
                        type:
                          - string
                          - 'null'
                      username:
                        type:
                          - string
                          - 'null'
                      first_name:
                        type: string
                      last_name:
                        type: string
                      created_at:
                        type: string
                        format: date-time
                      image_url:
                        type:
                          - string
                          - 'null'
                      roles:
                        type:
                          - string
                          - 'null'
                        default: user
                      share_guid:
                        type: string
                        pattern: \A[a-z0-9\-_]+\z
                        minLength: 2
                      computed_full_name:
                        type:
                          - string
                          - 'null'
                      computed_email:
                        type:
                          - string
                          - 'null'
                      phone:
                        type:
                          - string
                          - 'null'
                    required:
                      - id
                      - first_name
                      - last_name
                      - created_at
                      - share_guid
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - rep
                  - meta
        '422':
          description: invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                rep:
                  type: object
                  properties:
                    first_name:
                      type:
                        - 'null'
                        - string
                    last_name:
                      type:
                        - 'null'
                        - string
                    email:
                      type:
                        - 'null'
                        - string
                    phone:
                      type:
                        - 'null'
                        - string
                    active:
                      type:
                        - 'null'
                        - boolean
                    external_id:
                      type:
                        - 'null'
                        - string
                    username:
                      type:
                        - 'null'
                        - string
                    share_guid:
                      type:
                        - 'null'
                        - string
                  required:
                    - email
              required:
                - rep
  /api/v2/reps/{id}:
    get:
      summary: Retrieve a rep
      tags:
        - Reps
      security:
        - bearer_auth: []
      responses:
        '200':
          description: rep found
          content:
            application/json:
              schema:
                type: object
                properties:
                  rep:
                    title: UserCompany
                    type: object
                    properties:
                      id:
                        type: integer
                      active:
                        type:
                          - boolean
                          - 'null'
                        default: true
                      external_id:
                        type:
                          - string
                          - 'null'
                      username:
                        type:
                          - string
                          - 'null'
                      first_name:
                        type: string
                      last_name:
                        type: string
                      created_at:
                        type: string
                        format: date-time
                      image_url:
                        type:
                          - string
                          - 'null'
                      roles:
                        type:
                          - string
                          - 'null'
                        default: user
                      share_guid:
                        type: string
                        pattern: \A[a-z0-9\-_]+\z
                        minLength: 2
                      computed_full_name:
                        type:
                          - string
                          - 'null'
                      computed_email:
                        type:
                          - string
                          - 'null'
                      phone:
                        type:
                          - string
                          - 'null'
                    required:
                      - id
                      - first_name
                      - last_name
                      - created_at
                      - share_guid
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - rep
                  - meta
        '404':
          description: rep not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
    patch:
      summary: Update a rep
      tags:
        - Reps
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: rep updated with empty string fields filtered
          content:
            application/json:
              schema:
                type: object
                properties:
                  rep:
                    title: UserCompany
                    type: object
                    properties:
                      id:
                        type: integer
                      active:
                        type:
                          - boolean
                          - 'null'
                        default: true
                      external_id:
                        type:
                          - string
                          - 'null'
                      username:
                        type:
                          - string
                          - 'null'
                      first_name:
                        type: string
                      last_name:
                        type: string
                      created_at:
                        type: string
                        format: date-time
                      image_url:
                        type:
                          - string
                          - 'null'
                      roles:
                        type:
                          - string
                          - 'null'
                        default: user
                      share_guid:
                        type: string
                        pattern: \A[a-z0-9\-_]+\z
                        minLength: 2
                      computed_full_name:
                        type:
                          - string
                          - 'null'
                      computed_email:
                        type:
                          - string
                          - 'null'
                      phone:
                        type:
                          - string
                          - 'null'
                    required:
                      - id
                      - first_name
                      - last_name
                      - created_at
                      - share_guid
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - rep
                  - meta
        '404':
          description: rep not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                rep:
                  type: object
                  properties:
                    first_name:
                      type:
                        - 'null'
                        - string
                    last_name:
                      type:
                        - 'null'
                        - string
                    email:
                      type:
                        - 'null'
                        - string
                    phone:
                      type:
                        - 'null'
                        - string
                    active:
                      type:
                        - 'null'
                        - boolean
                    external_id:
                      type:
                        - 'null'
                        - string
                    username:
                      type:
                        - 'null'
                        - string
                    share_guid:
                      type:
                        - 'null'
                        - string
                  required: []
              required:
                - id
                - rep
    delete:
      summary: Delete a rep
      tags:
        - Reps
      security:
        - bearer_auth: []
      responses:
        '200':
          description: rep deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - id
                  - meta
        '404':
          description: rep not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
  /api/company/roles:
    get:
      summary: Lists roles for a company
      tags:
        - Roles
      security:
        - bearer_auth: []
      parameters:
        - name: page
          in: query
          required: false
          description: Page number for pagination
          schema:
            type: integer
        - name: per_page
          in: query
          required: false
          description: Number of items per page (max 25)
          schema:
            type: integer
        - name: sorted_by
          in: query
          required: false
          description: >-
            Sort field and direction (e.g., 'name_asc', 'created_at_desc',
            'users_asc', 'permissions_desc')
          schema:
            type: string
        - name: search_query
          in: query
          required: false
          description: Search term to filter roles by name
          schema:
            type: string
        - name: max_user_count
          in: query
          required: false
          description: Maximum number of users assigned to roles (inclusive)
          schema:
            type: integer
        - name: min_user_count
          in: query
          required: false
          description: Minimum number of users assigned to roles (inclusive)
          schema:
            type: integer
      responses:
        '200':
          description: returns roles successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  roles:
                    type: array
                    description: List of roles
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          type: string
                        createdAt:
                          type: string
                          format: date-time
                        user_count:
                          type: integer
                        permissions:
                          type: object
                          additionalProperties: true
                      required:
                        - id
                        - name
                      additionalProperties: true
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                          total_pages:
                            type: integer
                          total_count:
                            type: integer
                          per_page:
                            type: integer
                      count:
                        type: integer
                    required:
                      - request_id
                      - timestamp
                    additionalProperties: true
                required:
                  - roles
                  - meta
        '403':
          description: returns forbidden for users without role view permissions
    post:
      summary: Creates a new role for a company
      tags:
        - Roles
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: role created successfully
        '401':
          description: unauthorized when token is invalid
        '403':
          description: forbidden when user lacks required permissions
        '422':
          description: unprocessable entity when validation fails
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                role:
                  type: object
                  properties:
                    name:
                      type: string
                    permissions:
                      type: object
                      additionalProperties: true
                  required:
                    - name
              required:
                - role
  /api/company/roles/{id}:
    put:
      summary: Updates a role
      tags:
        - Roles
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successfully updates role permissions
        '401':
          description: unauthorized when token is invalid
        '403':
          description: forbidden when user lacks required permissions
        '404':
          description: role not found
        '422':
          description: unprocessable entity when validation fails
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                role:
                  type: object
                  properties:
                    permissions:
                      type: object
                      additionalProperties: true
    delete:
      summary: Deletes a role
      tags:
        - Roles
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: role successfully deleted
        '401':
          description: unauthorized when token is invalid
        '403':
          description: cannot delete role
        '404':
          description: role not found
        '422':
          description: unprocessable entity when deletion fails
  /api/company/roles/structure:
    get:
      summary: Get roles structure for the company
      tags:
        - Roles
      security:
        - bearer_auth: []
      operationId: getRolesStructure
      description: >-
        Get the structure of roles including available actions and categories
        for permission management
      responses:
        '200':
          description: structure retrieved successfully for admin user
          content:
            application/json:
              schema:
                type: object
                properties:
                  headers:
                    type: array
                    items:
                      type: string
                  categories:
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                        label:
                          type: string
                        resources:
                          type: array
                          items:
                            type: object
                            properties:
                              key:
                                type: string
                              label:
                                type: string
                              actions:
                                type: array
                                items:
                                  type: string
                            required:
                              - key
                              - label
                              - actions
                      required:
                        - key
                        - label
                        - resources
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                required:
                  - headers
                  - categories
        '401':
          description: unauthorized when token is invalid
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '403':
          description: forbidden when role permission isn't granted
  /api/company/roles/{id}/duplicate:
    post:
      summary: Duplicates a role
      tags:
        - Roles
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '201':
          description: role duplicated successfully
        '401':
          description: unauthorized when token is invalid
        '403':
          description: forbidden when user lacks required permissions
        '404':
          description: role not found
        '422':
          description: unprocessable entity when duplication fails
  /api/company/roles/my_permissions:
    get:
      summary: Get current user's permissions
      tags:
        - Roles
      security:
        - bearer_auth: []
      operationId: getMyPermissions
      description: Get the current user's permissions and roles for the current company
      responses:
        '200':
          description: boolean type casting works correctly for permission values
          content:
            application/json:
              schema:
                type: object
                properties:
                  permissions:
                    type: object
                    additionalProperties: true
                    description: Hash of resource permissions with their actions
                    example:
                      roles:
                        create: true
                        view: true
                        update: true
                        delete: true
                  roles:
                    type: array
                    items:
                      type: string
                    description: List of role names assigned to the user
                    example:
                      - admin
                      - developer
                  is_super_admin:
                    type: boolean
                    description: Whether the user is a super admin
                  meta:
                    type: object
                    description: Metadata about the request
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                required:
                  - permissions
                  - roles
                  - is_super_admin
                  - meta
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
  /api/settings/brand_guidelines:
    get:
      summary: Show brand guidelines settings
      tags:
        - Settings
      operationId: getBrandGuidelines
      security:
        - bearer_auth: []
      responses:
        '200':
          description: Brand guidelines settings found
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    example: Acme, Inc.
                    type: string
                  logo_url:
                    example: https://acme.com/logo.png
                    type:
                      - string
                      - 'null'
                  icon_url:
                    example: https://acme.com/icon.png
                    type:
                      - string
                      - 'null'
                  favicon_url:
                    example: https://acme.com/favicon.ico
                    type:
                      - string
                      - 'null'
                  color:
                    example: '#000000'
                    type:
                      - string
                      - 'null'
                  secondary_color:
                    example: '#666666'
                    type:
                      - string
                      - 'null'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - id
                  - meta
    patch:
      summary: Update brand guidelines settings with null values (clear operation)
      tags:
        - Settings
      operationId: clearBrandGuidelines
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: Brand guidelines settings updated with null values (clear operation)
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    example: Acme, Inc.
                    type: string
                  logo_url:
                    example: https://acme.com/logo.png
                    type:
                      - string
                      - 'null'
                  icon_url:
                    example: https://acme.com/icon.png
                    type:
                      - string
                      - 'null'
                  favicon_url:
                    example: https://acme.com/favicon.ico
                    type:
                      - string
                      - 'null'
                  color:
                    example: '#000000'
                    type:
                      - string
                      - 'null'
                  secondary_color:
                    example: '#666666'
                    type:
                      - string
                      - 'null'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - id
                  - meta
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                brand_guidelines:
                  type: object
                  properties:
                    id:
                      type:
                        - integer
                        - 'null'
                    name:
                      example: Acme, Inc.
                      type:
                        - string
                        - 'null'
                    logo_url:
                      example: https://acme.com/logo.png
                      type:
                        - string
                        - 'null'
                    icon_url:
                      example: https://acme.com/icon.png
                      type:
                        - string
                        - 'null'
                    favicon_url:
                      example: https://acme.com/favicon.ico
                      type:
                        - string
                        - 'null'
                    color:
                      example: '#000000'
                      type:
                        - string
                        - 'null'
                    secondary_color:
                      example: '#666666'
                      type:
                        - string
                        - 'null'
              required:
                - brand_guidelines
  /api/company/shares:
    get:
      summary: Get shares
      tags:
        - Shares
      security:
        - bearer_auth: []
      parameters:
        - name: start_date
          in: query
          required: false
          description: 'Filter shares by start date (format: YYYY-MM-DD)'
          schema:
            type: string
        - name: end_date
          in: query
          required: false
          description: 'Filter shares by end date (format: YYYY-MM-DD)'
          schema:
            type: string
        - name: page
          in: query
          schema:
            type: integer
            default: 1
          required: false
          description: Page number for pagination
        - name: per_page
          in: query
          schema:
            type: integer
            default: 20
          required: false
          description: 'Number of records per page (max: 1000)'
      responses:
        '200':
          description: shares found
          content:
            application/json:
              schema:
                type: object
                properties:
                  shares:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        views:
                          type: integer
                        email:
                          type: string
                        share_type:
                          type: string
                        shareable_type:
                          type: string
                        shareable_id:
                          type: integer
                        shareable:
                          type: object
                          properties:
                            id:
                              type: integer
                          additionalProperties: true
                        created_at:
                          type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                          next_page:
                            type:
                              - integer
                              - 'null'
                          prev_page:
                            type:
                              - integer
                              - 'null'
                          total_pages:
                            type: integer
                          total_count:
                            type: integer
                          per_page:
                            type: integer
        '422':
          description: invalid per_page
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
  /api/shares:
    get:
      summary: List Shares
      description: Get all shares with pagination
      tags:
        - Shares
      security:
        - bearer_auth: []
      parameters:
        - name: start_date
          in: query
          required: false
          description: 'Filter shares by start date (format: YYYY-MM-DD)'
          schema:
            type: string
        - name: end_date
          in: query
          required: false
          description: 'Filter shares by end date (format: YYYY-MM-DD)'
          schema:
            type: string
        - name: page
          in: query
          schema:
            type: integer
            default: 1
          required: false
          description: Page number for pagination
        - name: per_page
          in: query
          schema:
            type: integer
            default: 20
          required: false
          description: 'Number of records per page (max: 1000)'
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  shares:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        views:
                          type: integer
                        created_at:
                          type: string
                          format: date_time
                        email:
                          type: string
                        share_type:
                          type: string
                        shareable_type:
                          type: string
                        shareable_id:
                          type: integer
                        shareable:
                          type:
                            - object
                            - 'null'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                          next_page:
                            type:
                              - integer
                              - 'null'
                          prev_page:
                            type:
                              - integer
                              - 'null'
                          total_pages:
                            type: integer
                          total_count:
                            type: integer
                          per_page:
                            type: integer
        '422':
          description: invalid per_page
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
  /api/v2/subscription_orders:
    get:
      summary: List Subscription Orders
      description: Get all subscription orders with optional filters
      tags:
        - Subscription Orders
      operationId: listSubscriptionOrders
      security:
        - bearer_auth: []
      parameters:
        - name: customer_id
          in: query
          required: false
          description: Filter subscription orders by customer_id
          schema:
            type: integer
        - name: buyer_id
          in: query
          required: false
          description: Filter subscription orders by buyer_id
          schema:
            type: integer
        - name: user_company_id
          in: query
          required: false
          description: Filter subscription orders by user_company_id
          schema:
            type: integer
        - name: ship_to_country_id
          in: query
          required: false
          description: Filter subscription orders by shipping address' country
          schema:
            type: string
        - name: next_bill_date_start_date
          in: query
          required: false
          description: Filter subscription orders by start_date of next_bill_date
          schema:
            type: string
        - name: next_bill_date_end_date
          in: query
          required: false
          description: Filter subscription orders by end_date of next_bill_date
          schema:
            type: string
        - name: page
          in: query
          schema:
            type: integer
            default: 1
          required: false
          description: Page number for pagination
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscription_orders:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        amount:
                          type:
                            - number
                            - string
                        display_amount:
                          type: string
                        subtotal:
                          type:
                            - number
                            - string
                        display_subtotal:
                          type: string
                        tax:
                          type:
                            - number
                            - string
                        display_tax:
                          type: string
                        discount:
                          type:
                            - number
                            - string
                        display_discount:
                          type: string
                        shipping:
                          type:
                            - number
                            - string
                        display_shipping:
                          type: string
                        total:
                          type:
                            - number
                            - string
                        display_total:
                          type: string
                        created_at:
                          type: string
                        updated_at:
                          type: string
                        bill_date:
                          type: string
                        next_bill_date:
                          type: string
                        days_until_next_bill_date:
                          type: integer
                        status:
                          type: string
                        subscription_interval:
                          type: integer
                          description: Subscription interval in months
                        cancellation_reason:
                          type:
                            - string
                            - 'null'
                        additional_feedback:
                          type:
                            - string
                            - 'null'
                        bill_to:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type:
                                - string
                                - 'null'
                              example: John Doe
                            first_name:
                              type:
                                - string
                                - 'null'
                              example: John
                            last_name:
                              type:
                                - string
                                - 'null'
                              example: Doe
                            address1:
                              type: string
                              example: 123 Main St
                            address2:
                              type:
                                - string
                                - 'null'
                              example: Apt 4B
                            address3:
                              type:
                                - string
                                - 'null'
                              example: Building 5
                            city:
                              type: string
                              example: New York
                            state:
                              type: string
                              example: NY
                            postal_code:
                              type: string
                              example: '10001'
                            country_code:
                              type: string
                              example: US
                            subdivision_code:
                              type:
                                - string
                                - 'null'
                              example: NY
                            default:
                              type: boolean
                              example: true
                        ship_to:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            name:
                              type:
                                - string
                                - 'null'
                              example: John Doe
                            first_name:
                              type:
                                - string
                                - 'null'
                              example: John
                            last_name:
                              type:
                                - string
                                - 'null'
                              example: Doe
                            address1:
                              type: string
                              example: 123 Main St
                            address2:
                              type:
                                - string
                                - 'null'
                              example: Apt 4B
                            address3:
                              type:
                                - string
                                - 'null'
                              example: Building 5
                            city:
                              type: string
                              example: New York
                            state:
                              type: string
                              example: NY
                            postal_code:
                              type: string
                              example: '10001'
                            country_code:
                              type: string
                              example: US
                            subdivision_code:
                              type:
                                - string
                                - 'null'
                              example: NY
                            default:
                              type: boolean
                              example: true
                        order_thumbnail:
                          type:
                            - string
                            - 'null'
                        customer:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                            user_company_id:
                              type:
                                - integer
                                - 'null'
                            account_id:
                              type: string
                            first_name:
                              type: string
                            last_name:
                              type: string
                            full_name:
                              type: string
                            email:
                              type: string
                            verified_email:
                              type: boolean
                            phone:
                              type: string
                            orders_count:
                              type: integer
                            total_spent:
                              type:
                                - number
                                - string
                            display_total_spent:
                              type: string
                            last_order_id:
                              type:
                                - integer
                                - 'null'
                            metadata:
                              type: object
                              example:
                                performance:
                                  on_time_rate: 0.98
                                  customer_rating: 4.9
                                  issues: 0
                            default_address:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                name:
                                  type:
                                    - string
                                    - 'null'
                                  example: John Doe
                                first_name:
                                  type:
                                    - string
                                    - 'null'
                                  example: John
                                last_name:
                                  type:
                                    - string
                                    - 'null'
                                  example: Doe
                                address1:
                                  type: string
                                  example: 123 Main St
                                address2:
                                  type:
                                    - string
                                    - 'null'
                                  example: Apt 4B
                                address3:
                                  type:
                                    - string
                                    - 'null'
                                  example: Building 5
                                city:
                                  type: string
                                  example: New York
                                state:
                                  type: string
                                  example: NY
                                postal_code:
                                  type: string
                                  example: '10001'
                                country_code:
                                  type: string
                                  example: US
                                subdivision_code:
                                  type:
                                    - string
                                    - 'null'
                                  example: NY
                                default:
                                  type: boolean
                                  example: true
                            addresses:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 1
                                  name:
                                    type:
                                      - string
                                      - 'null'
                                    example: John Doe
                                  first_name:
                                    type:
                                      - string
                                      - 'null'
                                    example: John
                                  last_name:
                                    type:
                                      - string
                                      - 'null'
                                    example: Doe
                                  address1:
                                    type: string
                                    example: 123 Main St
                                  address2:
                                    type:
                                      - string
                                      - 'null'
                                    example: Apt 4B
                                  address3:
                                    type:
                                      - string
                                      - 'null'
                                    example: Building 5
                                  city:
                                    type: string
                                    example: New York
                                  state:
                                    type: string
                                    example: NY
                                  postal_code:
                                    type: string
                                    example: '10001'
                                  country_code:
                                    type: string
                                    example: US
                                  subdivision_code:
                                    type:
                                      - string
                                      - 'null'
                                    example: NY
                                  default:
                                    type: boolean
                                    example: true
                            notes:
                              type:
                                - string
                                - 'null'
                            created_at:
                              type: string
                            active_subscriptions_count:
                              type: integer
                            inactive_subscriptions_count:
                              type: integer
                            active:
                              type: boolean
                            is_rep:
                              type: boolean
                            external_id:
                              type:
                                - string
                                - 'null'
                            customer_notes:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                  customer_id:
                                    type: integer
                                  user_company_id:
                                    type:
                                      - integer
                                      - 'null'
                                  note:
                                    type: string
                                  created_at:
                                    type: string
                                  resource_id:
                                    type: integer
                                  resource_type:
                                    type: string
                        user:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                            first_name:
                              type: string
                            last_name:
                              type: string
                            image_url:
                              type:
                                - string
                                - 'null'
                        buyer:
                          type:
                            - object
                            - 'null'
                          properties:
                            id:
                              type: integer
                            first_name:
                              type: string
                            last_name:
                              type: string
                            image_url:
                              type:
                                - string
                                - 'null'
                        payment_method:
                          anyOf:
                            - type: object
                              properties:
                                id:
                                  type: integer
                                company_id:
                                  type: integer
                                user_id:
                                  type: integer
                                source:
                                  type: string
                                payload:
                                  type: object
                                created_at:
                                  type: string
                                updated_at:
                                  type: string
                            - type: array
                              items:
                                type: string
                                description: Error messages
                            - type: 'null'
                        items:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              product:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 1
                                  title:
                                    type: string
                                    example: Sample Product
                                  cv:
                                    type: integer
                                    example: 10
                                  cv_in_currency:
                                    type: string
                                    example: $10.00
                                  image_path:
                                    type:
                                      - string
                                      - 'null'
                                    example: /images/product.png
                                  image_url:
                                    type:
                                      - string
                                      - 'null'
                                    example: https://example.com/images/product.png
                                  price:
                                    type: string
                                    example: '29.99'
                                  price_in_currency:
                                    type: string
                                    example: $29.99
                                  sku:
                                    type:
                                      - string
                                      - 'null'
                                    example: SKU12345
                                  tax:
                                    type: string
                                    example: '2.99'
                                  tax_in_currency:
                                    type: string
                                    example: $2.99
                              variant:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 1
                                  title:
                                    type:
                                      - string
                                      - 'null'
                                    example: Sample Variant
                                  image_path:
                                    type:
                                      - string
                                      - 'null'
                                    example: /images/sample.png
                                  image_url:
                                    type:
                                      - string
                                      - 'null'
                                    example: https://example.com/images/sample.png
                                  primary_image:
                                    type:
                                      - string
                                      - 'null'
                                    example: https://example.com/images/primary.png
                                  price:
                                    type:
                                      - string
                                      - 'null'
                                    example: '34.44'
                                  price_in_currency:
                                    type:
                                      - string
                                      - 'null'
                                    example: $34.44
                                  sku:
                                    type:
                                      - string
                                      - 'null'
                                    example: SKU12345
                                  options:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        title:
                                          type: string
                                          example: Size
                                        value:
                                          type: string
                                          example: XL
                        activities:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                              slug:
                                type: string
                              title:
                                type: string
                              description:
                                type: string
                              user:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                  name:
                                    type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                      total_count:
                        type: integer
                        example: 42
                      total_pages:
                        type: integer
                        example: 3
                      current_page:
                        type: integer
                        example: 1
  /api/v2/subscription_orders/{id}:
    get:
      summary: Retrieve a Subscription Order
      description: Retrieve a single subscription order by ID
      tags:
        - Subscription Orders
      operationId: getSubscriptionOrder
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          description: ID of the subscription order
          schema:
            type: string
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscription_order:
                    type: object
                    properties:
                      id:
                        type: integer
                      order_number:
                        type: string
                      amount:
                        type:
                          - number
                          - string
                      display_amount:
                        type: string
                      subtotal:
                        type:
                          - number
                          - string
                      display_subtotal:
                        type: string
                      tax:
                        type:
                          - number
                          - string
                      display_tax:
                        type: string
                      discount:
                        type:
                          - number
                          - string
                      display_discount:
                        type: string
                      shipping:
                        type:
                          - number
                          - string
                      display_shipping:
                        type: string
                      total:
                        type:
                          - number
                          - string
                      display_total:
                        type: string
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      bill_date:
                        type: string
                      next_bill_date:
                        type: string
                      days_until_next_bill_date:
                        type: integer
                      status:
                        type: string
                      subscription_interval:
                        type: integer
                        description: Subscription interval in months
                      cancellation_reason:
                        type:
                          - string
                          - 'null'
                      additional_feedback:
                        type:
                          - string
                          - 'null'
                      bill_to:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      ship_to:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      order_thumbnail:
                        type:
                          - string
                          - 'null'
                      customer:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          account_id:
                            type: string
                          first_name:
                            type: string
                          last_name:
                            type: string
                          full_name:
                            type: string
                          email:
                            type: string
                          verified_email:
                            type: boolean
                          phone:
                            type: string
                          orders_count:
                            type: integer
                          total_spent:
                            type:
                              - number
                              - string
                          display_total_spent:
                            type: string
                          last_order_id:
                            type:
                              - integer
                              - 'null'
                          metadata:
                            type: object
                            example:
                              performance:
                                on_time_rate: 0.98
                                customer_rating: 4.9
                                issues: 0
                          default_address:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          addresses:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                name:
                                  type:
                                    - string
                                    - 'null'
                                  example: John Doe
                                first_name:
                                  type:
                                    - string
                                    - 'null'
                                  example: John
                                last_name:
                                  type:
                                    - string
                                    - 'null'
                                  example: Doe
                                address1:
                                  type: string
                                  example: 123 Main St
                                address2:
                                  type:
                                    - string
                                    - 'null'
                                  example: Apt 4B
                                address3:
                                  type:
                                    - string
                                    - 'null'
                                  example: Building 5
                                city:
                                  type: string
                                  example: New York
                                state:
                                  type: string
                                  example: NY
                                postal_code:
                                  type: string
                                  example: '10001'
                                country_code:
                                  type: string
                                  example: US
                                subdivision_code:
                                  type:
                                    - string
                                    - 'null'
                                  example: NY
                                default:
                                  type: boolean
                                  example: true
                          notes:
                            type:
                              - string
                              - 'null'
                          created_at:
                            type: string
                          active_subscriptions_count:
                            type: integer
                          inactive_subscriptions_count:
                            type: integer
                          active:
                            type: boolean
                          is_rep:
                            type: boolean
                          external_id:
                            type:
                              - string
                              - 'null'
                          customer_notes:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                customer_id:
                                  type: integer
                                user_company_id:
                                  type:
                                    - integer
                                    - 'null'
                                note:
                                  type: string
                                created_at:
                                  type: string
                                resource_id:
                                  type: integer
                                resource_type:
                                  type: string
                      user:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          first_name:
                            type: string
                          last_name:
                            type: string
                          image_url:
                            type:
                              - string
                              - 'null'
                      buyer:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          first_name:
                            type: string
                          last_name:
                            type: string
                          image_url:
                            type:
                              - string
                              - 'null'
                      payment_method:
                        anyOf:
                          - type: object
                            properties:
                              id:
                                type: integer
                              company_id:
                                type: integer
                              user_id:
                                type: integer
                              source:
                                type: string
                              payload:
                                type: object
                              created_at:
                                type: string
                              updated_at:
                                type: string
                          - type: array
                            items:
                              type: string
                              description: Error messages
                          - type: 'null'
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 101
                            price:
                              type:
                                - number
                                - string
                              example: 43.41
                            price_in_currency:
                              type: string
                              example: $43.41
                            tax:
                              type: string
                              example: '2.99'
                            tax_in_currency:
                              type: string
                              example: $2.99
                            cv:
                              type: integer
                              example: 5
                            cv_in_currency:
                              type: string
                              example: $5.00
                            qv:
                              type: integer
                              example: 7
                            qv_in_currency:
                              type: string
                              example: $7.00
                            product_title:
                              type: string
                              example: Sample Product
                            variant_title:
                              type:
                                - string
                                - 'null'
                              example: Sample Variant
                            variant_image:
                              type:
                                - string
                                - 'null'
                              example: https://example.com/image.png
                            variant_id:
                              type: integer
                              example: 202
                            quantity:
                              type: integer
                              example: 3
                            title:
                              type: string
                            total:
                              type:
                                - number
                                - string
                            image_url:
                              type:
                                - string
                                - 'null'
                            sku:
                              type:
                                - string
                                - 'null'
                            display_price:
                              type: string
                            display_total:
                              type: string
                            refundable_amount:
                              type:
                                - number
                                - string
                              format: float
                              example: 10.5
                            enrollment_pack_id:
                              type:
                                - integer
                                - 'null'
                            display_to_customer:
                              type:
                                - boolean
                                - 'null'
                              example: true
                            ordered_variant:
                              type: array
                              items:
                                type: object
                                properties:
                                  option_type:
                                    type: string
                                  value:
                                    type: string
                            product:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type: string
                                  example: Sample Product
                                cv:
                                  type: integer
                                  example: 10
                                cv_in_currency:
                                  type: string
                                  example: $10.00
                                image_path:
                                  type:
                                    - string
                                    - 'null'
                                  example: /images/product.png
                                image_url:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/product.png
                                price:
                                  type: string
                                  example: '29.99'
                                price_in_currency:
                                  type: string
                                  example: $29.99
                                sku:
                                  type:
                                    - string
                                    - 'null'
                                  example: SKU12345
                                tax:
                                  type: string
                                  example: '2.99'
                                tax_in_currency:
                                  type: string
                                  example: $2.99
                            variant:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Sample Variant
                                image_path:
                                  type:
                                    - string
                                    - 'null'
                                  example: /images/sample.png
                                image_url:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/sample.png
                                primary_image:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/primary.png
                                price:
                                  type:
                                    - string
                                    - 'null'
                                  example: '34.44'
                                price_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $34.44
                                sku:
                                  type:
                                    - string
                                    - 'null'
                                  example: SKU12345
                                options:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      title:
                                        type: string
                                        example: Size
                                      value:
                                        type: string
                                        example: XL
                      activities:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            slug:
                              type: string
                            title:
                              type: string
                            description:
                              type: string
                            user:
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    example:
                      id:
                        - Subscription Order not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
    patch:
      summary: Update subscription order
      description: Update subscription order
      tags:
        - Subscription Orders
      operationId: updateSubscriptionOrder
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          description: id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscription_order:
                    type: object
                    properties:
                      id:
                        type: integer
                      amount:
                        type:
                          - number
                          - string
                      display_amount:
                        type: string
                      subtotal:
                        type:
                          - number
                          - string
                      display_subtotal:
                        type: string
                      tax:
                        type:
                          - number
                          - string
                      display_tax:
                        type: string
                      discount:
                        type:
                          - number
                          - string
                      display_discount:
                        type: string
                      shipping:
                        type:
                          - number
                          - string
                      display_shipping:
                        type: string
                      total:
                        type:
                          - number
                          - string
                      display_total:
                        type: string
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      bill_date:
                        type: string
                      next_bill_date:
                        type: string
                      days_until_next_bill_date:
                        type: integer
                      status:
                        type: string
                      subscription_interval:
                        type: integer
                        description: Subscription interval in months
                      cancellation_reason:
                        type:
                          - string
                          - 'null'
                      additional_feedback:
                        type:
                          - string
                          - 'null'
                      bill_to:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      ship_to:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      order_thumbnail:
                        type:
                          - string
                          - 'null'
                      customer:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          user_company_id:
                            type:
                              - integer
                              - 'null'
                          account_id:
                            type: string
                          first_name:
                            type: string
                          last_name:
                            type: string
                          full_name:
                            type: string
                          email:
                            type: string
                          verified_email:
                            type: boolean
                          phone:
                            type: string
                          orders_count:
                            type: integer
                          total_spent:
                            type:
                              - number
                              - string
                          display_total_spent:
                            type: string
                          last_order_id:
                            type:
                              - integer
                              - 'null'
                          metadata:
                            type: object
                            example:
                              performance:
                                on_time_rate: 0.98
                                customer_rating: 4.9
                                issues: 0
                          default_address:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          addresses:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                name:
                                  type:
                                    - string
                                    - 'null'
                                  example: John Doe
                                first_name:
                                  type:
                                    - string
                                    - 'null'
                                  example: John
                                last_name:
                                  type:
                                    - string
                                    - 'null'
                                  example: Doe
                                address1:
                                  type: string
                                  example: 123 Main St
                                address2:
                                  type:
                                    - string
                                    - 'null'
                                  example: Apt 4B
                                address3:
                                  type:
                                    - string
                                    - 'null'
                                  example: Building 5
                                city:
                                  type: string
                                  example: New York
                                state:
                                  type: string
                                  example: NY
                                postal_code:
                                  type: string
                                  example: '10001'
                                country_code:
                                  type: string
                                  example: US
                                subdivision_code:
                                  type:
                                    - string
                                    - 'null'
                                  example: NY
                                default:
                                  type: boolean
                                  example: true
                          notes:
                            type:
                              - string
                              - 'null'
                          created_at:
                            type: string
                          active_subscriptions_count:
                            type: integer
                          inactive_subscriptions_count:
                            type: integer
                          active:
                            type: boolean
                          is_rep:
                            type: boolean
                          external_id:
                            type:
                              - string
                              - 'null'
                          customer_notes:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                customer_id:
                                  type: integer
                                user_company_id:
                                  type:
                                    - integer
                                    - 'null'
                                note:
                                  type: string
                                created_at:
                                  type: string
                                resource_id:
                                  type: integer
                                resource_type:
                                  type: string
                      user:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          first_name:
                            type: string
                          last_name:
                            type: string
                          image_url:
                            type:
                              - string
                              - 'null'
                      buyer:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          first_name:
                            type: string
                          last_name:
                            type: string
                          image_url:
                            type:
                              - string
                              - 'null'
                      payment_method:
                        anyOf:
                          - type: object
                            properties:
                              id:
                                type: integer
                              company_id:
                                type: integer
                              user_id:
                                type: integer
                              source:
                                type: string
                              payload:
                                type: object
                              created_at:
                                type: string
                              updated_at:
                                type: string
                          - type: array
                            items:
                              type: string
                              description: Error messages
                          - type: 'null'
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            product:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type: string
                                  example: Sample Product
                                cv:
                                  type: integer
                                  example: 10
                                cv_in_currency:
                                  type: string
                                  example: $10.00
                                image_path:
                                  type:
                                    - string
                                    - 'null'
                                  example: /images/product.png
                                image_url:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/product.png
                                price:
                                  type: string
                                  example: '29.99'
                                price_in_currency:
                                  type: string
                                  example: $29.99
                                sku:
                                  type:
                                    - string
                                    - 'null'
                                  example: SKU12345
                                tax:
                                  type: string
                                  example: '2.99'
                                tax_in_currency:
                                  type: string
                                  example: $2.99
                            variant:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Sample Variant
                                image_path:
                                  type:
                                    - string
                                    - 'null'
                                  example: /images/sample.png
                                image_url:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/sample.png
                                primary_image:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/primary.png
                                price:
                                  type:
                                    - string
                                    - 'null'
                                  example: '34.44'
                                price_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $34.44
                                sku:
                                  type:
                                    - string
                                    - 'null'
                                  example: SKU12345
                                options:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      title:
                                        type: string
                                        example: Size
                                      value:
                                        type: string
                                        example: XL
                      activities:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            slug:
                              type: string
                            title:
                              type: string
                            description:
                              type: string
                            user:
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    example:
                      base:
                        - You cannot remove all items from an order
                  error_message:
                    type: string
                    example: unprocessable entity
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              properties:
                update:
                  type:
                    - boolean
                    - 'null'
                items:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: Item Id
                      quantity:
                        type: integer
                        description: Item Quantity
                      option_value_ids:
                        type:
                          - array
                          - 'null'
                        items:
                          type: integer
                          description: Ids of OptionValue of Product
  /api/v2/subscription_orders/stats:
    get:
      summary: Subscription Orders' stats
      description: Get statistics for subscription orders with optional filters
      tags:
        - Subscription Orders
      operationId: statsForSubscriptionOrders
      security:
        - bearer_auth: []
      parameters:
        - name: customer_id
          in: query
          required: false
          description: Filter subscription orders by customer_id
          schema:
            type: integer
        - name: buyer_id
          in: query
          required: false
          description: Filter subscription orders by buyer_id
          schema:
            type: integer
        - name: ship_to_country_id
          in: query
          required: false
          description: Filter subscription orders by shipping address' country
          schema:
            type: string
        - name: next_bill_date_start_date
          in: query
          required: false
          description: Filter subscription orders by start_date of next_bill_date
          schema:
            type: string
        - name: next_bill_date_end_date
          in: query
          required: false
          description: Filter subscription orders by end_date of next_bill_date
          schema:
            type: string
        - name: page
          in: query
          schema:
            type: integer
            default: 1
          required: false
          description: Page number for pagination
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscriptions_count:
                    type: integer
                  active_subscriptions_count:
                    type: integer
                  cancelled_subscriptions_count:
                    type: integer
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
  /api/v2/subscription_orders/{id}/update_shipping_address:
    patch:
      summary: Update shipping address for Subscription Order
      description: Update shipping address of a subscription order
      tags:
        - Subscription Orders
      operationId: updateShippingAddressOfSubscriptionOrder
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          description: id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscription_order:
                    type: object
                    properties:
                      id:
                        type: integer
                      amount:
                        type:
                          - number
                          - string
                      display_amount:
                        type: string
                      subtotal:
                        type:
                          - number
                          - string
                      display_subtotal:
                        type: string
                      tax:
                        type:
                          - number
                          - string
                      display_tax:
                        type: string
                      discount:
                        type:
                          - number
                          - string
                      display_discount:
                        type: string
                      shipping:
                        type:
                          - number
                          - string
                      display_shipping:
                        type: string
                      total:
                        type:
                          - number
                          - string
                      display_total:
                        type: string
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      bill_date:
                        type: string
                      next_bill_date:
                        type: string
                      days_until_next_bill_date:
                        type: integer
                      status:
                        type: string
                      subscription_interval:
                        type: integer
                        description: Subscription interval in months
                      cancellation_reason:
                        type:
                          - string
                          - 'null'
                      additional_feedback:
                        type:
                          - string
                          - 'null'
                      bill_to:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      ship_to:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      order_thumbnail:
                        type:
                          - string
                          - 'null'
                      customer:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          user_company_id:
                            type:
                              - integer
                              - 'null'
                          account_id:
                            type: string
                          first_name:
                            type: string
                          last_name:
                            type: string
                          full_name:
                            type: string
                          email:
                            type: string
                          verified_email:
                            type: boolean
                          phone:
                            type: string
                          orders_count:
                            type: integer
                          total_spent:
                            type:
                              - number
                              - string
                          display_total_spent:
                            type: string
                          last_order_id:
                            type:
                              - integer
                              - 'null'
                          metadata:
                            type: object
                            example:
                              performance:
                                on_time_rate: 0.98
                                customer_rating: 4.9
                                issues: 0
                          default_address:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          addresses:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                name:
                                  type:
                                    - string
                                    - 'null'
                                  example: John Doe
                                first_name:
                                  type:
                                    - string
                                    - 'null'
                                  example: John
                                last_name:
                                  type:
                                    - string
                                    - 'null'
                                  example: Doe
                                address1:
                                  type: string
                                  example: 123 Main St
                                address2:
                                  type:
                                    - string
                                    - 'null'
                                  example: Apt 4B
                                address3:
                                  type:
                                    - string
                                    - 'null'
                                  example: Building 5
                                city:
                                  type: string
                                  example: New York
                                state:
                                  type: string
                                  example: NY
                                postal_code:
                                  type: string
                                  example: '10001'
                                country_code:
                                  type: string
                                  example: US
                                subdivision_code:
                                  type:
                                    - string
                                    - 'null'
                                  example: NY
                                default:
                                  type: boolean
                                  example: true
                          notes:
                            type:
                              - string
                              - 'null'
                          created_at:
                            type: string
                          active_subscriptions_count:
                            type: integer
                          inactive_subscriptions_count:
                            type: integer
                          active:
                            type: boolean
                          is_rep:
                            type: boolean
                          external_id:
                            type:
                              - string
                              - 'null'
                          customer_notes:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                customer_id:
                                  type: integer
                                user_company_id:
                                  type:
                                    - integer
                                    - 'null'
                                note:
                                  type: string
                                created_at:
                                  type: string
                                resource_id:
                                  type: integer
                                resource_type:
                                  type: string
                      user:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          first_name:
                            type: string
                          last_name:
                            type: string
                          image_url:
                            type:
                              - string
                              - 'null'
                      buyer:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          first_name:
                            type: string
                          last_name:
                            type: string
                          image_url:
                            type:
                              - string
                              - 'null'
                      payment_method:
                        anyOf:
                          - type: object
                            properties:
                              id:
                                type: integer
                              company_id:
                                type: integer
                              user_id:
                                type: integer
                              source:
                                type: string
                              payload:
                                type: object
                              created_at:
                                type: string
                              updated_at:
                                type: string
                          - type: array
                            items:
                              type: string
                              description: Error messages
                          - type: 'null'
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            product:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type: string
                                  example: Sample Product
                                cv:
                                  type: integer
                                  example: 10
                                cv_in_currency:
                                  type: string
                                  example: $10.00
                                image_path:
                                  type:
                                    - string
                                    - 'null'
                                  example: /images/product.png
                                image_url:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/product.png
                                price:
                                  type: string
                                  example: '29.99'
                                price_in_currency:
                                  type: string
                                  example: $29.99
                                sku:
                                  type:
                                    - string
                                    - 'null'
                                  example: SKU12345
                                tax:
                                  type: string
                                  example: '2.99'
                                tax_in_currency:
                                  type: string
                                  example: $2.99
                            variant:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Sample Variant
                                image_path:
                                  type:
                                    - string
                                    - 'null'
                                  example: /images/sample.png
                                image_url:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/sample.png
                                primary_image:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/primary.png
                                price:
                                  type:
                                    - string
                                    - 'null'
                                  example: '34.44'
                                price_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $34.44
                                sku:
                                  type:
                                    - string
                                    - 'null'
                                  example: SKU12345
                                options:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      title:
                                        type: string
                                        example: Size
                                      value:
                                        type: string
                                        example: XL
                      activities:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            slug:
                              type: string
                            title:
                              type: string
                            description:
                              type: string
                            user:
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                address:
                  type: object
                  properties:
                    country_id:
                      type: integer
                    name:
                      type: string
                    address1:
                      type: string
                    address2:
                      type: string
                    city:
                      type: string
                    state:
                      type: string
                    postal_code:
                      type: string
        description: address
  /api/v2/subscription_orders/{id}/update_payment:
    patch:
      summary: Update payment method of a subscription order
      description: Update payment method of a subscription order
      tags:
        - Subscription Orders
      operationId: updatePaymentMethodOfSubscriptionOrder
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          description: id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                anyOf:
                  - type: object
                    properties:
                      subscription_order:
                        type: object
                        properties:
                          id:
                            type: integer
                          amount:
                            type:
                              - number
                              - string
                          display_amount:
                            type: string
                          subtotal:
                            type:
                              - number
                              - string
                          display_subtotal:
                            type: string
                          tax:
                            type:
                              - number
                              - string
                          display_tax:
                            type: string
                          discount:
                            type:
                              - number
                              - string
                          display_discount:
                            type: string
                          shipping:
                            type:
                              - number
                              - string
                          display_shipping:
                            type: string
                          total:
                            type:
                              - number
                              - string
                          display_total:
                            type: string
                          created_at:
                            type: string
                          updated_at:
                            type: string
                          bill_date:
                            type: string
                          next_bill_date:
                            type: string
                          days_until_next_bill_date:
                            type: integer
                          status:
                            type: string
                          subscription_interval:
                            type: integer
                            description: Subscription interval in months
                          cancellation_reason:
                            type:
                              - string
                              - 'null'
                          additional_feedback:
                            type:
                              - string
                              - 'null'
                          bill_to:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          ship_to:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          order_thumbnail:
                            type:
                              - string
                              - 'null'
                          customer:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                              user_company_id:
                                type:
                                  - integer
                                  - 'null'
                              account_id:
                                type: string
                              first_name:
                                type: string
                              last_name:
                                type: string
                              full_name:
                                type: string
                              email:
                                type: string
                              verified_email:
                                type: boolean
                              phone:
                                type: string
                              orders_count:
                                type: integer
                              total_spent:
                                type:
                                  - number
                                  - string
                              display_total_spent:
                                type: string
                              last_order_id:
                                type:
                                  - integer
                                  - 'null'
                              metadata:
                                type: object
                                example:
                                  performance:
                                    on_time_rate: 0.98
                                    customer_rating: 4.9
                                    issues: 0
                              default_address:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 1
                                  name:
                                    type:
                                      - string
                                      - 'null'
                                    example: John Doe
                                  first_name:
                                    type:
                                      - string
                                      - 'null'
                                    example: John
                                  last_name:
                                    type:
                                      - string
                                      - 'null'
                                    example: Doe
                                  address1:
                                    type: string
                                    example: 123 Main St
                                  address2:
                                    type:
                                      - string
                                      - 'null'
                                    example: Apt 4B
                                  address3:
                                    type:
                                      - string
                                      - 'null'
                                    example: Building 5
                                  city:
                                    type: string
                                    example: New York
                                  state:
                                    type: string
                                    example: NY
                                  postal_code:
                                    type: string
                                    example: '10001'
                                  country_code:
                                    type: string
                                    example: US
                                  subdivision_code:
                                    type:
                                      - string
                                      - 'null'
                                    example: NY
                                  default:
                                    type: boolean
                                    example: true
                              addresses:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    name:
                                      type:
                                        - string
                                        - 'null'
                                      example: John Doe
                                    first_name:
                                      type:
                                        - string
                                        - 'null'
                                      example: John
                                    last_name:
                                      type:
                                        - string
                                        - 'null'
                                      example: Doe
                                    address1:
                                      type: string
                                      example: 123 Main St
                                    address2:
                                      type:
                                        - string
                                        - 'null'
                                      example: Apt 4B
                                    address3:
                                      type:
                                        - string
                                        - 'null'
                                      example: Building 5
                                    city:
                                      type: string
                                      example: New York
                                    state:
                                      type: string
                                      example: NY
                                    postal_code:
                                      type: string
                                      example: '10001'
                                    country_code:
                                      type: string
                                      example: US
                                    subdivision_code:
                                      type:
                                        - string
                                        - 'null'
                                      example: NY
                                    default:
                                      type: boolean
                                      example: true
                              notes:
                                type:
                                  - string
                                  - 'null'
                              created_at:
                                type: string
                              active_subscriptions_count:
                                type: integer
                              inactive_subscriptions_count:
                                type: integer
                              active:
                                type: boolean
                              is_rep:
                                type: boolean
                              external_id:
                                type:
                                  - string
                                  - 'null'
                              customer_notes:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                    customer_id:
                                      type: integer
                                    user_company_id:
                                      type:
                                        - integer
                                        - 'null'
                                    note:
                                      type: string
                                    created_at:
                                      type: string
                                    resource_id:
                                      type: integer
                                    resource_type:
                                      type: string
                          user:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                              first_name:
                                type: string
                              last_name:
                                type: string
                              image_url:
                                type:
                                  - string
                                  - 'null'
                          buyer:
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                              first_name:
                                type: string
                              last_name:
                                type: string
                              image_url:
                                type:
                                  - string
                                  - 'null'
                          payment_method:
                            anyOf:
                              - type: object
                                properties:
                                  id:
                                    type: integer
                                  company_id:
                                    type: integer
                                  user_id:
                                    type: integer
                                  source:
                                    type: string
                                  payload:
                                    type: object
                                  created_at:
                                    type: string
                                  updated_at:
                                    type: string
                              - type: array
                                items:
                                  type: string
                                  description: Error messages
                              - type: 'null'
                          items:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                product:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type: string
                                      example: Sample Product
                                    cv:
                                      type: integer
                                      example: 10
                                    cv_in_currency:
                                      type: string
                                      example: $10.00
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/product.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/product.png
                                    price:
                                      type: string
                                      example: '29.99'
                                    price_in_currency:
                                      type: string
                                      example: $29.99
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    tax:
                                      type: string
                                      example: '2.99'
                                    tax_in_currency:
                                      type: string
                                      example: $2.99
                                variant:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    title:
                                      type:
                                        - string
                                        - 'null'
                                      example: Sample Variant
                                    image_path:
                                      type:
                                        - string
                                        - 'null'
                                      example: /images/sample.png
                                    image_url:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/sample.png
                                    primary_image:
                                      type:
                                        - string
                                        - 'null'
                                      example: https://example.com/images/primary.png
                                    price:
                                      type:
                                        - string
                                        - 'null'
                                      example: '34.44'
                                    price_in_currency:
                                      type:
                                        - string
                                        - 'null'
                                      example: $34.44
                                    sku:
                                      type:
                                        - string
                                        - 'null'
                                      example: SKU12345
                                    options:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          title:
                                            type: string
                                            example: Size
                                          value:
                                            type: string
                                            example: XL
                          activities:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                slug:
                                  type: string
                                title:
                                  type: string
                                description:
                                  type: string
                                user:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                    name:
                                      type: string
                      meta:
                        type: object
                        properties:
                          request_id:
                            type: string
                            example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                          timestamp:
                            type: string
                            example: '2024-12-10T08:04:10Z'
                    description: >-
                      This schema is returned when 'payment_method' is anything
                      but 'paypal'.
                  - type: object
                    properties:
                      payer_action_url:
                        type: string
                        example: https://www.paypal.com/mock_redirect_url
                      meta:
                        type: object
                        properties:
                          request_id:
                            type: string
                            example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                          timestamp:
                            type: string
                            example: '2024-12-10T08:04:10Z'
                    description: This schema is returned when 'payment_method' is 'paypal'.
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    example: '{''payment_method'': [''Payment method is not supported.'']}'
                  error_message:
                    type: string
                    example: unprocessable entity
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  properties:
                    payment_method:
                      type: string
                      enum:
                        - paypal
                    return_url:
                      type: string
                      description: Return URL passed into Paypal payload
                    cancel_url:
                      type: string
                      description: Cancel URL passed into Paypal payload
                  required:
                    - payment_method
                    - return_url
                    - cancel_url
                - type: object
                  properties:
                    payment_method:
                      type: string
                      enum:
                        - apple_pay
                    apple_pay_token:
                      type: object
                      properties:
                        payment_data:
                          type: object
                          properties:
                            data:
                              type: string
                              description: ApplePay Payload
                  required:
                    - payment_method
                    - apple_pay_token
                - type: object
                  description: Allows entering a new card
                  properties:
                    payment_method:
                      type: string
                      enum:
                        - card
                    month_year:
                      type: string
                      description: Expiry date in MM/YY format
                    cvc:
                      type: string
                      description: Three digit CVC code
                    number:
                      type: string
                      description: Number in the card.
                  required:
                    - payment_method
                    - month_year
                    - cvc
                    - number
                - type: object
                  description: Allows updating to an existing card
                  properties:
                    payment_method:
                      type: string
                      enum:
                        - card
                    card_id:
                      type: integer
                      description: Card ID
                  required:
                    - payment_method
                    - card_id
        description: >-
          Supports multiple payment methods, each of which have their own
          parameter signatures. Please peek into the schema for more details.
  /api/v2/subscription_orders/{id}/skip_order:
    patch:
      summary: Skip an order of subscription order
      description: Skip an order of subscription order
      tags:
        - Subscription Orders
      operationId: skipSubscriptionOrder
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          description: id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscription_order:
                    type: object
                    properties:
                      id:
                        type: integer
                      amount:
                        type:
                          - number
                          - string
                      display_amount:
                        type: string
                      subtotal:
                        type:
                          - number
                          - string
                      display_subtotal:
                        type: string
                      tax:
                        type:
                          - number
                          - string
                      display_tax:
                        type: string
                      discount:
                        type:
                          - number
                          - string
                      display_discount:
                        type: string
                      shipping:
                        type:
                          - number
                          - string
                      display_shipping:
                        type: string
                      total:
                        type:
                          - number
                          - string
                      display_total:
                        type: string
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      bill_date:
                        type: string
                      next_bill_date:
                        type: string
                      days_until_next_bill_date:
                        type: integer
                      status:
                        type: string
                      subscription_interval:
                        type: integer
                        description: Subscription interval in months
                      cancellation_reason:
                        type:
                          - string
                          - 'null'
                      additional_feedback:
                        type:
                          - string
                          - 'null'
                      bill_to:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      ship_to:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      order_thumbnail:
                        type:
                          - string
                          - 'null'
                      customer:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          user_company_id:
                            type:
                              - integer
                              - 'null'
                          account_id:
                            type: string
                          first_name:
                            type: string
                          last_name:
                            type: string
                          full_name:
                            type: string
                          email:
                            type: string
                          verified_email:
                            type: boolean
                          phone:
                            type: string
                          orders_count:
                            type: integer
                          total_spent:
                            type:
                              - number
                              - string
                          display_total_spent:
                            type: string
                          last_order_id:
                            type:
                              - integer
                              - 'null'
                          metadata:
                            type: object
                            example:
                              performance:
                                on_time_rate: 0.98
                                customer_rating: 4.9
                                issues: 0
                          default_address:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          addresses:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                name:
                                  type:
                                    - string
                                    - 'null'
                                  example: John Doe
                                first_name:
                                  type:
                                    - string
                                    - 'null'
                                  example: John
                                last_name:
                                  type:
                                    - string
                                    - 'null'
                                  example: Doe
                                address1:
                                  type: string
                                  example: 123 Main St
                                address2:
                                  type:
                                    - string
                                    - 'null'
                                  example: Apt 4B
                                address3:
                                  type:
                                    - string
                                    - 'null'
                                  example: Building 5
                                city:
                                  type: string
                                  example: New York
                                state:
                                  type: string
                                  example: NY
                                postal_code:
                                  type: string
                                  example: '10001'
                                country_code:
                                  type: string
                                  example: US
                                subdivision_code:
                                  type:
                                    - string
                                    - 'null'
                                  example: NY
                                default:
                                  type: boolean
                                  example: true
                          notes:
                            type:
                              - string
                              - 'null'
                          created_at:
                            type: string
                          active_subscriptions_count:
                            type: integer
                          inactive_subscriptions_count:
                            type: integer
                          active:
                            type: boolean
                          is_rep:
                            type: boolean
                          external_id:
                            type:
                              - string
                              - 'null'
                          customer_notes:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                customer_id:
                                  type: integer
                                user_company_id:
                                  type:
                                    - integer
                                    - 'null'
                                note:
                                  type: string
                                created_at:
                                  type: string
                                resource_id:
                                  type: integer
                                resource_type:
                                  type: string
                      user:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          first_name:
                            type: string
                          last_name:
                            type: string
                          image_url:
                            type:
                              - string
                              - 'null'
                      buyer:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          first_name:
                            type: string
                          last_name:
                            type: string
                          image_url:
                            type:
                              - string
                              - 'null'
                      payment_method:
                        anyOf:
                          - type: object
                            properties:
                              id:
                                type: integer
                              company_id:
                                type: integer
                              user_id:
                                type: integer
                              source:
                                type: string
                              payload:
                                type: object
                              created_at:
                                type: string
                              updated_at:
                                type: string
                          - type: array
                            items:
                              type: string
                              description: Error messages
                          - type: 'null'
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            product:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type: string
                                  example: Sample Product
                                cv:
                                  type: integer
                                  example: 10
                                cv_in_currency:
                                  type: string
                                  example: $10.00
                                image_path:
                                  type:
                                    - string
                                    - 'null'
                                  example: /images/product.png
                                image_url:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/product.png
                                price:
                                  type: string
                                  example: '29.99'
                                price_in_currency:
                                  type: string
                                  example: $29.99
                                sku:
                                  type:
                                    - string
                                    - 'null'
                                  example: SKU12345
                                tax:
                                  type: string
                                  example: '2.99'
                                tax_in_currency:
                                  type: string
                                  example: $2.99
                            variant:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Sample Variant
                                image_path:
                                  type:
                                    - string
                                    - 'null'
                                  example: /images/sample.png
                                image_url:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/sample.png
                                primary_image:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/primary.png
                                price:
                                  type:
                                    - string
                                    - 'null'
                                  example: '34.44'
                                price_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $34.44
                                sku:
                                  type:
                                    - string
                                    - 'null'
                                  example: SKU12345
                                options:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      title:
                                        type: string
                                        example: Size
                                      value:
                                        type: string
                                        example: XL
                      activities:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            slug:
                              type: string
                            title:
                              type: string
                            description:
                              type: string
                            user:
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    example: >-
                      {'base': ['Your subscription order F8113330330 has been
                      skipped for a month. Your updated recognized ship date is
                      2025-01-07.']}
                  error_message:
                    type: string
                    example: unprocessable entity
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
  /api/v2/subscription_orders/{id}/cancel_subscription:
    patch:
      summary: Cancel subscription order
      description: Cancel subscription order
      tags:
        - Subscription Orders
      operationId: cancelSubscriptionOrder
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          description: id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscription_order:
                    type: object
                    properties:
                      id:
                        type: integer
                      amount:
                        type:
                          - number
                          - string
                      display_amount:
                        type: string
                      subtotal:
                        type:
                          - number
                          - string
                      display_subtotal:
                        type: string
                      tax:
                        type:
                          - number
                          - string
                      display_tax:
                        type: string
                      discount:
                        type:
                          - number
                          - string
                      display_discount:
                        type: string
                      shipping:
                        type:
                          - number
                          - string
                      display_shipping:
                        type: string
                      total:
                        type:
                          - number
                          - string
                      display_total:
                        type: string
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      bill_date:
                        type: string
                      next_bill_date:
                        type: string
                      days_until_next_bill_date:
                        type: integer
                      status:
                        type: string
                      subscription_interval:
                        type: integer
                        description: Subscription interval in months
                      cancellation_reason:
                        type:
                          - string
                          - 'null'
                      additional_feedback:
                        type:
                          - string
                          - 'null'
                      bill_to:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      ship_to:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      order_thumbnail:
                        type:
                          - string
                          - 'null'
                      customer:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          user_company_id:
                            type:
                              - integer
                              - 'null'
                          account_id:
                            type: string
                          first_name:
                            type: string
                          last_name:
                            type: string
                          full_name:
                            type: string
                          email:
                            type: string
                          verified_email:
                            type: boolean
                          phone:
                            type: string
                          orders_count:
                            type: integer
                          total_spent:
                            type:
                              - number
                              - string
                          display_total_spent:
                            type: string
                          last_order_id:
                            type:
                              - integer
                              - 'null'
                          metadata:
                            type: object
                            example:
                              performance:
                                on_time_rate: 0.98
                                customer_rating: 4.9
                                issues: 0
                          default_address:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          addresses:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                name:
                                  type:
                                    - string
                                    - 'null'
                                  example: John Doe
                                first_name:
                                  type:
                                    - string
                                    - 'null'
                                  example: John
                                last_name:
                                  type:
                                    - string
                                    - 'null'
                                  example: Doe
                                address1:
                                  type: string
                                  example: 123 Main St
                                address2:
                                  type:
                                    - string
                                    - 'null'
                                  example: Apt 4B
                                address3:
                                  type:
                                    - string
                                    - 'null'
                                  example: Building 5
                                city:
                                  type: string
                                  example: New York
                                state:
                                  type: string
                                  example: NY
                                postal_code:
                                  type: string
                                  example: '10001'
                                country_code:
                                  type: string
                                  example: US
                                subdivision_code:
                                  type:
                                    - string
                                    - 'null'
                                  example: NY
                                default:
                                  type: boolean
                                  example: true
                          notes:
                            type:
                              - string
                              - 'null'
                          created_at:
                            type: string
                          active_subscriptions_count:
                            type: integer
                          inactive_subscriptions_count:
                            type: integer
                          active:
                            type: boolean
                          is_rep:
                            type: boolean
                          external_id:
                            type:
                              - string
                              - 'null'
                          customer_notes:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                customer_id:
                                  type: integer
                                user_company_id:
                                  type:
                                    - integer
                                    - 'null'
                                note:
                                  type: string
                                created_at:
                                  type: string
                                resource_id:
                                  type: integer
                                resource_type:
                                  type: string
                      user:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          first_name:
                            type: string
                          last_name:
                            type: string
                          image_url:
                            type:
                              - string
                              - 'null'
                      buyer:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          first_name:
                            type: string
                          last_name:
                            type: string
                          image_url:
                            type:
                              - string
                              - 'null'
                      payment_method:
                        anyOf:
                          - type: object
                            properties:
                              id:
                                type: integer
                              company_id:
                                type: integer
                              user_id:
                                type: integer
                              source:
                                type: string
                              payload:
                                type: object
                              created_at:
                                type: string
                              updated_at:
                                type: string
                          - type: array
                            items:
                              type: string
                              description: Error messages
                          - type: 'null'
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            product:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type: string
                                  example: Sample Product
                                cv:
                                  type: integer
                                  example: 10
                                cv_in_currency:
                                  type: string
                                  example: $10.00
                                image_path:
                                  type:
                                    - string
                                    - 'null'
                                  example: /images/product.png
                                image_url:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/product.png
                                price:
                                  type: string
                                  example: '29.99'
                                price_in_currency:
                                  type: string
                                  example: $29.99
                                sku:
                                  type:
                                    - string
                                    - 'null'
                                  example: SKU12345
                                tax:
                                  type: string
                                  example: '2.99'
                                tax_in_currency:
                                  type: string
                                  example: $2.99
                            variant:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Sample Variant
                                image_path:
                                  type:
                                    - string
                                    - 'null'
                                  example: /images/sample.png
                                image_url:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/sample.png
                                primary_image:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/primary.png
                                price:
                                  type:
                                    - string
                                    - 'null'
                                  example: '34.44'
                                price_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $34.44
                                sku:
                                  type:
                                    - string
                                    - 'null'
                                  example: SKU12345
                                options:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      title:
                                        type: string
                                        example: Size
                                      value:
                                        type: string
                                        example: XL
                      activities:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            slug:
                              type: string
                            title:
                              type: string
                            description:
                              type: string
                            user:
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
  /api/v2/subscription_orders/{id}/cancellation_feedback:
    patch:
      summary: Provide cancellation feedback for subscription order
      description: Provide cancellation feedback for subscription order
      tags:
        - Subscription Orders
      operationId: cancellationFeedbackForSubscriptionOrder
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          description: id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscription_order:
                    type: object
                    properties:
                      id:
                        type: integer
                      amount:
                        type:
                          - number
                          - string
                      display_amount:
                        type: string
                      subtotal:
                        type:
                          - number
                          - string
                      display_subtotal:
                        type: string
                      tax:
                        type:
                          - number
                          - string
                      display_tax:
                        type: string
                      discount:
                        type:
                          - number
                          - string
                      display_discount:
                        type: string
                      shipping:
                        type:
                          - number
                          - string
                      display_shipping:
                        type: string
                      total:
                        type:
                          - number
                          - string
                      display_total:
                        type: string
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      bill_date:
                        type: string
                      next_bill_date:
                        type: string
                      days_until_next_bill_date:
                        type: integer
                      status:
                        type: string
                      subscription_interval:
                        type: integer
                        description: Subscription interval in months
                      cancellation_reason:
                        type:
                          - string
                          - 'null'
                      additional_feedback:
                        type:
                          - string
                          - 'null'
                      bill_to:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      ship_to:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      order_thumbnail:
                        type:
                          - string
                          - 'null'
                      customer:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          user_company_id:
                            type:
                              - integer
                              - 'null'
                          account_id:
                            type: string
                          first_name:
                            type: string
                          last_name:
                            type: string
                          full_name:
                            type: string
                          email:
                            type: string
                          verified_email:
                            type: boolean
                          phone:
                            type: string
                          orders_count:
                            type: integer
                          total_spent:
                            type:
                              - number
                              - string
                          display_total_spent:
                            type: string
                          last_order_id:
                            type:
                              - integer
                              - 'null'
                          metadata:
                            type: object
                            example:
                              performance:
                                on_time_rate: 0.98
                                customer_rating: 4.9
                                issues: 0
                          default_address:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          addresses:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                name:
                                  type:
                                    - string
                                    - 'null'
                                  example: John Doe
                                first_name:
                                  type:
                                    - string
                                    - 'null'
                                  example: John
                                last_name:
                                  type:
                                    - string
                                    - 'null'
                                  example: Doe
                                address1:
                                  type: string
                                  example: 123 Main St
                                address2:
                                  type:
                                    - string
                                    - 'null'
                                  example: Apt 4B
                                address3:
                                  type:
                                    - string
                                    - 'null'
                                  example: Building 5
                                city:
                                  type: string
                                  example: New York
                                state:
                                  type: string
                                  example: NY
                                postal_code:
                                  type: string
                                  example: '10001'
                                country_code:
                                  type: string
                                  example: US
                                subdivision_code:
                                  type:
                                    - string
                                    - 'null'
                                  example: NY
                                default:
                                  type: boolean
                                  example: true
                          notes:
                            type:
                              - string
                              - 'null'
                          created_at:
                            type: string
                          active_subscriptions_count:
                            type: integer
                          inactive_subscriptions_count:
                            type: integer
                          active:
                            type: boolean
                          is_rep:
                            type: boolean
                          external_id:
                            type:
                              - string
                              - 'null'
                          customer_notes:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                customer_id:
                                  type: integer
                                user_company_id:
                                  type:
                                    - integer
                                    - 'null'
                                note:
                                  type: string
                                created_at:
                                  type: string
                                resource_id:
                                  type: integer
                                resource_type:
                                  type: string
                      user:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          first_name:
                            type: string
                          last_name:
                            type: string
                          image_url:
                            type:
                              - string
                              - 'null'
                      buyer:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          first_name:
                            type: string
                          last_name:
                            type: string
                          image_url:
                            type:
                              - string
                              - 'null'
                      payment_method:
                        anyOf:
                          - type: object
                            properties:
                              id:
                                type: integer
                              company_id:
                                type: integer
                              user_id:
                                type: integer
                              source:
                                type: string
                              payload:
                                type: object
                              created_at:
                                type: string
                              updated_at:
                                type: string
                          - type: array
                            items:
                              type: string
                              description: Error messages
                          - type: 'null'
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            product:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type: string
                                  example: Sample Product
                                cv:
                                  type: integer
                                  example: 10
                                cv_in_currency:
                                  type: string
                                  example: $10.00
                                image_path:
                                  type:
                                    - string
                                    - 'null'
                                  example: /images/product.png
                                image_url:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/product.png
                                price:
                                  type: string
                                  example: '29.99'
                                price_in_currency:
                                  type: string
                                  example: $29.99
                                sku:
                                  type:
                                    - string
                                    - 'null'
                                  example: SKU12345
                                tax:
                                  type: string
                                  example: '2.99'
                                tax_in_currency:
                                  type: string
                                  example: $2.99
                            variant:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Sample Variant
                                image_path:
                                  type:
                                    - string
                                    - 'null'
                                  example: /images/sample.png
                                image_url:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/sample.png
                                primary_image:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/primary.png
                                price:
                                  type:
                                    - string
                                    - 'null'
                                  example: '34.44'
                                price_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $34.44
                                sku:
                                  type:
                                    - string
                                    - 'null'
                                  example: SKU12345
                                options:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      title:
                                        type: string
                                        example: Size
                                      value:
                                        type: string
                                        example: XL
                      activities:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            slug:
                              type: string
                            title:
                              type: string
                            description:
                              type: string
                            user:
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                feedback:
                  type: string
  /api/v2/subscription_orders/{id}/authorize_paypal:
    get:
      summary: Authorize paypal payment for subscription order
      description: >-
        Authorize paypal payment for subscription order.This endpoint is passed
        as `return_url` in Paypal's payload, and PayPal redirects to this URL
        after completing the relevant action.
      tags:
        - Subscription Orders
      operationId: authorizePayPalForSubscriptionOrder
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          description: id
          required: true
          schema:
            type: string
        - name: token
          in: query
          required: true
          description: Authorization token from Paypal
          schema:
            type: string
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscription_order:
                    type: object
                    properties:
                      id:
                        type: integer
                      amount:
                        type:
                          - number
                          - string
                      display_amount:
                        type: string
                      subtotal:
                        type:
                          - number
                          - string
                      display_subtotal:
                        type: string
                      tax:
                        type:
                          - number
                          - string
                      display_tax:
                        type: string
                      discount:
                        type:
                          - number
                          - string
                      display_discount:
                        type: string
                      shipping:
                        type:
                          - number
                          - string
                      display_shipping:
                        type: string
                      total:
                        type:
                          - number
                          - string
                      display_total:
                        type: string
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      bill_date:
                        type: string
                      next_bill_date:
                        type: string
                      days_until_next_bill_date:
                        type: integer
                      status:
                        type: string
                      subscription_interval:
                        type: integer
                        description: Subscription interval in months
                      cancellation_reason:
                        type:
                          - string
                          - 'null'
                      additional_feedback:
                        type:
                          - string
                          - 'null'
                      bill_to:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      ship_to:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type:
                              - string
                              - 'null'
                            example: John Doe
                          first_name:
                            type:
                              - string
                              - 'null'
                            example: John
                          last_name:
                            type:
                              - string
                              - 'null'
                            example: Doe
                          address1:
                            type: string
                            example: 123 Main St
                          address2:
                            type:
                              - string
                              - 'null'
                            example: Apt 4B
                          address3:
                            type:
                              - string
                              - 'null'
                            example: Building 5
                          city:
                            type: string
                            example: New York
                          state:
                            type: string
                            example: NY
                          postal_code:
                            type: string
                            example: '10001'
                          country_code:
                            type: string
                            example: US
                          subdivision_code:
                            type:
                              - string
                              - 'null'
                            example: NY
                          default:
                            type: boolean
                            example: true
                      order_thumbnail:
                        type:
                          - string
                          - 'null'
                      customer:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          user_company_id:
                            type:
                              - integer
                              - 'null'
                          account_id:
                            type: string
                          first_name:
                            type: string
                          last_name:
                            type: string
                          full_name:
                            type: string
                          email:
                            type: string
                          verified_email:
                            type: boolean
                          phone:
                            type: string
                          orders_count:
                            type: integer
                          total_spent:
                            type:
                              - number
                              - string
                          display_total_spent:
                            type: string
                          last_order_id:
                            type:
                              - integer
                              - 'null'
                          metadata:
                            type: object
                            example:
                              performance:
                                on_time_rate: 0.98
                                customer_rating: 4.9
                                issues: 0
                          default_address:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type:
                                  - string
                                  - 'null'
                                example: John Doe
                              first_name:
                                type:
                                  - string
                                  - 'null'
                                example: John
                              last_name:
                                type:
                                  - string
                                  - 'null'
                                example: Doe
                              address1:
                                type: string
                                example: 123 Main St
                              address2:
                                type:
                                  - string
                                  - 'null'
                                example: Apt 4B
                              address3:
                                type:
                                  - string
                                  - 'null'
                                example: Building 5
                              city:
                                type: string
                                example: New York
                              state:
                                type: string
                                example: NY
                              postal_code:
                                type: string
                                example: '10001'
                              country_code:
                                type: string
                                example: US
                              subdivision_code:
                                type:
                                  - string
                                  - 'null'
                                example: NY
                              default:
                                type: boolean
                                example: true
                          addresses:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                name:
                                  type:
                                    - string
                                    - 'null'
                                  example: John Doe
                                first_name:
                                  type:
                                    - string
                                    - 'null'
                                  example: John
                                last_name:
                                  type:
                                    - string
                                    - 'null'
                                  example: Doe
                                address1:
                                  type: string
                                  example: 123 Main St
                                address2:
                                  type:
                                    - string
                                    - 'null'
                                  example: Apt 4B
                                address3:
                                  type:
                                    - string
                                    - 'null'
                                  example: Building 5
                                city:
                                  type: string
                                  example: New York
                                state:
                                  type: string
                                  example: NY
                                postal_code:
                                  type: string
                                  example: '10001'
                                country_code:
                                  type: string
                                  example: US
                                subdivision_code:
                                  type:
                                    - string
                                    - 'null'
                                  example: NY
                                default:
                                  type: boolean
                                  example: true
                          notes:
                            type:
                              - string
                              - 'null'
                          created_at:
                            type: string
                          active_subscriptions_count:
                            type: integer
                          inactive_subscriptions_count:
                            type: integer
                          active:
                            type: boolean
                          is_rep:
                            type: boolean
                          external_id:
                            type:
                              - string
                              - 'null'
                          customer_notes:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                customer_id:
                                  type: integer
                                user_company_id:
                                  type:
                                    - integer
                                    - 'null'
                                note:
                                  type: string
                                created_at:
                                  type: string
                                resource_id:
                                  type: integer
                                resource_type:
                                  type: string
                      user:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          first_name:
                            type: string
                          last_name:
                            type: string
                          image_url:
                            type:
                              - string
                              - 'null'
                      buyer:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          first_name:
                            type: string
                          last_name:
                            type: string
                          image_url:
                            type:
                              - string
                              - 'null'
                      payment_method:
                        anyOf:
                          - type: object
                            properties:
                              id:
                                type: integer
                              company_id:
                                type: integer
                              user_id:
                                type: integer
                              source:
                                type: string
                              payload:
                                type: object
                              created_at:
                                type: string
                              updated_at:
                                type: string
                          - type: array
                            items:
                              type: string
                              description: Error messages
                          - type: 'null'
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            product:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type: string
                                  example: Sample Product
                                cv:
                                  type: integer
                                  example: 10
                                cv_in_currency:
                                  type: string
                                  example: $10.00
                                image_path:
                                  type:
                                    - string
                                    - 'null'
                                  example: /images/product.png
                                image_url:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/product.png
                                price:
                                  type: string
                                  example: '29.99'
                                price_in_currency:
                                  type: string
                                  example: $29.99
                                sku:
                                  type:
                                    - string
                                    - 'null'
                                  example: SKU12345
                                tax:
                                  type: string
                                  example: '2.99'
                                tax_in_currency:
                                  type: string
                                  example: $2.99
                            variant:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 1
                                title:
                                  type:
                                    - string
                                    - 'null'
                                  example: Sample Variant
                                image_path:
                                  type:
                                    - string
                                    - 'null'
                                  example: /images/sample.png
                                image_url:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/sample.png
                                primary_image:
                                  type:
                                    - string
                                    - 'null'
                                  example: https://example.com/images/primary.png
                                price:
                                  type:
                                    - string
                                    - 'null'
                                  example: '34.44'
                                price_in_currency:
                                  type:
                                    - string
                                    - 'null'
                                  example: $34.44
                                sku:
                                  type:
                                    - string
                                    - 'null'
                                  example: SKU12345
                                options:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      title:
                                        type: string
                                        example: Size
                                      value:
                                        type: string
                                        example: XL
                      activities:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            slug:
                              type: string
                            title:
                              type: string
                            description:
                              type: string
                            user:
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    example: '{''token'': [''must be filled''] }'
                  error_message:
                    type: string
                    example: Invalid parameters
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
  /api/v2/subscription_orders/{id}/send_autoship_reminder_email:
    patch:
      summary: Send autoship reminder email
      description: Send autoship reminder email to customer manually
      tags:
        - Subscription Orders
      operationId: sendAutoshipReminderEmail
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          description: id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    example: '1'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
                required:
                  - id
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: unprocessable_entity
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - Subscription Order not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
  /api/subscription_plans:
    get:
      summary: List of subscription plans
      description: List all subscription plans
      tags:
        - Subscription Plans
      operationId: listSubscriptionPlans
      security:
        - bearer_auth: []
      parameters:
        - name: pagination
          in: query
          schema:
            type: object
            properties:
              page:
                type: integer
                exclusiveMinimum: 0
              per_page:
                type: integer
                exclusiveMinimum: 0
                maximum: 100
              active:
                type: boolean
              search_query:
                type: string
              sorted_by:
                type: string
              sort_direction:
                type: string
            required: []
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscription_plans:
                    type: array
                    items:
                      title: Commerce::SubscriptionPlan
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          example: Test Subscription Plan
                          type: string
                        billing_interval:
                          example: 1
                          type: integer
                          default: 1
                          minimum: 1
                        billing_interval_unit:
                          description: 'Possible values: `day`, `week`, `month`, `year`'
                          example: day
                          type: string
                          default: month
                        shipping_interval:
                          example: 1
                          type: integer
                          default: 1
                          minimum: 1
                        shipping_interval_unit:
                          description: 'Possible values: `day`, `week`, `month`, `year`'
                          example: day
                          type: string
                          default: month
                        trial_period:
                          example: 1
                          type:
                            - integer
                            - 'null'
                          minimum: 1
                        trial_period_unit:
                          description: 'Possible values: `day`, `week`, `month`, `year`'
                          example: day
                          type:
                            - string
                            - 'null'
                        split_volume:
                          example: true
                          type: boolean
                          default: false
                        allow_skipping:
                          example: true
                          type:
                            - boolean
                            - 'null'
                          default: true
                        max_skips:
                          example: 1
                          type:
                            - integer
                            - 'null'
                          minimum: 1
                        price_adjustment_type:
                          example: percentage or fixed_amount
                          type:
                            - string
                            - 'null'
                        price_adjustment_amount:
                          example: 10
                          type:
                            - number
                            - 'null'
                        max_quantity:
                          example: 100
                          type:
                            - integer
                            - 'null'
                          minimum: 1
                        active:
                          example: true
                          type:
                            - boolean
                            - 'null'
                          default: true
                        company_default:
                          example: false
                          type:
                            - boolean
                            - 'null'
                          default: false
                        created_at:
                          example: '2025-03-10T00:00:00Z'
                          type: string
                          format: date-time
                        updated_at:
                          example: '2025-03-10T00:00:00Z'
                          type: string
                          format: date-time
                        products_count:
                          example: 10
                          type:
                            - integer
                            - 'null'
                        subscribers_count:
                          example: 10
                          type:
                            - integer
                            - 'null'
                        company:
                          title: Company
                          type: object
                          properties:
                            id:
                              type: integer
                          required:
                            - id
                        subscriptions:
                          type: array
                          items:
                            title: Commerce::Subscription
                            type: object
                            properties:
                              id:
                                type: integer
                            required:
                              - id
                        products:
                          type: array
                          items:
                            title: Product
                            type: object
                            properties:
                              id:
                                type: integer
                            required:
                              - id
                      required:
                        - id
                        - name
                        - billing_interval
                        - billing_interval_unit
                        - shipping_interval
                        - shipping_interval_unit
                        - split_volume
                        - created_at
                        - updated_at
                        - company
                        - subscriptions
                        - products
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            example: 1
                          total_pages:
                            type: integer
                            example: 10
                          total_count:
                            type: integer
                            example: 100
                          per_page:
                            type: integer
                            example: 10
                required:
                  - subscription_plans
    post:
      summary: Create a subscription plan
      description: Create a subscription plan
      tags:
        - Subscription Plans
      operationId: createSubscriptionPlan
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscription_plan:
                    title: Commerce::SubscriptionPlan
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        example: Test Subscription Plan
                        type: string
                      billing_interval:
                        example: 1
                        type: integer
                        default: 1
                        minimum: 1
                      billing_interval_unit:
                        description: 'Possible values: `day`, `week`, `month`, `year`'
                        example: day
                        type: string
                        default: month
                      shipping_interval:
                        example: 1
                        type: integer
                        default: 1
                        minimum: 1
                      shipping_interval_unit:
                        description: 'Possible values: `day`, `week`, `month`, `year`'
                        example: day
                        type: string
                        default: month
                      trial_period:
                        example: 1
                        type:
                          - integer
                          - 'null'
                        minimum: 1
                      trial_period_unit:
                        description: 'Possible values: `day`, `week`, `month`, `year`'
                        example: day
                        type:
                          - string
                          - 'null'
                      split_volume:
                        example: true
                        type: boolean
                        default: false
                      allow_skipping:
                        example: true
                        type:
                          - boolean
                          - 'null'
                        default: true
                      max_skips:
                        example: 1
                        type:
                          - integer
                          - 'null'
                        minimum: 1
                      price_adjustment_type:
                        example: percentage or fixed_amount
                        type:
                          - string
                          - 'null'
                      price_adjustment_amount:
                        example: 10
                        type:
                          - number
                          - 'null'
                      max_quantity:
                        example: 100
                        type:
                          - integer
                          - 'null'
                        minimum: 1
                      active:
                        example: true
                        type:
                          - boolean
                          - 'null'
                        default: true
                      company_default:
                        example: false
                        type:
                          - boolean
                          - 'null'
                        default: false
                      created_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      updated_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      products_count:
                        example: 10
                        type:
                          - integer
                          - 'null'
                      subscribers_count:
                        example: 10
                        type:
                          - integer
                          - 'null'
                      company:
                        title: Company
                        type: object
                        properties:
                          id:
                            type: integer
                        required:
                          - id
                      subscriptions:
                        type: array
                        items:
                          title: Commerce::Subscription
                          type: object
                          properties:
                            id:
                              type: integer
                          required:
                            - id
                      products:
                        type: array
                        items:
                          title: Product
                          type: object
                          properties:
                            id:
                              type: integer
                          required:
                            - id
                    required:
                      - id
                      - name
                      - billing_interval
                      - billing_interval_unit
                      - shipping_interval
                      - shipping_interval_unit
                      - split_volume
                      - created_at
                      - updated_at
                      - company
                      - subscriptions
                      - products
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - subscription_plan
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                subscription_plan:
                  type: object
                  properties:
                    name:
                      type: string
                    billing_interval:
                      type: integer
                    billing_interval_unit:
                      type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                    shipping_interval:
                      type: integer
                    shipping_interval_unit:
                      type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                    trial_period:
                      type: integer
                    trial_period_unit:
                      type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                    allow_skipping:
                      type: boolean
                    max_skips:
                      type: integer
                    split_volume:
                      type: boolean
                    price_adjustment_type:
                      type: string
                    price_adjustment_amount:
                      type: number
                    max_quantity:
                      type: integer
                    active:
                      type: boolean
                    company_default:
                      type: boolean
                  required:
                    - name
                    - billing_interval
                    - billing_interval_unit
                    - shipping_interval
                    - shipping_interval_unit
                product_subscription_plans:
                  type: object
                  properties:
                    product_id:
                      type: integer
                    default:
                      type: boolean
                  required: []
              required:
                - subscription_plan
  /api/subscription_plans/{id}:
    get:
      summary: Show a subscription plan
      description: Show a subscription plan
      tags:
        - Subscription Plans
      operationId: showSubscriptionPlan
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscription_plan:
                    title: Commerce::SubscriptionPlan
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        example: Test Subscription Plan
                        type: string
                      billing_interval:
                        example: 1
                        type: integer
                        default: 1
                        minimum: 1
                      billing_interval_unit:
                        description: 'Possible values: `day`, `week`, `month`, `year`'
                        example: day
                        type: string
                        default: month
                      shipping_interval:
                        example: 1
                        type: integer
                        default: 1
                        minimum: 1
                      shipping_interval_unit:
                        description: 'Possible values: `day`, `week`, `month`, `year`'
                        example: day
                        type: string
                        default: month
                      trial_period:
                        example: 1
                        type:
                          - integer
                          - 'null'
                        minimum: 1
                      trial_period_unit:
                        description: 'Possible values: `day`, `week`, `month`, `year`'
                        example: day
                        type:
                          - string
                          - 'null'
                      split_volume:
                        example: true
                        type: boolean
                        default: false
                      allow_skipping:
                        example: true
                        type:
                          - boolean
                          - 'null'
                        default: true
                      max_skips:
                        example: 1
                        type:
                          - integer
                          - 'null'
                        minimum: 1
                      price_adjustment_type:
                        example: percentage or fixed_amount
                        type:
                          - string
                          - 'null'
                      price_adjustment_amount:
                        example: 10
                        type:
                          - number
                          - 'null'
                      max_quantity:
                        example: 100
                        type:
                          - integer
                          - 'null'
                        minimum: 1
                      active:
                        example: true
                        type:
                          - boolean
                          - 'null'
                        default: true
                      company_default:
                        example: false
                        type:
                          - boolean
                          - 'null'
                        default: false
                      created_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      updated_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      products_count:
                        example: 10
                        type:
                          - integer
                          - 'null'
                      subscribers_count:
                        example: 10
                        type:
                          - integer
                          - 'null'
                      company:
                        title: Company
                        type: object
                        properties:
                          id:
                            type: integer
                        required:
                          - id
                      subscriptions:
                        type: array
                        items:
                          title: Commerce::Subscription
                          type: object
                          properties:
                            id:
                              type: integer
                          required:
                            - id
                      products:
                        type: array
                        items:
                          title: Product
                          type: object
                          properties:
                            id:
                              type: integer
                          required:
                            - id
                    required:
                      - id
                      - name
                      - billing_interval
                      - billing_interval_unit
                      - shipping_interval
                      - shipping_interval_unit
                      - split_volume
                      - created_at
                      - updated_at
                      - company
                      - subscriptions
                      - products
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - subscription_plan
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
    put:
      summary: Update a subscription plan
      description: Update a subscription plan
      tags:
        - Subscription Plans
      operationId: updateSubscriptionPlan
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscription_plan:
                    title: Commerce::SubscriptionPlan
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        example: Test Subscription Plan
                        type: string
                      billing_interval:
                        example: 1
                        type: integer
                        default: 1
                        minimum: 1
                      billing_interval_unit:
                        description: 'Possible values: `day`, `week`, `month`, `year`'
                        example: day
                        type: string
                        default: month
                      shipping_interval:
                        example: 1
                        type: integer
                        default: 1
                        minimum: 1
                      shipping_interval_unit:
                        description: 'Possible values: `day`, `week`, `month`, `year`'
                        example: day
                        type: string
                        default: month
                      trial_period:
                        example: 1
                        type:
                          - integer
                          - 'null'
                        minimum: 1
                      trial_period_unit:
                        description: 'Possible values: `day`, `week`, `month`, `year`'
                        example: day
                        type:
                          - string
                          - 'null'
                      split_volume:
                        example: true
                        type: boolean
                        default: false
                      allow_skipping:
                        example: true
                        type:
                          - boolean
                          - 'null'
                        default: true
                      max_skips:
                        example: 1
                        type:
                          - integer
                          - 'null'
                        minimum: 1
                      price_adjustment_type:
                        example: percentage or fixed_amount
                        type:
                          - string
                          - 'null'
                      price_adjustment_amount:
                        example: 10
                        type:
                          - number
                          - 'null'
                      max_quantity:
                        example: 100
                        type:
                          - integer
                          - 'null'
                        minimum: 1
                      active:
                        example: true
                        type:
                          - boolean
                          - 'null'
                        default: true
                      company_default:
                        example: false
                        type:
                          - boolean
                          - 'null'
                        default: false
                      created_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      updated_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      products_count:
                        example: 10
                        type:
                          - integer
                          - 'null'
                      subscribers_count:
                        example: 10
                        type:
                          - integer
                          - 'null'
                      company:
                        title: Company
                        type: object
                        properties:
                          id:
                            type: integer
                        required:
                          - id
                      subscriptions:
                        type: array
                        items:
                          title: Commerce::Subscription
                          type: object
                          properties:
                            id:
                              type: integer
                          required:
                            - id
                      products:
                        type: array
                        items:
                          title: Product
                          type: object
                          properties:
                            id:
                              type: integer
                          required:
                            - id
                    required:
                      - id
                      - name
                      - billing_interval
                      - billing_interval_unit
                      - shipping_interval
                      - shipping_interval_unit
                      - split_volume
                      - created_at
                      - updated_at
                      - company
                      - subscriptions
                      - products
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - subscription_plan
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                subscription_plan:
                  type: object
                  properties:
                    name:
                      type: string
                    billing_interval:
                      type: integer
                    billing_interval_unit:
                      type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                    shipping_interval:
                      type: integer
                    shipping_interval_unit:
                      type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                    trial_period:
                      type: integer
                    trial_period_unit:
                      type: string
                      enum:
                        - day
                        - week
                        - month
                        - year
                    allow_skipping:
                      type: boolean
                    max_skips:
                      type: integer
                    split_volume:
                      type: boolean
                    price_adjustment_type:
                      type: string
                    price_adjustment_amount:
                      type: number
                    max_quantity:
                      type: integer
                    active:
                      type: boolean
                    company_default:
                      type: boolean
                  required:
                    - name
                    - billing_interval
                    - billing_interval_unit
                    - shipping_interval
                    - shipping_interval_unit
                product_subscription_plans:
                  type: object
                  properties:
                    id:
                      type: integer
                    product_id:
                      type: integer
                    default:
                      type: boolean
                    company_default:
                      type: boolean
                  required: []
                id:
                  type: integer
              required:
                - subscription_plan
                - id
    delete:
      summary: Delete a subscription plan
      description: Delete a subscription plan
      tags:
        - Subscription Plans
      operationId: destroySubscriptionPlan
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscription_plan:
                    title: Commerce::SubscriptionPlan
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        example: Test Subscription Plan
                        type: string
                      billing_interval:
                        example: 1
                        type: integer
                        default: 1
                        minimum: 1
                      billing_interval_unit:
                        description: 'Possible values: `day`, `week`, `month`, `year`'
                        example: day
                        type: string
                        default: month
                      shipping_interval:
                        example: 1
                        type: integer
                        default: 1
                        minimum: 1
                      shipping_interval_unit:
                        description: 'Possible values: `day`, `week`, `month`, `year`'
                        example: day
                        type: string
                        default: month
                      trial_period:
                        example: 1
                        type:
                          - integer
                          - 'null'
                        minimum: 1
                      trial_period_unit:
                        description: 'Possible values: `day`, `week`, `month`, `year`'
                        example: day
                        type:
                          - string
                          - 'null'
                      split_volume:
                        example: true
                        type: boolean
                        default: false
                      allow_skipping:
                        example: true
                        type:
                          - boolean
                          - 'null'
                        default: true
                      max_skips:
                        example: 1
                        type:
                          - integer
                          - 'null'
                        minimum: 1
                      price_adjustment_type:
                        example: percentage or fixed_amount
                        type:
                          - string
                          - 'null'
                      price_adjustment_amount:
                        example: 10
                        type:
                          - number
                          - 'null'
                      max_quantity:
                        example: 100
                        type:
                          - integer
                          - 'null'
                        minimum: 1
                      active:
                        example: true
                        type:
                          - boolean
                          - 'null'
                        default: true
                      company_default:
                        example: false
                        type:
                          - boolean
                          - 'null'
                        default: false
                      created_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      updated_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      products_count:
                        example: 10
                        type:
                          - integer
                          - 'null'
                      subscribers_count:
                        example: 10
                        type:
                          - integer
                          - 'null'
                    required:
                      - id
                      - name
                      - billing_interval
                      - billing_interval_unit
                      - shipping_interval
                      - shipping_interval_unit
                      - split_volume
                      - created_at
                      - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - subscription_plan
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
  /api/subscription_plans/{id}/remove_product:
    post:
      summary: Delete a product from subscription plan
      description: Delete a product from subscription plan
      tags:
        - Subscription Plans
      operationId: destroyProductFromSubscriptionPlan
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
        - name: product_id
          in: query
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscription_plan:
                    title: Commerce::SubscriptionPlan
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        example: Test Subscription Plan
                        type: string
                      billing_interval:
                        example: 1
                        type: integer
                        default: 1
                        minimum: 1
                      billing_interval_unit:
                        description: 'Possible values: `day`, `week`, `month`, `year`'
                        example: day
                        type: string
                        default: month
                      shipping_interval:
                        example: 1
                        type: integer
                        default: 1
                        minimum: 1
                      shipping_interval_unit:
                        description: 'Possible values: `day`, `week`, `month`, `year`'
                        example: day
                        type: string
                        default: month
                      trial_period:
                        example: 1
                        type:
                          - integer
                          - 'null'
                        minimum: 1
                      trial_period_unit:
                        description: 'Possible values: `day`, `week`, `month`, `year`'
                        example: day
                        type:
                          - string
                          - 'null'
                      split_volume:
                        example: true
                        type: boolean
                        default: false
                      allow_skipping:
                        example: true
                        type:
                          - boolean
                          - 'null'
                        default: true
                      max_skips:
                        example: 1
                        type:
                          - integer
                          - 'null'
                        minimum: 1
                      price_adjustment_type:
                        example: percentage or fixed_amount
                        type:
                          - string
                          - 'null'
                      price_adjustment_amount:
                        example: 10
                        type:
                          - number
                          - 'null'
                      max_quantity:
                        example: 100
                        type:
                          - integer
                          - 'null'
                        minimum: 1
                      active:
                        example: true
                        type:
                          - boolean
                          - 'null'
                        default: true
                      company_default:
                        example: false
                        type:
                          - boolean
                          - 'null'
                        default: false
                      created_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      updated_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      products_count:
                        example: 10
                        type:
                          - integer
                          - 'null'
                      subscribers_count:
                        example: 10
                        type:
                          - integer
                          - 'null'
                    required:
                      - id
                      - name
                      - billing_interval
                      - billing_interval_unit
                      - shipping_interval
                      - shipping_interval_unit
                      - split_volume
                      - created_at
                      - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - subscription_plan
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
  /api/subscriptions:
    get:
      summary: List of subscriptions
      description: List all subscriptions
      tags:
        - Subscriptions
      operationId: listSubscriptions
      security:
        - bearer_auth: []
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
          description: Page number for pagination
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
            default: 25
          description: Number of records per page
        - name: status
          in: query
          required: false
          description: >-
            Filter subscriptions by status (can be comma-separated for multiple
            values)
          schema:
            type: string
            enum:
              - pending
              - active
              - paused
              - past_due
              - cancelled
              - trial
          example: active
        - name: subscription_plan_id
          in: query
          required: false
          schema:
            type: integer
          description: Filter subscriptions by subscription plan ID
        - name: customer_id
          in: query
          required: false
          schema:
            type: integer
          description: Filter subscriptions by customer ID
        - name: within_days
          in: query
          required: false
          schema:
            type: integer
          description: Filter subscriptions within number of days (e.g., last 7 days)
        - name: frequency
          in: query
          required: false
          description: >-
            Filter subscriptions by billing frequency. Supported values: day,
            week, month, year
          schema:
            type: string
            enum:
              - day
              - week
              - month
              - year
        - name: subscription_number_min
          in: query
          required: false
          schema:
            type: integer
          description: Minimum subscription number for filtering
        - name: subscription_number_max
          in: query
          required: false
          schema:
            type: integer
          description: Maximum subscription number for filtering
        - name: amount_min
          in: query
          required: false
          schema:
            type: number
          description: Minimum amount for filtering
        - name: amount_max
          in: query
          required: false
          schema:
            type: number
          description: Maximum amount for filtering
        - name: created_start
          in: query
          required: false
          schema:
            type: string
            format: date
          description: 'Start date for created date range filter (format: YYYY-MM-DD)'
        - name: created_end
          in: query
          required: false
          schema:
            type: string
            format: date
          description: 'End date for created date range filter (format: YYYY-MM-DD)'
        - name: next_bill_start
          in: query
          required: false
          schema:
            type: string
            format: date
          description: 'Start date for next bill date range filter (format: YYYY-MM-DD)'
        - name: next_bill_end
          in: query
          required: false
          schema:
            type: string
            format: date
          description: 'End date for next bill date range filter (format: YYYY-MM-DD)'
        - name: last_bill_start
          in: query
          required: false
          schema:
            type: string
            format: date
          description: 'Start date for last bill date range filter (format: YYYY-MM-DD)'
        - name: last_bill_end
          in: query
          required: false
          schema:
            type: string
            format: date
          description: 'End date for last bill date range filter (format: YYYY-MM-DD)'
        - name: next_ship_start
          in: query
          required: false
          schema:
            type: string
            format: date
          description: 'Start date for next ship date range filter (format: YYYY-MM-DD)'
        - name: next_ship_end
          in: query
          required: false
          schema:
            type: string
            format: date
          description: 'End date for next ship date range filter (format: YYYY-MM-DD)'
        - name: last_ship_start
          in: query
          required: false
          schema:
            type: string
            format: date
          description: 'Start date for last ship date range filter (format: YYYY-MM-DD)'
        - name: last_ship_end
          in: query
          required: false
          schema:
            type: string
            format: date
          description: 'End date for last ship date range filter (format: YYYY-MM-DD)'
        - name: last_failed_start
          in: query
          required: false
          schema:
            type: string
            format: date
          description: 'Start date for last failed date range filter (format: YYYY-MM-DD)'
        - name: last_failed_end
          in: query
          required: false
          schema:
            type: string
            format: date
          description: 'End date for last failed date range filter (format: YYYY-MM-DD)'
        - name: cancelled_start
          in: query
          required: false
          schema:
            type: string
            format: date
          description: 'Start date for cancelled date range filter (format: YYYY-MM-DD)'
        - name: cancelled_end
          in: query
          required: false
          schema:
            type: string
            format: date
          description: 'End date for cancelled date range filter (format: YYYY-MM-DD)'
        - name: sort_by
          in: query
          required: false
          description: Sort field for subscriptions
          schema:
            type: string
            enum:
              - created_at
              - id
              - next_bill_date
              - customer
              - last_bill_date
              - product
              - amount
              - status
              - frequency
        - name: sort_direction
          in: query
          required: false
          description: Sort direction
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
        - name: search
          in: query
          required: false
          schema:
            type: string
          description: >-
            Search term for subscriptions(searches across subscription plan
            names, customer details, and product titles)
      responses:
        '200':
          description: successful when within_days parameter is not provided
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscriptions:
                    type: array
                    items:
                      title: Commerce::Subscription
                      type: object
                      properties:
                        id:
                          type: integer
                        next_bill_date:
                          example: '2025-03-10T00:00:00Z'
                          type: string
                          format: date
                        last_bill_date:
                          example: '2025-03-10T00:00:00Z'
                          type:
                            - string
                            - 'null'
                          format: date
                        next_ship_date:
                          example: '2025-03-10T00:00:00Z'
                          type:
                            - string
                            - 'null'
                          format: date
                        last_ship_date:
                          example: '2025-03-10T00:00:00Z'
                          type:
                            - string
                            - 'null'
                          format: date
                        status:
                          example: active
                          type: string
                          enum:
                            - pending
                            - active
                            - paused
                            - past_due
                            - cancelled
                            - trial
                        disabled:
                          example: false
                          type:
                            - boolean
                            - 'null'
                          default: false
                        quantity:
                          example: 1
                          type: integer
                          default: 1
                          minimum: 1
                        price:
                          example: 100
                          type: number
                        original_price:
                          example: 100
                          type: number
                        attempts:
                          example: 1
                          type:
                            - integer
                            - 'null'
                          default: 0
                        last_failed_at:
                          example: '2025-03-10T00:00:00Z'
                          type:
                            - string
                            - 'null'
                          format: date-time
                        next_retry_at:
                          example: '2025-03-10T00:00:00Z'
                          type:
                            - string
                            - 'null'
                          format: date-time
                        skipped_count:
                          example: 1
                          type:
                            - integer
                            - 'null'
                          default: 0
                        max_skips:
                          example: 1
                          type:
                            - integer
                            - 'null'
                        trial_ends_at:
                          example: '2025-03-10T00:00:00Z'
                          type:
                            - string
                            - 'null'
                          format: date-time
                        cancelled_at:
                          example: '2025-03-10T00:00:00Z'
                          type:
                            - string
                            - 'null'
                          format: date-time
                        created_at:
                          example: '2025-03-10T00:00:00Z'
                          type: string
                          format: date-time
                        updated_at:
                          example: '2025-03-10T00:00:00Z'
                          type: string
                          format: date-time
                        notes:
                          example: This is a sample commerce subscription
                          type:
                            - string
                            - 'null'
                        in_trial:
                          example: false
                          type: boolean
                        subscription_plan:
                          title: Commerce::SubscriptionPlan
                          type: object
                          properties:
                            id:
                              type: integer
                            name:
                              example: Test Subscription Plan
                              type: string
                            billing_interval:
                              example: 1
                              type: integer
                              default: 1
                              minimum: 1
                            billing_interval_unit:
                              description: 'Possible values: `day`, `week`, `month`, `year`'
                              example: day
                              type: string
                              default: month
                            shipping_interval:
                              example: 1
                              type: integer
                              default: 1
                              minimum: 1
                            shipping_interval_unit:
                              description: 'Possible values: `day`, `week`, `month`, `year`'
                              example: day
                              type: string
                              default: month
                            trial_period:
                              example: 1
                              type:
                                - integer
                                - 'null'
                              minimum: 1
                            trial_period_unit:
                              description: 'Possible values: `day`, `week`, `month`, `year`'
                              example: day
                              type:
                                - string
                                - 'null'
                            split_volume:
                              example: true
                              type: boolean
                              default: false
                            allow_skipping:
                              example: true
                              type:
                                - boolean
                                - 'null'
                              default: true
                            max_skips:
                              example: 1
                              type:
                                - integer
                                - 'null'
                              minimum: 1
                            price_adjustment_type:
                              example: percentage or fixed_amount
                              type:
                                - string
                                - 'null'
                            price_adjustment_amount:
                              example: 10
                              type:
                                - number
                                - 'null'
                            max_quantity:
                              example: 100
                              type:
                                - integer
                                - 'null'
                              minimum: 1
                            active:
                              example: true
                              type:
                                - boolean
                                - 'null'
                              default: true
                            company_default:
                              example: false
                              type:
                                - boolean
                                - 'null'
                              default: false
                            created_at:
                              example: '2025-03-10T00:00:00Z'
                              type: string
                              format: date-time
                            updated_at:
                              example: '2025-03-10T00:00:00Z'
                              type: string
                              format: date-time
                            products_count:
                              example: 10
                              type:
                                - integer
                                - 'null'
                            subscribers_count:
                              example: 10
                              type:
                                - integer
                                - 'null'
                          required:
                            - id
                            - name
                            - billing_interval
                            - billing_interval_unit
                            - shipping_interval
                            - shipping_interval_unit
                            - split_volume
                            - created_at
                            - updated_at
                        customer:
                          title: Customer
                          type: object
                          properties:
                            id:
                              type: integer
                            account_id:
                              type:
                                - string
                                - 'null'
                            first_name:
                              type:
                                - string
                                - 'null'
                            last_name:
                              type:
                                - string
                                - 'null'
                            full_name:
                              type: string
                            email:
                              type: string
                              pattern: >-
                                \A[a-zA-Z0-9.!\#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\z
                            verified_email:
                              type:
                                - boolean
                                - 'null'
                              default: false
                            phone:
                              type:
                                - string
                                - 'null'
                            orders_count:
                              type:
                                - integer
                                - 'null'
                              default: 0
                            created_at:
                              type: string
                              format: date-time
                            display_total_spent:
                              type: string
                            metadata:
                              type: object
                              default: '{}'
                            user_company_id:
                              type:
                                - integer
                                - 'null'
                            external_id:
                              type:
                                - string
                                - 'null'
                            last_order_id:
                              example: 101
                              type:
                                - integer
                                - 'null'
                            notes:
                              example: This is a note
                              type:
                                - string
                                - 'null'
                            active:
                              type: boolean
                            total_spent:
                              example: 100
                              type:
                                - number
                                - string
                            customer_notes:
                              type: array
                              items:
                                title: CustomerNote
                                type: object
                                properties:
                                  id:
                                    type: integer
                                  note:
                                    type: string
                                  user_company_id:
                                    type:
                                      - integer
                                      - 'null'
                                  customer_id:
                                    type: integer
                                  resource_id:
                                    type:
                                      - integer
                                      - 'null'
                                  resource_type:
                                    type:
                                      - string
                                      - 'null'
                                  created_at:
                                    type: string
                                    format: date-time
                                required:
                                  - id
                                  - note
                                  - customer_id
                                  - created_at
                            default_address:
                              title: Address
                              type:
                                - object
                                - 'null'
                              properties:
                                id:
                                  type: integer
                                name:
                                  example: John Doe
                                  type: string
                                address1:
                                  example: 123 Main St
                                  type: string
                                address2:
                                  example: Apt 4B
                                  type:
                                    - string
                                    - 'null'
                                address3:
                                  example: Building 5
                                  type:
                                    - string
                                    - 'null'
                                city:
                                  example: New York
                                  type: string
                                state:
                                  example: NY
                                  type: string
                                subdivision_code:
                                  example: NY
                                  type:
                                    - string
                                    - 'null'
                                postal_code:
                                  example: '10001'
                                  type: string
                                country_code:
                                  example: US
                                  type:
                                    - string
                                    - 'null'
                                default:
                                  description: >-
                                    Use this address by default when there are
                                    multiple addresses
                                  example: true
                                  type:
                                    - boolean
                                    - 'null'
                                  default: false
                                first_name:
                                  example: John
                                  type: string
                                last_name:
                                  example: Doe
                                  type: string
                              required:
                                - id
                                - name
                                - address1
                                - city
                                - state
                                - postal_code
                                - first_name
                                - last_name
                            addresses:
                              type: array
                              items:
                                title: Address
                                type: object
                                properties:
                                  id:
                                    type: integer
                                  name:
                                    example: John Doe
                                    type: string
                                  address1:
                                    example: 123 Main St
                                    type: string
                                  address2:
                                    example: Apt 4B
                                    type:
                                      - string
                                      - 'null'
                                  address3:
                                    example: Building 5
                                    type:
                                      - string
                                      - 'null'
                                  city:
                                    example: New York
                                    type: string
                                  state:
                                    example: NY
                                    type: string
                                  subdivision_code:
                                    example: NY
                                    type:
                                      - string
                                      - 'null'
                                  postal_code:
                                    example: '10001'
                                    type: string
                                  country_code:
                                    example: US
                                    type:
                                      - string
                                      - 'null'
                                  default:
                                    description: >-
                                      Use this address by default when there are
                                      multiple addresses
                                    example: true
                                    type:
                                      - boolean
                                      - 'null'
                                    default: false
                                  first_name:
                                    example: John
                                    type: string
                                  last_name:
                                    example: Doe
                                    type: string
                                required:
                                  - id
                                  - name
                                  - address1
                                  - city
                                  - state
                                  - postal_code
                                  - first_name
                                  - last_name
                            active_subscriptions_count:
                              example: 10
                              type: integer
                            inactive_subscriptions_count:
                              example: 10
                              type: integer
                            is_rep:
                              example: true
                              type: boolean
                          required:
                            - id
                            - full_name
                            - email
                            - created_at
                            - display_total_spent
                            - metadata
                            - active
                            - total_spent
                            - customer_notes
                            - addresses
                            - active_subscriptions_count
                            - inactive_subscriptions_count
                            - is_rep
                        variant:
                          title: Variant
                          type: object
                          properties:
                            id:
                              type: integer
                            title:
                              example: Variant 1
                              type:
                                - string
                                - 'null'
                            image_url:
                              example: https://via.placeholder.com/150
                              type:
                                - string
                                - 'null'
                            image_path:
                              example: https://via.placeholder.com/150
                              type:
                                - string
                                - 'null'
                            sku:
                              example: SKU-123456
                              type:
                                - string
                                - 'null'
                            primary_image:
                              example: https://via.placeholder.com/150
                              type:
                                - string
                                - 'null'
                            price:
                              example: 100
                              type:
                                - number
                                - 'null'
                            price_in_currency:
                              example: USD 100.00
                              type: string
                            options:
                              items:
                                type: object
                                properties:
                                  title:
                                    type: string
                                    example: Size
                                  value:
                                    type: string
                                    example: XL
                              type: array
                            product:
                              title: Product
                              type: object
                              properties:
                                id:
                                  type: integer
                                title:
                                  type: string
                                image_url:
                                  type:
                                    - string
                                    - 'null'
                                image_path:
                                  type:
                                    - string
                                    - 'null'
                                price:
                                  type:
                                    - number
                                    - string
                                    - 'null'
                                  default: '0.0'
                                  minimum: 0
                                  maximum: 99999999
                                cv:
                                  type:
                                    - integer
                                    - 'null'
                                  default: 0
                                tax:
                                  type:
                                    - number
                                    - string
                                    - 'null'
                                  default: '0.0'
                                sku:
                                  type:
                                    - string
                                    - 'null'
                                price_in_currency:
                                  type: string
                                tax_in_currency:
                                  type: string
                                cv_in_currency:
                                  type: string
                              required:
                                - id
                                - title
                                - price_in_currency
                                - tax_in_currency
                                - cv_in_currency
                          required:
                            - id
                            - price_in_currency
                            - options
                            - product
                      required:
                        - id
                        - next_bill_date
                        - status
                        - quantity
                        - price
                        - original_price
                        - created_at
                        - updated_at
                        - in_trial
                        - subscription_plan
                        - customer
                        - variant
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            example: 1
                          total_pages:
                            type: integer
                            example: 10
                          total_count:
                            type: integer
                            example: 100
                          per_page:
                            type: integer
                            example: 10
                      stats:
                        type: object
                        properties:
                          total_count:
                            type: integer
                            example: 100
                          active_count:
                            type: integer
                            example: 80
                          average_order_value:
                            type: number
                            example: 150
                          churn_rate:
                            type: number
                            example: 5.5
                required:
                  - subscriptions
    post:
      summary: Create a subscription
      description: Create a subscription
      tags:
        - Subscriptions
      operationId: createSubscription
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscription:
                    title: Commerce::Subscription
                    type: object
                    properties:
                      id:
                        type: integer
                      next_bill_date:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date
                      last_bill_date:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date
                      next_ship_date:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date
                      last_ship_date:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date
                      status:
                        example: active
                        type: string
                        enum:
                          - pending
                          - active
                          - paused
                          - past_due
                          - cancelled
                          - trial
                      disabled:
                        example: false
                        type:
                          - boolean
                          - 'null'
                        default: false
                      quantity:
                        example: 1
                        type: integer
                        default: 1
                        minimum: 1
                      price:
                        example: 100
                        type: number
                      original_price:
                        example: 100
                        type: number
                      attempts:
                        example: 1
                        type:
                          - integer
                          - 'null'
                        default: 0
                      last_failed_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      next_retry_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      skipped_count:
                        example: 1
                        type:
                          - integer
                          - 'null'
                        default: 0
                      max_skips:
                        example: 1
                        type:
                          - integer
                          - 'null'
                      trial_ends_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      cancelled_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      created_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      updated_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      notes:
                        example: This is a sample commerce subscription
                        type:
                          - string
                          - 'null'
                      in_trial:
                        example: false
                        type: boolean
                      subscription_plan:
                        title: Commerce::SubscriptionPlan
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: Test Subscription Plan
                            type: string
                          billing_interval:
                            example: 1
                            type: integer
                            default: 1
                            minimum: 1
                          billing_interval_unit:
                            description: 'Possible values: `day`, `week`, `month`, `year`'
                            example: day
                            type: string
                            default: month
                          shipping_interval:
                            example: 1
                            type: integer
                            default: 1
                            minimum: 1
                          shipping_interval_unit:
                            description: 'Possible values: `day`, `week`, `month`, `year`'
                            example: day
                            type: string
                            default: month
                          trial_period:
                            example: 1
                            type:
                              - integer
                              - 'null'
                            minimum: 1
                          trial_period_unit:
                            description: 'Possible values: `day`, `week`, `month`, `year`'
                            example: day
                            type:
                              - string
                              - 'null'
                          split_volume:
                            example: true
                            type: boolean
                            default: false
                          allow_skipping:
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: true
                          max_skips:
                            example: 1
                            type:
                              - integer
                              - 'null'
                            minimum: 1
                          price_adjustment_type:
                            example: percentage or fixed_amount
                            type:
                              - string
                              - 'null'
                          price_adjustment_amount:
                            example: 10
                            type:
                              - number
                              - 'null'
                          max_quantity:
                            example: 100
                            type:
                              - integer
                              - 'null'
                            minimum: 1
                          active:
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: true
                          company_default:
                            example: false
                            type:
                              - boolean
                              - 'null'
                            default: false
                          created_at:
                            example: '2025-03-10T00:00:00Z'
                            type: string
                            format: date-time
                          updated_at:
                            example: '2025-03-10T00:00:00Z'
                            type: string
                            format: date-time
                          products_count:
                            example: 10
                            type:
                              - integer
                              - 'null'
                          subscribers_count:
                            example: 10
                            type:
                              - integer
                              - 'null'
                        required:
                          - id
                          - name
                          - billing_interval
                          - billing_interval_unit
                          - shipping_interval
                          - shipping_interval_unit
                          - split_volume
                          - created_at
                          - updated_at
                      customer:
                        title: Customer
                        type: object
                        properties:
                          id:
                            type: integer
                          account_id:
                            type:
                              - string
                              - 'null'
                          first_name:
                            type:
                              - string
                              - 'null'
                          last_name:
                            type:
                              - string
                              - 'null'
                          full_name:
                            type: string
                          email:
                            type: string
                            pattern: >-
                              \A[a-zA-Z0-9.!\#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\z
                          verified_email:
                            type:
                              - boolean
                              - 'null'
                            default: false
                          phone:
                            type:
                              - string
                              - 'null'
                          orders_count:
                            type:
                              - integer
                              - 'null'
                            default: 0
                          created_at:
                            type: string
                            format: date-time
                          display_total_spent:
                            type: string
                          metadata:
                            type: object
                            default: '{}'
                          user_company_id:
                            type:
                              - integer
                              - 'null'
                          external_id:
                            type:
                              - string
                              - 'null'
                          last_order_id:
                            example: 101
                            type:
                              - integer
                              - 'null'
                          notes:
                            example: This is a note
                            type:
                              - string
                              - 'null'
                          active:
                            type: boolean
                          total_spent:
                            example: 100
                            type:
                              - number
                              - string
                          customer_notes:
                            type: array
                            items:
                              title: CustomerNote
                              type: object
                              properties:
                                id:
                                  type: integer
                                note:
                                  type: string
                                user_company_id:
                                  type:
                                    - integer
                                    - 'null'
                                customer_id:
                                  type: integer
                                resource_id:
                                  type:
                                    - integer
                                    - 'null'
                                resource_type:
                                  type:
                                    - string
                                    - 'null'
                                created_at:
                                  type: string
                                  format: date-time
                              required:
                                - id
                                - note
                                - customer_id
                                - created_at
                          default_address:
                            title: Address
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                              name:
                                example: John Doe
                                type: string
                              address1:
                                example: 123 Main St
                                type: string
                              address2:
                                example: Apt 4B
                                type:
                                  - string
                                  - 'null'
                              address3:
                                example: Building 5
                                type:
                                  - string
                                  - 'null'
                              city:
                                example: New York
                                type: string
                              state:
                                example: NY
                                type: string
                              subdivision_code:
                                example: NY
                                type:
                                  - string
                                  - 'null'
                              postal_code:
                                example: '10001'
                                type: string
                              country_code:
                                example: US
                                type:
                                  - string
                                  - 'null'
                              default:
                                description: >-
                                  Use this address by default when there are
                                  multiple addresses
                                example: true
                                type:
                                  - boolean
                                  - 'null'
                                default: false
                              first_name:
                                example: John
                                type: string
                              last_name:
                                example: Doe
                                type: string
                            required:
                              - id
                              - name
                              - address1
                              - city
                              - state
                              - postal_code
                              - first_name
                              - last_name
                          addresses:
                            type: array
                            items:
                              title: Address
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  example: John Doe
                                  type: string
                                address1:
                                  example: 123 Main St
                                  type: string
                                address2:
                                  example: Apt 4B
                                  type:
                                    - string
                                    - 'null'
                                address3:
                                  example: Building 5
                                  type:
                                    - string
                                    - 'null'
                                city:
                                  example: New York
                                  type: string
                                state:
                                  example: NY
                                  type: string
                                subdivision_code:
                                  example: NY
                                  type:
                                    - string
                                    - 'null'
                                postal_code:
                                  example: '10001'
                                  type: string
                                country_code:
                                  example: US
                                  type:
                                    - string
                                    - 'null'
                                default:
                                  description: >-
                                    Use this address by default when there are
                                    multiple addresses
                                  example: true
                                  type:
                                    - boolean
                                    - 'null'
                                  default: false
                                first_name:
                                  example: John
                                  type: string
                                last_name:
                                  example: Doe
                                  type: string
                              required:
                                - id
                                - name
                                - address1
                                - city
                                - state
                                - postal_code
                                - first_name
                                - last_name
                          active_subscriptions_count:
                            example: 10
                            type: integer
                          inactive_subscriptions_count:
                            example: 10
                            type: integer
                          is_rep:
                            example: true
                            type: boolean
                        required:
                          - id
                          - full_name
                          - email
                          - created_at
                          - display_total_spent
                          - metadata
                          - active
                          - total_spent
                          - customer_notes
                          - addresses
                          - active_subscriptions_count
                          - inactive_subscriptions_count
                          - is_rep
                      variant:
                        title: Variant
                        type: object
                        properties:
                          id:
                            type: integer
                          title:
                            example: Variant 1
                            type:
                              - string
                              - 'null'
                          image_url:
                            example: https://via.placeholder.com/150
                            type:
                              - string
                              - 'null'
                          image_path:
                            example: https://via.placeholder.com/150
                            type:
                              - string
                              - 'null'
                          sku:
                            example: SKU-123456
                            type:
                              - string
                              - 'null'
                          primary_image:
                            example: https://via.placeholder.com/150
                            type:
                              - string
                              - 'null'
                          price:
                            example: 100
                            type:
                              - number
                              - 'null'
                          price_in_currency:
                            example: USD 100.00
                            type: string
                          options:
                            items:
                              type: object
                              properties:
                                title:
                                  type: string
                                  example: Size
                                value:
                                  type: string
                                  example: XL
                            type: array
                          product:
                            title: Product
                            type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              image_url:
                                type:
                                  - string
                                  - 'null'
                              image_path:
                                type:
                                  - string
                                  - 'null'
                              price:
                                type:
                                  - number
                                  - string
                                  - 'null'
                                default: '0.0'
                                minimum: 0
                                maximum: 99999999
                              cv:
                                type:
                                  - integer
                                  - 'null'
                                default: 0
                              tax:
                                type:
                                  - number
                                  - string
                                  - 'null'
                                default: '0.0'
                              sku:
                                type:
                                  - string
                                  - 'null'
                              price_in_currency:
                                type: string
                              tax_in_currency:
                                type: string
                              cv_in_currency:
                                type: string
                            required:
                              - id
                              - title
                              - price_in_currency
                              - tax_in_currency
                              - cv_in_currency
                        required:
                          - id
                          - price_in_currency
                          - options
                          - product
                      address:
                        title: Address
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: John Doe
                            type: string
                          address1:
                            example: 123 Main St
                            type: string
                          address2:
                            example: Apt 4B
                            type:
                              - string
                              - 'null'
                          address3:
                            example: Building 5
                            type:
                              - string
                              - 'null'
                          city:
                            example: New York
                            type: string
                          state:
                            example: NY
                            type: string
                          subdivision_code:
                            example: NY
                            type:
                              - string
                              - 'null'
                          postal_code:
                            example: '10001'
                            type: string
                          country_code:
                            example: US
                            type:
                              - string
                              - 'null'
                          default:
                            description: >-
                              Use this address by default when there are
                              multiple addresses
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: false
                          first_name:
                            example: John
                            type: string
                          last_name:
                            example: Doe
                            type: string
                        required:
                          - id
                          - name
                          - address1
                          - city
                          - state
                          - postal_code
                          - first_name
                          - last_name
                      payment_method:
                        title: Commerce::PaymentMethod
                        type: object
                        properties:
                          id:
                            type: integer
                          source:
                            type: string
                            enum:
                              - apple_pay
                              - paypal
                              - card
                              - iap
                              - bread
                              - affirm
                              - google_pay
                              - klarna
                              - droplet
                          created_at:
                            type: string
                            format: date-time
                          updated_at:
                            type: string
                            format: date-time
                          default:
                            type: boolean
                          payment_type:
                            example: Credit Card
                            type: string
                          details:
                            type: object
                        required:
                          - id
                          - source
                          - created_at
                          - updated_at
                          - default
                          - payment_type
                          - details
                      currency:
                        title: Currency
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: United States Dollar
                            type:
                              - string
                              - 'null'
                          code:
                            example: USD
                            type: string
                          rate:
                            example: 1
                            type:
                              - number
                              - string
                              - 'null'
                          active:
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: false
                          symbol:
                            example: $
                            type:
                              - string
                              - 'null'
                        required:
                          - id
                          - code
                      country:
                        title: Country
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: United States
                            type: string
                          iso:
                            description: 2-letter country code (ISO 3166-1 alpha-2)
                            example: US
                            type: string
                        required:
                          - id
                          - name
                          - iso
                      company:
                        title: Company
                        type: object
                        properties:
                          id:
                            type: integer
                        required:
                          - id
                      subscription_skips:
                        type: array
                        items:
                          title: Commerce::SubscriptionSkip
                          type: object
                          properties:
                            id:
                              type: integer
                            skipped_date:
                              example: '2025-01-01T00:00:00Z'
                              type: string
                              format: date
                            reason:
                              example: Customer requested to skip next billing
                              type:
                                - 'null'
                            created_at:
                              example: '2025-01-01T00:00:00Z'
                              type: string
                              format: date-time
                            updated_at:
                              example: '2025-01-01T00:00:00Z'
                              type: string
                              format: date-time
                          required:
                            - id
                            - skipped_date
                            - created_at
                            - updated_at
                      orders:
                        type: array
                        items:
                          title: Commerce::Order
                          type: object
                          properties:
                            id:
                              type: integer
                            first_name:
                              type:
                                - string
                                - 'null'
                            last_name:
                              type:
                                - string
                                - 'null'
                            email:
                              type:
                                - string
                                - 'null'
                            phone:
                              type:
                                - string
                                - 'null'
                            order_number:
                              type:
                                - string
                                - 'null'
                            status:
                              type: string
                              enum:
                                - awaiting_payment
                                - awaiting_shipment
                                - shipped
                                - delivered
                                - archived
                                - cancelled
                                - failed_payment
                                - draft
                            order_type:
                              type: string
                              enum:
                                - requested
                                - purchased
                                - imported
                                - abandoned
                            amount:
                              type:
                                - number
                                - string
                                - 'null'
                              default: '0.0'
                            note:
                              type:
                                - string
                                - 'null'
                            currency_code:
                              type:
                                - string
                                - 'null'
                            created_at:
                              type: string
                              format: date-time
                            updated_at:
                              type: string
                              format: date-time
                            metadata:
                              type:
                                - object
                                - 'null'
                              default: '{}'
                            token:
                              type: string
                            refundable_amount:
                              type: string
                            shipping_method:
                              title: ShippingMethod
                              type:
                                - object
                                - 'null'
                              properties:
                                id:
                                  type: integer
                                name:
                                  type: string
                                delivery_time_estimate:
                                  type:
                                    - string
                                    - 'null'
                              required:
                                - id
                                - name
                            items_quantity:
                              example: 5
                              type: integer
                          required:
                            - id
                            - status
                            - order_type
                            - created_at
                            - updated_at
                            - token
                            - refundable_amount
                            - items_quantity
                    required:
                      - id
                      - next_bill_date
                      - status
                      - quantity
                      - price
                      - original_price
                      - created_at
                      - updated_at
                      - in_trial
                      - subscription_plan
                      - customer
                      - variant
                      - address
                      - payment_method
                      - currency
                      - country
                      - company
                      - subscription_skips
                      - orders
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - subscription
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                subscription:
                  type: object
                  properties:
                    subscription_plan_id:
                      type: integer
                    customer_id:
                      type: integer
                    variant_id:
                      type: integer
                    address_id:
                      type: integer
                    payment_method_id:
                      type: integer
                    order_item_id:
                      type: integer
                    status:
                      type: string
                    disabled:
                      type: boolean
                    quantity:
                      type: integer
                    metadata:
                      type: object
                    notes:
                      type: string
                    next_bill_date:
                      type: string
                      format: date-time
                  required:
                    - subscription_plan_id
                    - customer_id
                    - variant_id
                    - address_id
                    - payment_method_id
              required:
                - subscription
        description: >-
          Subscription params. next_bill_date (YYYY-MM-DD) calculated internally
          if not provided.
  /api/subscriptions/{id}:
    get:
      summary: Show a subscription
      description: Show a subscription
      tags:
        - Subscriptions
      operationId: showSubscription
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
        - name: customer_id
          in: query
          required: false
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscription:
                    title: Commerce::Subscription
                    type: object
                    properties:
                      id:
                        type: integer
                      next_bill_date:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date
                      last_bill_date:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date
                      next_ship_date:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date
                      last_ship_date:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date
                      status:
                        example: active
                        type: string
                        enum:
                          - pending
                          - active
                          - paused
                          - past_due
                          - cancelled
                          - trial
                      disabled:
                        example: false
                        type:
                          - boolean
                          - 'null'
                        default: false
                      quantity:
                        example: 1
                        type: integer
                        default: 1
                        minimum: 1
                      price:
                        example: 100
                        type: number
                      original_price:
                        example: 100
                        type: number
                      attempts:
                        example: 1
                        type:
                          - integer
                          - 'null'
                        default: 0
                      last_failed_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      next_retry_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      skipped_count:
                        example: 1
                        type:
                          - integer
                          - 'null'
                        default: 0
                      max_skips:
                        example: 1
                        type:
                          - integer
                          - 'null'
                      trial_ends_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      cancelled_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      created_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      updated_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      notes:
                        example: This is a sample commerce subscription
                        type:
                          - string
                          - 'null'
                      in_trial:
                        example: false
                        type: boolean
                      subscription_plan:
                        title: Commerce::SubscriptionPlan
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: Test Subscription Plan
                            type: string
                          billing_interval:
                            example: 1
                            type: integer
                            default: 1
                            minimum: 1
                          billing_interval_unit:
                            description: 'Possible values: `day`, `week`, `month`, `year`'
                            example: day
                            type: string
                            default: month
                          shipping_interval:
                            example: 1
                            type: integer
                            default: 1
                            minimum: 1
                          shipping_interval_unit:
                            description: 'Possible values: `day`, `week`, `month`, `year`'
                            example: day
                            type: string
                            default: month
                          trial_period:
                            example: 1
                            type:
                              - integer
                              - 'null'
                            minimum: 1
                          trial_period_unit:
                            description: 'Possible values: `day`, `week`, `month`, `year`'
                            example: day
                            type:
                              - string
                              - 'null'
                          split_volume:
                            example: true
                            type: boolean
                            default: false
                          allow_skipping:
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: true
                          max_skips:
                            example: 1
                            type:
                              - integer
                              - 'null'
                            minimum: 1
                          price_adjustment_type:
                            example: percentage or fixed_amount
                            type:
                              - string
                              - 'null'
                          price_adjustment_amount:
                            example: 10
                            type:
                              - number
                              - 'null'
                          max_quantity:
                            example: 100
                            type:
                              - integer
                              - 'null'
                            minimum: 1
                          active:
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: true
                          company_default:
                            example: false
                            type:
                              - boolean
                              - 'null'
                            default: false
                          created_at:
                            example: '2025-03-10T00:00:00Z'
                            type: string
                            format: date-time
                          updated_at:
                            example: '2025-03-10T00:00:00Z'
                            type: string
                            format: date-time
                          products_count:
                            example: 10
                            type:
                              - integer
                              - 'null'
                          subscribers_count:
                            example: 10
                            type:
                              - integer
                              - 'null'
                        required:
                          - id
                          - name
                          - billing_interval
                          - billing_interval_unit
                          - shipping_interval
                          - shipping_interval_unit
                          - split_volume
                          - created_at
                          - updated_at
                      customer:
                        title: Customer
                        type: object
                        properties:
                          id:
                            type: integer
                          account_id:
                            type:
                              - string
                              - 'null'
                          first_name:
                            type:
                              - string
                              - 'null'
                          last_name:
                            type:
                              - string
                              - 'null'
                          full_name:
                            type: string
                          email:
                            type: string
                            pattern: >-
                              \A[a-zA-Z0-9.!\#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\z
                          verified_email:
                            type:
                              - boolean
                              - 'null'
                            default: false
                          phone:
                            type:
                              - string
                              - 'null'
                          orders_count:
                            type:
                              - integer
                              - 'null'
                            default: 0
                          created_at:
                            type: string
                            format: date-time
                          display_total_spent:
                            type: string
                          metadata:
                            type: object
                            default: '{}'
                          user_company_id:
                            type:
                              - integer
                              - 'null'
                          external_id:
                            type:
                              - string
                              - 'null'
                          last_order_id:
                            example: 101
                            type:
                              - integer
                              - 'null'
                          notes:
                            example: This is a note
                            type:
                              - string
                              - 'null'
                          active:
                            type: boolean
                          total_spent:
                            example: 100
                            type:
                              - number
                              - string
                          customer_notes:
                            type: array
                            items:
                              title: CustomerNote
                              type: object
                              properties:
                                id:
                                  type: integer
                                note:
                                  type: string
                                user_company_id:
                                  type:
                                    - integer
                                    - 'null'
                                customer_id:
                                  type: integer
                                resource_id:
                                  type:
                                    - integer
                                    - 'null'
                                resource_type:
                                  type:
                                    - string
                                    - 'null'
                                created_at:
                                  type: string
                                  format: date-time
                              required:
                                - id
                                - note
                                - customer_id
                                - created_at
                          default_address:
                            title: Address
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                              name:
                                example: John Doe
                                type: string
                              address1:
                                example: 123 Main St
                                type: string
                              address2:
                                example: Apt 4B
                                type:
                                  - string
                                  - 'null'
                              address3:
                                example: Building 5
                                type:
                                  - string
                                  - 'null'
                              city:
                                example: New York
                                type: string
                              state:
                                example: NY
                                type: string
                              subdivision_code:
                                example: NY
                                type:
                                  - string
                                  - 'null'
                              postal_code:
                                example: '10001'
                                type: string
                              country_code:
                                example: US
                                type:
                                  - string
                                  - 'null'
                              default:
                                description: >-
                                  Use this address by default when there are
                                  multiple addresses
                                example: true
                                type:
                                  - boolean
                                  - 'null'
                                default: false
                              first_name:
                                example: John
                                type: string
                              last_name:
                                example: Doe
                                type: string
                            required:
                              - id
                              - name
                              - address1
                              - city
                              - state
                              - postal_code
                              - first_name
                              - last_name
                          addresses:
                            type: array
                            items:
                              title: Address
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  example: John Doe
                                  type: string
                                address1:
                                  example: 123 Main St
                                  type: string
                                address2:
                                  example: Apt 4B
                                  type:
                                    - string
                                    - 'null'
                                address3:
                                  example: Building 5
                                  type:
                                    - string
                                    - 'null'
                                city:
                                  example: New York
                                  type: string
                                state:
                                  example: NY
                                  type: string
                                subdivision_code:
                                  example: NY
                                  type:
                                    - string
                                    - 'null'
                                postal_code:
                                  example: '10001'
                                  type: string
                                country_code:
                                  example: US
                                  type:
                                    - string
                                    - 'null'
                                default:
                                  description: >-
                                    Use this address by default when there are
                                    multiple addresses
                                  example: true
                                  type:
                                    - boolean
                                    - 'null'
                                  default: false
                                first_name:
                                  example: John
                                  type: string
                                last_name:
                                  example: Doe
                                  type: string
                              required:
                                - id
                                - name
                                - address1
                                - city
                                - state
                                - postal_code
                                - first_name
                                - last_name
                          active_subscriptions_count:
                            example: 10
                            type: integer
                          inactive_subscriptions_count:
                            example: 10
                            type: integer
                          is_rep:
                            example: true
                            type: boolean
                          jwt:
                            type: string
                        required:
                          - id
                          - full_name
                          - email
                          - created_at
                          - display_total_spent
                          - metadata
                          - active
                          - total_spent
                          - customer_notes
                          - addresses
                          - active_subscriptions_count
                          - inactive_subscriptions_count
                          - is_rep
                          - jwt
                      variant:
                        title: Variant
                        type: object
                        properties:
                          id:
                            type: integer
                          title:
                            example: Variant 1
                            type:
                              - string
                              - 'null'
                          image_url:
                            example: https://via.placeholder.com/150
                            type:
                              - string
                              - 'null'
                          image_path:
                            example: https://via.placeholder.com/150
                            type:
                              - string
                              - 'null'
                          sku:
                            example: SKU-123456
                            type:
                              - string
                              - 'null'
                          primary_image:
                            example: https://via.placeholder.com/150
                            type:
                              - string
                              - 'null'
                          price:
                            example: 100
                            type:
                              - number
                              - 'null'
                          price_in_currency:
                            example: USD 100.00
                            type: string
                          options:
                            items:
                              type: object
                              properties:
                                title:
                                  type: string
                                  example: Size
                                value:
                                  type: string
                                  example: XL
                            type: array
                          product:
                            title: Product
                            type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              image_url:
                                type:
                                  - string
                                  - 'null'
                              image_path:
                                type:
                                  - string
                                  - 'null'
                              price:
                                type:
                                  - number
                                  - string
                                  - 'null'
                                default: '0.0'
                                minimum: 0
                                maximum: 99999999
                              cv:
                                type:
                                  - integer
                                  - 'null'
                                default: 0
                              tax:
                                type:
                                  - number
                                  - string
                                  - 'null'
                                default: '0.0'
                              sku:
                                type:
                                  - string
                                  - 'null'
                              price_in_currency:
                                type: string
                              tax_in_currency:
                                type: string
                              cv_in_currency:
                                type: string
                            required:
                              - id
                              - title
                              - price_in_currency
                              - tax_in_currency
                              - cv_in_currency
                        required:
                          - id
                          - price_in_currency
                          - options
                          - product
                      address:
                        title: Address
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: John Doe
                            type: string
                          address1:
                            example: 123 Main St
                            type: string
                          address2:
                            example: Apt 4B
                            type:
                              - string
                              - 'null'
                          address3:
                            example: Building 5
                            type:
                              - string
                              - 'null'
                          city:
                            example: New York
                            type: string
                          state:
                            example: NY
                            type: string
                          subdivision_code:
                            example: NY
                            type:
                              - string
                              - 'null'
                          postal_code:
                            example: '10001'
                            type: string
                          country_code:
                            example: US
                            type:
                              - string
                              - 'null'
                          default:
                            description: >-
                              Use this address by default when there are
                              multiple addresses
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: false
                          first_name:
                            example: John
                            type: string
                          last_name:
                            example: Doe
                            type: string
                        required:
                          - id
                          - name
                          - address1
                          - city
                          - state
                          - postal_code
                          - first_name
                          - last_name
                      payment_method:
                        title: Commerce::PaymentMethod
                        type: object
                        properties:
                          id:
                            type: integer
                          source:
                            type: string
                            enum:
                              - apple_pay
                              - paypal
                              - card
                              - iap
                              - bread
                              - affirm
                              - google_pay
                              - klarna
                              - droplet
                          created_at:
                            type: string
                            format: date-time
                          updated_at:
                            type: string
                            format: date-time
                          default:
                            type: boolean
                          payment_type:
                            example: Credit Card
                            type: string
                          details:
                            type: object
                        required:
                          - id
                          - source
                          - created_at
                          - updated_at
                          - default
                          - payment_type
                          - details
                      currency:
                        title: Currency
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: United States Dollar
                            type:
                              - string
                              - 'null'
                          code:
                            example: USD
                            type: string
                          rate:
                            example: 1
                            type:
                              - number
                              - string
                              - 'null'
                          active:
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: false
                          symbol:
                            example: $
                            type:
                              - string
                              - 'null'
                        required:
                          - id
                          - code
                      country:
                        title: Country
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: United States
                            type: string
                          iso:
                            description: 2-letter country code (ISO 3166-1 alpha-2)
                            example: US
                            type: string
                        required:
                          - id
                          - name
                          - iso
                      company:
                        title: Company
                        type: object
                        properties:
                          id:
                            type: integer
                        required:
                          - id
                      subscription_skips:
                        type: array
                        items:
                          title: Commerce::SubscriptionSkip
                          type: object
                          properties:
                            id:
                              type: integer
                            skipped_date:
                              example: '2025-01-01T00:00:00Z'
                              type: string
                              format: date
                            reason:
                              example: Customer requested to skip next billing
                              type:
                                - 'null'
                            created_at:
                              example: '2025-01-01T00:00:00Z'
                              type: string
                              format: date-time
                            updated_at:
                              example: '2025-01-01T00:00:00Z'
                              type: string
                              format: date-time
                          required:
                            - id
                            - skipped_date
                            - created_at
                            - updated_at
                      orders:
                        type: array
                        items:
                          title: Commerce::Order
                          type: object
                          properties:
                            id:
                              type: integer
                            first_name:
                              type:
                                - string
                                - 'null'
                            last_name:
                              type:
                                - string
                                - 'null'
                            email:
                              type:
                                - string
                                - 'null'
                            phone:
                              type:
                                - string
                                - 'null'
                            order_number:
                              type:
                                - string
                                - 'null'
                            status:
                              type: string
                              enum:
                                - awaiting_payment
                                - awaiting_shipment
                                - shipped
                                - delivered
                                - archived
                                - cancelled
                                - failed_payment
                                - draft
                            order_type:
                              type: string
                              enum:
                                - requested
                                - purchased
                                - imported
                                - abandoned
                            amount:
                              type:
                                - number
                                - string
                                - 'null'
                              default: '0.0'
                            note:
                              type:
                                - string
                                - 'null'
                            currency_code:
                              type:
                                - string
                                - 'null'
                            created_at:
                              type: string
                              format: date-time
                            updated_at:
                              type: string
                              format: date-time
                            metadata:
                              type:
                                - object
                                - 'null'
                              default: '{}'
                            token:
                              type: string
                            refundable_amount:
                              type: string
                            shipping_method:
                              title: ShippingMethod
                              type:
                                - object
                                - 'null'
                              properties:
                                id:
                                  type: integer
                                name:
                                  type: string
                                delivery_time_estimate:
                                  type:
                                    - string
                                    - 'null'
                              required:
                                - id
                                - name
                            items_quantity:
                              example: 5
                              type: integer
                          required:
                            - id
                            - status
                            - order_type
                            - created_at
                            - updated_at
                            - token
                            - refundable_amount
                            - items_quantity
                    required:
                      - id
                      - next_bill_date
                      - status
                      - quantity
                      - price
                      - original_price
                      - created_at
                      - updated_at
                      - in_trial
                      - subscription_plan
                      - customer
                      - variant
                      - address
                      - payment_method
                      - currency
                      - country
                      - company
                      - subscription_skips
                      - orders
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - subscription
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
    put:
      summary: Update a subscription
      description: Update a subscription
      tags:
        - Subscriptions
      operationId: updateSubscription
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscription:
                    title: Commerce::Subscription
                    type: object
                    properties:
                      id:
                        type: integer
                      next_bill_date:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date
                      last_bill_date:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date
                      next_ship_date:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date
                      last_ship_date:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date
                      status:
                        example: active
                        type: string
                        enum:
                          - pending
                          - active
                          - paused
                          - past_due
                          - cancelled
                          - trial
                      disabled:
                        example: false
                        type:
                          - boolean
                          - 'null'
                        default: false
                      quantity:
                        example: 1
                        type: integer
                        default: 1
                        minimum: 1
                      price:
                        example: 100
                        type: number
                      original_price:
                        example: 100
                        type: number
                      attempts:
                        example: 1
                        type:
                          - integer
                          - 'null'
                        default: 0
                      last_failed_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      next_retry_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      skipped_count:
                        example: 1
                        type:
                          - integer
                          - 'null'
                        default: 0
                      max_skips:
                        example: 1
                        type:
                          - integer
                          - 'null'
                      trial_ends_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      cancelled_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      created_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      updated_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      notes:
                        example: This is a sample commerce subscription
                        type:
                          - string
                          - 'null'
                      in_trial:
                        example: false
                        type: boolean
                      subscription_plan:
                        title: Commerce::SubscriptionPlan
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: Test Subscription Plan
                            type: string
                          billing_interval:
                            example: 1
                            type: integer
                            default: 1
                            minimum: 1
                          billing_interval_unit:
                            description: 'Possible values: `day`, `week`, `month`, `year`'
                            example: day
                            type: string
                            default: month
                          shipping_interval:
                            example: 1
                            type: integer
                            default: 1
                            minimum: 1
                          shipping_interval_unit:
                            description: 'Possible values: `day`, `week`, `month`, `year`'
                            example: day
                            type: string
                            default: month
                          trial_period:
                            example: 1
                            type:
                              - integer
                              - 'null'
                            minimum: 1
                          trial_period_unit:
                            description: 'Possible values: `day`, `week`, `month`, `year`'
                            example: day
                            type:
                              - string
                              - 'null'
                          split_volume:
                            example: true
                            type: boolean
                            default: false
                          allow_skipping:
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: true
                          max_skips:
                            example: 1
                            type:
                              - integer
                              - 'null'
                            minimum: 1
                          price_adjustment_type:
                            example: percentage or fixed_amount
                            type:
                              - string
                              - 'null'
                          price_adjustment_amount:
                            example: 10
                            type:
                              - number
                              - 'null'
                          max_quantity:
                            example: 100
                            type:
                              - integer
                              - 'null'
                            minimum: 1
                          active:
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: true
                          company_default:
                            example: false
                            type:
                              - boolean
                              - 'null'
                            default: false
                          created_at:
                            example: '2025-03-10T00:00:00Z'
                            type: string
                            format: date-time
                          updated_at:
                            example: '2025-03-10T00:00:00Z'
                            type: string
                            format: date-time
                          products_count:
                            example: 10
                            type:
                              - integer
                              - 'null'
                          subscribers_count:
                            example: 10
                            type:
                              - integer
                              - 'null'
                        required:
                          - id
                          - name
                          - billing_interval
                          - billing_interval_unit
                          - shipping_interval
                          - shipping_interval_unit
                          - split_volume
                          - created_at
                          - updated_at
                      customer:
                        title: Customer
                        type: object
                        properties:
                          id:
                            type: integer
                          account_id:
                            type:
                              - string
                              - 'null'
                          first_name:
                            type:
                              - string
                              - 'null'
                          last_name:
                            type:
                              - string
                              - 'null'
                          full_name:
                            type: string
                          email:
                            type: string
                            pattern: >-
                              \A[a-zA-Z0-9.!\#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\z
                          verified_email:
                            type:
                              - boolean
                              - 'null'
                            default: false
                          phone:
                            type:
                              - string
                              - 'null'
                          orders_count:
                            type:
                              - integer
                              - 'null'
                            default: 0
                          created_at:
                            type: string
                            format: date-time
                          display_total_spent:
                            type: string
                          metadata:
                            type: object
                            default: '{}'
                          user_company_id:
                            type:
                              - integer
                              - 'null'
                          external_id:
                            type:
                              - string
                              - 'null'
                          last_order_id:
                            example: 101
                            type:
                              - integer
                              - 'null'
                          notes:
                            example: This is a note
                            type:
                              - string
                              - 'null'
                          active:
                            type: boolean
                          total_spent:
                            example: 100
                            type:
                              - number
                              - string
                          customer_notes:
                            type: array
                            items:
                              title: CustomerNote
                              type: object
                              properties:
                                id:
                                  type: integer
                                note:
                                  type: string
                                user_company_id:
                                  type:
                                    - integer
                                    - 'null'
                                customer_id:
                                  type: integer
                                resource_id:
                                  type:
                                    - integer
                                    - 'null'
                                resource_type:
                                  type:
                                    - string
                                    - 'null'
                                created_at:
                                  type: string
                                  format: date-time
                              required:
                                - id
                                - note
                                - customer_id
                                - created_at
                          default_address:
                            title: Address
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                              name:
                                example: John Doe
                                type: string
                              address1:
                                example: 123 Main St
                                type: string
                              address2:
                                example: Apt 4B
                                type:
                                  - string
                                  - 'null'
                              address3:
                                example: Building 5
                                type:
                                  - string
                                  - 'null'
                              city:
                                example: New York
                                type: string
                              state:
                                example: NY
                                type: string
                              subdivision_code:
                                example: NY
                                type:
                                  - string
                                  - 'null'
                              postal_code:
                                example: '10001'
                                type: string
                              country_code:
                                example: US
                                type:
                                  - string
                                  - 'null'
                              default:
                                description: >-
                                  Use this address by default when there are
                                  multiple addresses
                                example: true
                                type:
                                  - boolean
                                  - 'null'
                                default: false
                              first_name:
                                example: John
                                type: string
                              last_name:
                                example: Doe
                                type: string
                            required:
                              - id
                              - name
                              - address1
                              - city
                              - state
                              - postal_code
                              - first_name
                              - last_name
                          addresses:
                            type: array
                            items:
                              title: Address
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  example: John Doe
                                  type: string
                                address1:
                                  example: 123 Main St
                                  type: string
                                address2:
                                  example: Apt 4B
                                  type:
                                    - string
                                    - 'null'
                                address3:
                                  example: Building 5
                                  type:
                                    - string
                                    - 'null'
                                city:
                                  example: New York
                                  type: string
                                state:
                                  example: NY
                                  type: string
                                subdivision_code:
                                  example: NY
                                  type:
                                    - string
                                    - 'null'
                                postal_code:
                                  example: '10001'
                                  type: string
                                country_code:
                                  example: US
                                  type:
                                    - string
                                    - 'null'
                                default:
                                  description: >-
                                    Use this address by default when there are
                                    multiple addresses
                                  example: true
                                  type:
                                    - boolean
                                    - 'null'
                                  default: false
                                first_name:
                                  example: John
                                  type: string
                                last_name:
                                  example: Doe
                                  type: string
                              required:
                                - id
                                - name
                                - address1
                                - city
                                - state
                                - postal_code
                                - first_name
                                - last_name
                          active_subscriptions_count:
                            example: 10
                            type: integer
                          inactive_subscriptions_count:
                            example: 10
                            type: integer
                          is_rep:
                            example: true
                            type: boolean
                        required:
                          - id
                          - full_name
                          - email
                          - created_at
                          - display_total_spent
                          - metadata
                          - active
                          - total_spent
                          - customer_notes
                          - addresses
                          - active_subscriptions_count
                          - inactive_subscriptions_count
                          - is_rep
                      variant:
                        title: Variant
                        type: object
                        properties:
                          id:
                            type: integer
                          title:
                            example: Variant 1
                            type:
                              - string
                              - 'null'
                          image_url:
                            example: https://via.placeholder.com/150
                            type:
                              - string
                              - 'null'
                          image_path:
                            example: https://via.placeholder.com/150
                            type:
                              - string
                              - 'null'
                          sku:
                            example: SKU-123456
                            type:
                              - string
                              - 'null'
                          primary_image:
                            example: https://via.placeholder.com/150
                            type:
                              - string
                              - 'null'
                          price:
                            example: 100
                            type:
                              - number
                              - 'null'
                          price_in_currency:
                            example: USD 100.00
                            type: string
                          options:
                            items:
                              type: object
                              properties:
                                title:
                                  type: string
                                  example: Size
                                value:
                                  type: string
                                  example: XL
                            type: array
                          product:
                            title: Product
                            type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              image_url:
                                type:
                                  - string
                                  - 'null'
                              image_path:
                                type:
                                  - string
                                  - 'null'
                              price:
                                type:
                                  - number
                                  - string
                                  - 'null'
                                default: '0.0'
                                minimum: 0
                                maximum: 99999999
                              cv:
                                type:
                                  - integer
                                  - 'null'
                                default: 0
                              tax:
                                type:
                                  - number
                                  - string
                                  - 'null'
                                default: '0.0'
                              sku:
                                type:
                                  - string
                                  - 'null'
                              price_in_currency:
                                type: string
                              tax_in_currency:
                                type: string
                              cv_in_currency:
                                type: string
                            required:
                              - id
                              - title
                              - price_in_currency
                              - tax_in_currency
                              - cv_in_currency
                        required:
                          - id
                          - price_in_currency
                          - options
                          - product
                      address:
                        title: Address
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: John Doe
                            type: string
                          address1:
                            example: 123 Main St
                            type: string
                          address2:
                            example: Apt 4B
                            type:
                              - string
                              - 'null'
                          address3:
                            example: Building 5
                            type:
                              - string
                              - 'null'
                          city:
                            example: New York
                            type: string
                          state:
                            example: NY
                            type: string
                          subdivision_code:
                            example: NY
                            type:
                              - string
                              - 'null'
                          postal_code:
                            example: '10001'
                            type: string
                          country_code:
                            example: US
                            type:
                              - string
                              - 'null'
                          default:
                            description: >-
                              Use this address by default when there are
                              multiple addresses
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: false
                          first_name:
                            example: John
                            type: string
                          last_name:
                            example: Doe
                            type: string
                        required:
                          - id
                          - name
                          - address1
                          - city
                          - state
                          - postal_code
                          - first_name
                          - last_name
                      payment_method:
                        title: Commerce::PaymentMethod
                        type: object
                        properties:
                          id:
                            type: integer
                          source:
                            type: string
                            enum:
                              - apple_pay
                              - paypal
                              - card
                              - iap
                              - bread
                              - affirm
                              - google_pay
                              - klarna
                              - droplet
                          created_at:
                            type: string
                            format: date-time
                          updated_at:
                            type: string
                            format: date-time
                          default:
                            type: boolean
                          payment_type:
                            example: Credit Card
                            type: string
                          details:
                            type: object
                        required:
                          - id
                          - source
                          - created_at
                          - updated_at
                          - default
                          - payment_type
                          - details
                      currency:
                        title: Currency
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: United States Dollar
                            type:
                              - string
                              - 'null'
                          code:
                            example: USD
                            type: string
                          rate:
                            example: 1
                            type:
                              - number
                              - string
                              - 'null'
                          active:
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: false
                          symbol:
                            example: $
                            type:
                              - string
                              - 'null'
                        required:
                          - id
                          - code
                      country:
                        title: Country
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: United States
                            type: string
                          iso:
                            description: 2-letter country code (ISO 3166-1 alpha-2)
                            example: US
                            type: string
                        required:
                          - id
                          - name
                          - iso
                      company:
                        title: Company
                        type: object
                        properties:
                          id:
                            type: integer
                        required:
                          - id
                      subscription_skips:
                        type: array
                        items:
                          title: Commerce::SubscriptionSkip
                          type: object
                          properties:
                            id:
                              type: integer
                            skipped_date:
                              example: '2025-01-01T00:00:00Z'
                              type: string
                              format: date
                            reason:
                              example: Customer requested to skip next billing
                              type:
                                - 'null'
                            created_at:
                              example: '2025-01-01T00:00:00Z'
                              type: string
                              format: date-time
                            updated_at:
                              example: '2025-01-01T00:00:00Z'
                              type: string
                              format: date-time
                          required:
                            - id
                            - skipped_date
                            - created_at
                            - updated_at
                      orders:
                        type: array
                        items:
                          title: Commerce::Order
                          type: object
                          properties:
                            id:
                              type: integer
                            first_name:
                              type:
                                - string
                                - 'null'
                            last_name:
                              type:
                                - string
                                - 'null'
                            email:
                              type:
                                - string
                                - 'null'
                            phone:
                              type:
                                - string
                                - 'null'
                            order_number:
                              type:
                                - string
                                - 'null'
                            status:
                              type: string
                              enum:
                                - awaiting_payment
                                - awaiting_shipment
                                - shipped
                                - delivered
                                - archived
                                - cancelled
                                - failed_payment
                                - draft
                            order_type:
                              type: string
                              enum:
                                - requested
                                - purchased
                                - imported
                                - abandoned
                            amount:
                              type:
                                - number
                                - string
                                - 'null'
                              default: '0.0'
                            note:
                              type:
                                - string
                                - 'null'
                            currency_code:
                              type:
                                - string
                                - 'null'
                            created_at:
                              type: string
                              format: date-time
                            updated_at:
                              type: string
                              format: date-time
                            metadata:
                              type:
                                - object
                                - 'null'
                              default: '{}'
                            token:
                              type: string
                            refundable_amount:
                              type: string
                            shipping_method:
                              title: ShippingMethod
                              type:
                                - object
                                - 'null'
                              properties:
                                id:
                                  type: integer
                                name:
                                  type: string
                                delivery_time_estimate:
                                  type:
                                    - string
                                    - 'null'
                              required:
                                - id
                                - name
                            items_quantity:
                              example: 5
                              type: integer
                          required:
                            - id
                            - status
                            - order_type
                            - created_at
                            - updated_at
                            - token
                            - refundable_amount
                            - items_quantity
                    required:
                      - id
                      - next_bill_date
                      - status
                      - quantity
                      - price
                      - original_price
                      - created_at
                      - updated_at
                      - in_trial
                      - subscription_plan
                      - customer
                      - variant
                      - address
                      - payment_method
                      - currency
                      - country
                      - company
                      - subscription_skips
                      - orders
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - subscription
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                subscription:
                  type: object
                  properties:
                    subscription_plan_id:
                      type: integer
                    customer_id:
                      type: integer
                    variant_id:
                      type: integer
                    address_id:
                      type: integer
                    payment_method_id:
                      type: integer
                    order_item_id:
                      type: integer
                    status:
                      type: string
                    disabled:
                      type: boolean
                    quantity:
                      type: integer
                    metadata:
                      type: object
                    notes:
                      type: string
                    next_bill_date:
                      type: string
                      format: date-time
                  required:
                    - subscription_plan_id
                    - customer_id
                    - variant_id
                    - address_id
                    - payment_method_id
                id:
                  type: integer
              required:
                - subscription
                - id
        description: >-
          Subscription params. next_bill_date (YYYY-MM-DD) calculated internally
          if not provided.
  /api/subscriptions/{id}/pause:
    post:
      summary: Pause a subscription
      description: Pause a subscription with a future resume date
      tags:
        - Subscriptions
      operationId: pauseSubscription
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
        - name: customer_id
          in: query
          required: true
          schema:
            type: integer
        - name: next_bill_date
          in: query
          schema:
            type: string
            format: date
          required: true
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscription:
                    title: Commerce::Subscription
                    type: object
                    properties:
                      id:
                        type: integer
                      next_bill_date:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date
                      last_bill_date:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date
                      next_ship_date:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date
                      last_ship_date:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date
                      status:
                        example: active
                        type: string
                        enum:
                          - pending
                          - active
                          - paused
                          - past_due
                          - cancelled
                          - trial
                      disabled:
                        example: false
                        type:
                          - boolean
                          - 'null'
                        default: false
                      quantity:
                        example: 1
                        type: integer
                        default: 1
                        minimum: 1
                      price:
                        example: 100
                        type: number
                      original_price:
                        example: 100
                        type: number
                      attempts:
                        example: 1
                        type:
                          - integer
                          - 'null'
                        default: 0
                      last_failed_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      next_retry_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      skipped_count:
                        example: 1
                        type:
                          - integer
                          - 'null'
                        default: 0
                      max_skips:
                        example: 1
                        type:
                          - integer
                          - 'null'
                      trial_ends_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      cancelled_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      created_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      updated_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      notes:
                        example: This is a sample commerce subscription
                        type:
                          - string
                          - 'null'
                      in_trial:
                        example: false
                        type: boolean
                      subscription_plan:
                        title: Commerce::SubscriptionPlan
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: Test Subscription Plan
                            type: string
                          billing_interval:
                            example: 1
                            type: integer
                            default: 1
                            minimum: 1
                          billing_interval_unit:
                            description: 'Possible values: `day`, `week`, `month`, `year`'
                            example: day
                            type: string
                            default: month
                          shipping_interval:
                            example: 1
                            type: integer
                            default: 1
                            minimum: 1
                          shipping_interval_unit:
                            description: 'Possible values: `day`, `week`, `month`, `year`'
                            example: day
                            type: string
                            default: month
                          trial_period:
                            example: 1
                            type:
                              - integer
                              - 'null'
                            minimum: 1
                          trial_period_unit:
                            description: 'Possible values: `day`, `week`, `month`, `year`'
                            example: day
                            type:
                              - string
                              - 'null'
                          split_volume:
                            example: true
                            type: boolean
                            default: false
                          allow_skipping:
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: true
                          max_skips:
                            example: 1
                            type:
                              - integer
                              - 'null'
                            minimum: 1
                          price_adjustment_type:
                            example: percentage or fixed_amount
                            type:
                              - string
                              - 'null'
                          price_adjustment_amount:
                            example: 10
                            type:
                              - number
                              - 'null'
                          max_quantity:
                            example: 100
                            type:
                              - integer
                              - 'null'
                            minimum: 1
                          active:
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: true
                          company_default:
                            example: false
                            type:
                              - boolean
                              - 'null'
                            default: false
                          created_at:
                            example: '2025-03-10T00:00:00Z'
                            type: string
                            format: date-time
                          updated_at:
                            example: '2025-03-10T00:00:00Z'
                            type: string
                            format: date-time
                          products_count:
                            example: 10
                            type:
                              - integer
                              - 'null'
                          subscribers_count:
                            example: 10
                            type:
                              - integer
                              - 'null'
                        required:
                          - id
                          - name
                          - billing_interval
                          - billing_interval_unit
                          - shipping_interval
                          - shipping_interval_unit
                          - split_volume
                          - created_at
                          - updated_at
                      customer:
                        title: Customer
                        type: object
                        properties:
                          id:
                            type: integer
                          account_id:
                            type:
                              - string
                              - 'null'
                          first_name:
                            type:
                              - string
                              - 'null'
                          last_name:
                            type:
                              - string
                              - 'null'
                          full_name:
                            type: string
                          email:
                            type: string
                            pattern: >-
                              \A[a-zA-Z0-9.!\#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\z
                          verified_email:
                            type:
                              - boolean
                              - 'null'
                            default: false
                          phone:
                            type:
                              - string
                              - 'null'
                          orders_count:
                            type:
                              - integer
                              - 'null'
                            default: 0
                          created_at:
                            type: string
                            format: date-time
                          display_total_spent:
                            type: string
                          metadata:
                            type: object
                            default: '{}'
                          user_company_id:
                            type:
                              - integer
                              - 'null'
                          external_id:
                            type:
                              - string
                              - 'null'
                          last_order_id:
                            example: 101
                            type:
                              - integer
                              - 'null'
                          notes:
                            example: This is a note
                            type:
                              - string
                              - 'null'
                          active:
                            type: boolean
                          total_spent:
                            example: 100
                            type:
                              - number
                              - string
                          customer_notes:
                            type: array
                            items:
                              title: CustomerNote
                              type: object
                              properties:
                                id:
                                  type: integer
                                note:
                                  type: string
                                user_company_id:
                                  type:
                                    - integer
                                    - 'null'
                                customer_id:
                                  type: integer
                                resource_id:
                                  type:
                                    - integer
                                    - 'null'
                                resource_type:
                                  type:
                                    - string
                                    - 'null'
                                created_at:
                                  type: string
                                  format: date-time
                              required:
                                - id
                                - note
                                - customer_id
                                - created_at
                          default_address:
                            title: Address
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                              name:
                                example: John Doe
                                type: string
                              address1:
                                example: 123 Main St
                                type: string
                              address2:
                                example: Apt 4B
                                type:
                                  - string
                                  - 'null'
                              address3:
                                example: Building 5
                                type:
                                  - string
                                  - 'null'
                              city:
                                example: New York
                                type: string
                              state:
                                example: NY
                                type: string
                              subdivision_code:
                                example: NY
                                type:
                                  - string
                                  - 'null'
                              postal_code:
                                example: '10001'
                                type: string
                              country_code:
                                example: US
                                type:
                                  - string
                                  - 'null'
                              default:
                                description: >-
                                  Use this address by default when there are
                                  multiple addresses
                                example: true
                                type:
                                  - boolean
                                  - 'null'
                                default: false
                              first_name:
                                example: John
                                type: string
                              last_name:
                                example: Doe
                                type: string
                            required:
                              - id
                              - name
                              - address1
                              - city
                              - state
                              - postal_code
                              - first_name
                              - last_name
                          addresses:
                            type: array
                            items:
                              title: Address
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  example: John Doe
                                  type: string
                                address1:
                                  example: 123 Main St
                                  type: string
                                address2:
                                  example: Apt 4B
                                  type:
                                    - string
                                    - 'null'
                                address3:
                                  example: Building 5
                                  type:
                                    - string
                                    - 'null'
                                city:
                                  example: New York
                                  type: string
                                state:
                                  example: NY
                                  type: string
                                subdivision_code:
                                  example: NY
                                  type:
                                    - string
                                    - 'null'
                                postal_code:
                                  example: '10001'
                                  type: string
                                country_code:
                                  example: US
                                  type:
                                    - string
                                    - 'null'
                                default:
                                  description: >-
                                    Use this address by default when there are
                                    multiple addresses
                                  example: true
                                  type:
                                    - boolean
                                    - 'null'
                                  default: false
                                first_name:
                                  example: John
                                  type: string
                                last_name:
                                  example: Doe
                                  type: string
                              required:
                                - id
                                - name
                                - address1
                                - city
                                - state
                                - postal_code
                                - first_name
                                - last_name
                          active_subscriptions_count:
                            example: 10
                            type: integer
                          inactive_subscriptions_count:
                            example: 10
                            type: integer
                          is_rep:
                            example: true
                            type: boolean
                        required:
                          - id
                          - full_name
                          - email
                          - created_at
                          - display_total_spent
                          - metadata
                          - active
                          - total_spent
                          - customer_notes
                          - addresses
                          - active_subscriptions_count
                          - inactive_subscriptions_count
                          - is_rep
                      variant:
                        title: Variant
                        type: object
                        properties:
                          id:
                            type: integer
                          title:
                            example: Variant 1
                            type:
                              - string
                              - 'null'
                          image_url:
                            example: https://via.placeholder.com/150
                            type:
                              - string
                              - 'null'
                          image_path:
                            example: https://via.placeholder.com/150
                            type:
                              - string
                              - 'null'
                          sku:
                            example: SKU-123456
                            type:
                              - string
                              - 'null'
                          primary_image:
                            example: https://via.placeholder.com/150
                            type:
                              - string
                              - 'null'
                          price:
                            example: 100
                            type:
                              - number
                              - 'null'
                          price_in_currency:
                            example: USD 100.00
                            type: string
                          options:
                            items:
                              type: object
                              properties:
                                title:
                                  type: string
                                  example: Size
                                value:
                                  type: string
                                  example: XL
                            type: array
                          product:
                            title: Product
                            type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              image_url:
                                type:
                                  - string
                                  - 'null'
                              image_path:
                                type:
                                  - string
                                  - 'null'
                              price:
                                type:
                                  - number
                                  - string
                                  - 'null'
                                default: '0.0'
                                minimum: 0
                                maximum: 99999999
                              cv:
                                type:
                                  - integer
                                  - 'null'
                                default: 0
                              tax:
                                type:
                                  - number
                                  - string
                                  - 'null'
                                default: '0.0'
                              sku:
                                type:
                                  - string
                                  - 'null'
                              price_in_currency:
                                type: string
                              tax_in_currency:
                                type: string
                              cv_in_currency:
                                type: string
                            required:
                              - id
                              - title
                              - price_in_currency
                              - tax_in_currency
                              - cv_in_currency
                        required:
                          - id
                          - price_in_currency
                          - options
                          - product
                      address:
                        title: Address
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: John Doe
                            type: string
                          address1:
                            example: 123 Main St
                            type: string
                          address2:
                            example: Apt 4B
                            type:
                              - string
                              - 'null'
                          address3:
                            example: Building 5
                            type:
                              - string
                              - 'null'
                          city:
                            example: New York
                            type: string
                          state:
                            example: NY
                            type: string
                          subdivision_code:
                            example: NY
                            type:
                              - string
                              - 'null'
                          postal_code:
                            example: '10001'
                            type: string
                          country_code:
                            example: US
                            type:
                              - string
                              - 'null'
                          default:
                            description: >-
                              Use this address by default when there are
                              multiple addresses
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: false
                          first_name:
                            example: John
                            type: string
                          last_name:
                            example: Doe
                            type: string
                        required:
                          - id
                          - name
                          - address1
                          - city
                          - state
                          - postal_code
                          - first_name
                          - last_name
                      payment_method:
                        title: Commerce::PaymentMethod
                        type: object
                        properties:
                          id:
                            type: integer
                          source:
                            type: string
                            enum:
                              - apple_pay
                              - paypal
                              - card
                              - iap
                              - bread
                              - affirm
                              - google_pay
                              - klarna
                              - droplet
                          created_at:
                            type: string
                            format: date-time
                          updated_at:
                            type: string
                            format: date-time
                          default:
                            type: boolean
                          payment_type:
                            example: Credit Card
                            type: string
                          details:
                            type: object
                        required:
                          - id
                          - source
                          - created_at
                          - updated_at
                          - default
                          - payment_type
                          - details
                      currency:
                        title: Currency
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: United States Dollar
                            type:
                              - string
                              - 'null'
                          code:
                            example: USD
                            type: string
                          rate:
                            example: 1
                            type:
                              - number
                              - string
                              - 'null'
                          active:
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: false
                          symbol:
                            example: $
                            type:
                              - string
                              - 'null'
                        required:
                          - id
                          - code
                      country:
                        title: Country
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: United States
                            type: string
                          iso:
                            description: 2-letter country code (ISO 3166-1 alpha-2)
                            example: US
                            type: string
                        required:
                          - id
                          - name
                          - iso
                      company:
                        title: Company
                        type: object
                        properties:
                          id:
                            type: integer
                        required:
                          - id
                      subscription_skips:
                        type: array
                        items:
                          title: Commerce::SubscriptionSkip
                          type: object
                          properties:
                            id:
                              type: integer
                            skipped_date:
                              example: '2025-01-01T00:00:00Z'
                              type: string
                              format: date
                            reason:
                              example: Customer requested to skip next billing
                              type:
                                - 'null'
                            created_at:
                              example: '2025-01-01T00:00:00Z'
                              type: string
                              format: date-time
                            updated_at:
                              example: '2025-01-01T00:00:00Z'
                              type: string
                              format: date-time
                          required:
                            - id
                            - skipped_date
                            - created_at
                            - updated_at
                      orders:
                        type: array
                        items:
                          title: Commerce::Order
                          type: object
                          properties:
                            id:
                              type: integer
                            first_name:
                              type:
                                - string
                                - 'null'
                            last_name:
                              type:
                                - string
                                - 'null'
                            email:
                              type:
                                - string
                                - 'null'
                            phone:
                              type:
                                - string
                                - 'null'
                            order_number:
                              type:
                                - string
                                - 'null'
                            status:
                              type: string
                              enum:
                                - awaiting_payment
                                - awaiting_shipment
                                - shipped
                                - delivered
                                - archived
                                - cancelled
                                - failed_payment
                                - draft
                            order_type:
                              type: string
                              enum:
                                - requested
                                - purchased
                                - imported
                                - abandoned
                            amount:
                              type:
                                - number
                                - string
                                - 'null'
                              default: '0.0'
                            note:
                              type:
                                - string
                                - 'null'
                            currency_code:
                              type:
                                - string
                                - 'null'
                            created_at:
                              type: string
                              format: date-time
                            updated_at:
                              type: string
                              format: date-time
                            metadata:
                              type:
                                - object
                                - 'null'
                              default: '{}'
                            token:
                              type: string
                            refundable_amount:
                              type: string
                            shipping_method:
                              title: ShippingMethod
                              type:
                                - object
                                - 'null'
                              properties:
                                id:
                                  type: integer
                                name:
                                  type: string
                                delivery_time_estimate:
                                  type:
                                    - string
                                    - 'null'
                              required:
                                - id
                                - name
                            items_quantity:
                              example: 5
                              type: integer
                          required:
                            - id
                            - status
                            - order_type
                            - created_at
                            - updated_at
                            - token
                            - refundable_amount
                            - items_quantity
                    required:
                      - id
                      - next_bill_date
                      - status
                      - quantity
                      - price
                      - original_price
                      - created_at
                      - updated_at
                      - in_trial
                      - subscription_plan
                      - customer
                      - variant
                      - address
                      - payment_method
                      - currency
                      - country
                      - company
                      - subscription_skips
                      - orders
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - subscription
        '404':
          description: not found - customer
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: unprocessable entity - past date
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
  /api/subscriptions/{id}/resume:
    post:
      summary: Resume a paused subscription
      description: Resume a previously paused subscription
      tags:
        - Subscriptions
      operationId: resumeSubscription
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
        - name: customer_id
          in: query
          required: true
          schema:
            type: integer
        - name: next_bill_date
          in: query
          schema:
            type: string
            format: date
          required: false
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscription:
                    title: Commerce::Subscription
                    type: object
                    properties:
                      id:
                        type: integer
                      next_bill_date:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date
                      last_bill_date:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date
                      next_ship_date:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date
                      last_ship_date:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date
                      status:
                        example: active
                        type: string
                        enum:
                          - pending
                          - active
                          - paused
                          - past_due
                          - cancelled
                          - trial
                      disabled:
                        example: false
                        type:
                          - boolean
                          - 'null'
                        default: false
                      quantity:
                        example: 1
                        type: integer
                        default: 1
                        minimum: 1
                      price:
                        example: 100
                        type: number
                      original_price:
                        example: 100
                        type: number
                      attempts:
                        example: 1
                        type:
                          - integer
                          - 'null'
                        default: 0
                      last_failed_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      next_retry_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      skipped_count:
                        example: 1
                        type:
                          - integer
                          - 'null'
                        default: 0
                      max_skips:
                        example: 1
                        type:
                          - integer
                          - 'null'
                      trial_ends_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      cancelled_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      created_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      updated_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      notes:
                        example: This is a sample commerce subscription
                        type:
                          - string
                          - 'null'
                      in_trial:
                        example: false
                        type: boolean
                      subscription_plan:
                        title: Commerce::SubscriptionPlan
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: Test Subscription Plan
                            type: string
                          billing_interval:
                            example: 1
                            type: integer
                            default: 1
                            minimum: 1
                          billing_interval_unit:
                            description: 'Possible values: `day`, `week`, `month`, `year`'
                            example: day
                            type: string
                            default: month
                          shipping_interval:
                            example: 1
                            type: integer
                            default: 1
                            minimum: 1
                          shipping_interval_unit:
                            description: 'Possible values: `day`, `week`, `month`, `year`'
                            example: day
                            type: string
                            default: month
                          trial_period:
                            example: 1
                            type:
                              - integer
                              - 'null'
                            minimum: 1
                          trial_period_unit:
                            description: 'Possible values: `day`, `week`, `month`, `year`'
                            example: day
                            type:
                              - string
                              - 'null'
                          split_volume:
                            example: true
                            type: boolean
                            default: false
                          allow_skipping:
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: true
                          max_skips:
                            example: 1
                            type:
                              - integer
                              - 'null'
                            minimum: 1
                          price_adjustment_type:
                            example: percentage or fixed_amount
                            type:
                              - string
                              - 'null'
                          price_adjustment_amount:
                            example: 10
                            type:
                              - number
                              - 'null'
                          max_quantity:
                            example: 100
                            type:
                              - integer
                              - 'null'
                            minimum: 1
                          active:
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: true
                          company_default:
                            example: false
                            type:
                              - boolean
                              - 'null'
                            default: false
                          created_at:
                            example: '2025-03-10T00:00:00Z'
                            type: string
                            format: date-time
                          updated_at:
                            example: '2025-03-10T00:00:00Z'
                            type: string
                            format: date-time
                          products_count:
                            example: 10
                            type:
                              - integer
                              - 'null'
                          subscribers_count:
                            example: 10
                            type:
                              - integer
                              - 'null'
                        required:
                          - id
                          - name
                          - billing_interval
                          - billing_interval_unit
                          - shipping_interval
                          - shipping_interval_unit
                          - split_volume
                          - created_at
                          - updated_at
                      customer:
                        title: Customer
                        type: object
                        properties:
                          id:
                            type: integer
                          account_id:
                            type:
                              - string
                              - 'null'
                          first_name:
                            type:
                              - string
                              - 'null'
                          last_name:
                            type:
                              - string
                              - 'null'
                          full_name:
                            type: string
                          email:
                            type: string
                            pattern: >-
                              \A[a-zA-Z0-9.!\#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\z
                          verified_email:
                            type:
                              - boolean
                              - 'null'
                            default: false
                          phone:
                            type:
                              - string
                              - 'null'
                          orders_count:
                            type:
                              - integer
                              - 'null'
                            default: 0
                          created_at:
                            type: string
                            format: date-time
                          display_total_spent:
                            type: string
                          metadata:
                            type: object
                            default: '{}'
                          user_company_id:
                            type:
                              - integer
                              - 'null'
                          external_id:
                            type:
                              - string
                              - 'null'
                          last_order_id:
                            example: 101
                            type:
                              - integer
                              - 'null'
                          notes:
                            example: This is a note
                            type:
                              - string
                              - 'null'
                          active:
                            type: boolean
                          total_spent:
                            example: 100
                            type:
                              - number
                              - string
                          customer_notes:
                            type: array
                            items:
                              title: CustomerNote
                              type: object
                              properties:
                                id:
                                  type: integer
                                note:
                                  type: string
                                user_company_id:
                                  type:
                                    - integer
                                    - 'null'
                                customer_id:
                                  type: integer
                                resource_id:
                                  type:
                                    - integer
                                    - 'null'
                                resource_type:
                                  type:
                                    - string
                                    - 'null'
                                created_at:
                                  type: string
                                  format: date-time
                              required:
                                - id
                                - note
                                - customer_id
                                - created_at
                          default_address:
                            title: Address
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                              name:
                                example: John Doe
                                type: string
                              address1:
                                example: 123 Main St
                                type: string
                              address2:
                                example: Apt 4B
                                type:
                                  - string
                                  - 'null'
                              address3:
                                example: Building 5
                                type:
                                  - string
                                  - 'null'
                              city:
                                example: New York
                                type: string
                              state:
                                example: NY
                                type: string
                              subdivision_code:
                                example: NY
                                type:
                                  - string
                                  - 'null'
                              postal_code:
                                example: '10001'
                                type: string
                              country_code:
                                example: US
                                type:
                                  - string
                                  - 'null'
                              default:
                                description: >-
                                  Use this address by default when there are
                                  multiple addresses
                                example: true
                                type:
                                  - boolean
                                  - 'null'
                                default: false
                              first_name:
                                example: John
                                type: string
                              last_name:
                                example: Doe
                                type: string
                            required:
                              - id
                              - name
                              - address1
                              - city
                              - state
                              - postal_code
                              - first_name
                              - last_name
                          addresses:
                            type: array
                            items:
                              title: Address
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  example: John Doe
                                  type: string
                                address1:
                                  example: 123 Main St
                                  type: string
                                address2:
                                  example: Apt 4B
                                  type:
                                    - string
                                    - 'null'
                                address3:
                                  example: Building 5
                                  type:
                                    - string
                                    - 'null'
                                city:
                                  example: New York
                                  type: string
                                state:
                                  example: NY
                                  type: string
                                subdivision_code:
                                  example: NY
                                  type:
                                    - string
                                    - 'null'
                                postal_code:
                                  example: '10001'
                                  type: string
                                country_code:
                                  example: US
                                  type:
                                    - string
                                    - 'null'
                                default:
                                  description: >-
                                    Use this address by default when there are
                                    multiple addresses
                                  example: true
                                  type:
                                    - boolean
                                    - 'null'
                                  default: false
                                first_name:
                                  example: John
                                  type: string
                                last_name:
                                  example: Doe
                                  type: string
                              required:
                                - id
                                - name
                                - address1
                                - city
                                - state
                                - postal_code
                                - first_name
                                - last_name
                          active_subscriptions_count:
                            example: 10
                            type: integer
                          inactive_subscriptions_count:
                            example: 10
                            type: integer
                          is_rep:
                            example: true
                            type: boolean
                        required:
                          - id
                          - full_name
                          - email
                          - created_at
                          - display_total_spent
                          - metadata
                          - active
                          - total_spent
                          - customer_notes
                          - addresses
                          - active_subscriptions_count
                          - inactive_subscriptions_count
                          - is_rep
                      variant:
                        title: Variant
                        type: object
                        properties:
                          id:
                            type: integer
                          title:
                            example: Variant 1
                            type:
                              - string
                              - 'null'
                          image_url:
                            example: https://via.placeholder.com/150
                            type:
                              - string
                              - 'null'
                          image_path:
                            example: https://via.placeholder.com/150
                            type:
                              - string
                              - 'null'
                          sku:
                            example: SKU-123456
                            type:
                              - string
                              - 'null'
                          primary_image:
                            example: https://via.placeholder.com/150
                            type:
                              - string
                              - 'null'
                          price:
                            example: 100
                            type:
                              - number
                              - 'null'
                          price_in_currency:
                            example: USD 100.00
                            type: string
                          options:
                            items:
                              type: object
                              properties:
                                title:
                                  type: string
                                  example: Size
                                value:
                                  type: string
                                  example: XL
                            type: array
                          product:
                            title: Product
                            type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              image_url:
                                type:
                                  - string
                                  - 'null'
                              image_path:
                                type:
                                  - string
                                  - 'null'
                              price:
                                type:
                                  - number
                                  - string
                                  - 'null'
                                default: '0.0'
                                minimum: 0
                                maximum: 99999999
                              cv:
                                type:
                                  - integer
                                  - 'null'
                                default: 0
                              tax:
                                type:
                                  - number
                                  - string
                                  - 'null'
                                default: '0.0'
                              sku:
                                type:
                                  - string
                                  - 'null'
                              price_in_currency:
                                type: string
                              tax_in_currency:
                                type: string
                              cv_in_currency:
                                type: string
                            required:
                              - id
                              - title
                              - price_in_currency
                              - tax_in_currency
                              - cv_in_currency
                        required:
                          - id
                          - price_in_currency
                          - options
                          - product
                      address:
                        title: Address
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: John Doe
                            type: string
                          address1:
                            example: 123 Main St
                            type: string
                          address2:
                            example: Apt 4B
                            type:
                              - string
                              - 'null'
                          address3:
                            example: Building 5
                            type:
                              - string
                              - 'null'
                          city:
                            example: New York
                            type: string
                          state:
                            example: NY
                            type: string
                          subdivision_code:
                            example: NY
                            type:
                              - string
                              - 'null'
                          postal_code:
                            example: '10001'
                            type: string
                          country_code:
                            example: US
                            type:
                              - string
                              - 'null'
                          default:
                            description: >-
                              Use this address by default when there are
                              multiple addresses
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: false
                          first_name:
                            example: John
                            type: string
                          last_name:
                            example: Doe
                            type: string
                        required:
                          - id
                          - name
                          - address1
                          - city
                          - state
                          - postal_code
                          - first_name
                          - last_name
                      payment_method:
                        title: Commerce::PaymentMethod
                        type: object
                        properties:
                          id:
                            type: integer
                          source:
                            type: string
                            enum:
                              - apple_pay
                              - paypal
                              - card
                              - iap
                              - bread
                              - affirm
                              - google_pay
                              - klarna
                              - droplet
                          created_at:
                            type: string
                            format: date-time
                          updated_at:
                            type: string
                            format: date-time
                          default:
                            type: boolean
                          payment_type:
                            example: Credit Card
                            type: string
                          details:
                            type: object
                        required:
                          - id
                          - source
                          - created_at
                          - updated_at
                          - default
                          - payment_type
                          - details
                      currency:
                        title: Currency
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: United States Dollar
                            type:
                              - string
                              - 'null'
                          code:
                            example: USD
                            type: string
                          rate:
                            example: 1
                            type:
                              - number
                              - string
                              - 'null'
                          active:
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: false
                          symbol:
                            example: $
                            type:
                              - string
                              - 'null'
                        required:
                          - id
                          - code
                      country:
                        title: Country
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: United States
                            type: string
                          iso:
                            description: 2-letter country code (ISO 3166-1 alpha-2)
                            example: US
                            type: string
                        required:
                          - id
                          - name
                          - iso
                      company:
                        title: Company
                        type: object
                        properties:
                          id:
                            type: integer
                        required:
                          - id
                      subscription_skips:
                        type: array
                        items:
                          title: Commerce::SubscriptionSkip
                          type: object
                          properties:
                            id:
                              type: integer
                            skipped_date:
                              example: '2025-01-01T00:00:00Z'
                              type: string
                              format: date
                            reason:
                              example: Customer requested to skip next billing
                              type:
                                - 'null'
                            created_at:
                              example: '2025-01-01T00:00:00Z'
                              type: string
                              format: date-time
                            updated_at:
                              example: '2025-01-01T00:00:00Z'
                              type: string
                              format: date-time
                          required:
                            - id
                            - skipped_date
                            - created_at
                            - updated_at
                      orders:
                        type: array
                        items:
                          title: Commerce::Order
                          type: object
                          properties:
                            id:
                              type: integer
                            first_name:
                              type:
                                - string
                                - 'null'
                            last_name:
                              type:
                                - string
                                - 'null'
                            email:
                              type:
                                - string
                                - 'null'
                            phone:
                              type:
                                - string
                                - 'null'
                            order_number:
                              type:
                                - string
                                - 'null'
                            status:
                              type: string
                              enum:
                                - awaiting_payment
                                - awaiting_shipment
                                - shipped
                                - delivered
                                - archived
                                - cancelled
                                - failed_payment
                                - draft
                            order_type:
                              type: string
                              enum:
                                - requested
                                - purchased
                                - imported
                                - abandoned
                            amount:
                              type:
                                - number
                                - string
                                - 'null'
                              default: '0.0'
                            note:
                              type:
                                - string
                                - 'null'
                            currency_code:
                              type:
                                - string
                                - 'null'
                            created_at:
                              type: string
                              format: date-time
                            updated_at:
                              type: string
                              format: date-time
                            metadata:
                              type:
                                - object
                                - 'null'
                              default: '{}'
                            token:
                              type: string
                            refundable_amount:
                              type: string
                            shipping_method:
                              title: ShippingMethod
                              type:
                                - object
                                - 'null'
                              properties:
                                id:
                                  type: integer
                                name:
                                  type: string
                                delivery_time_estimate:
                                  type:
                                    - string
                                    - 'null'
                              required:
                                - id
                                - name
                            items_quantity:
                              example: 5
                              type: integer
                          required:
                            - id
                            - status
                            - order_type
                            - created_at
                            - updated_at
                            - token
                            - refundable_amount
                            - items_quantity
                    required:
                      - id
                      - next_bill_date
                      - status
                      - quantity
                      - price
                      - original_price
                      - created_at
                      - updated_at
                      - in_trial
                      - subscription_plan
                      - customer
                      - variant
                      - address
                      - payment_method
                      - currency
                      - country
                      - company
                      - subscription_skips
                      - orders
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - subscription
        '404':
          description: not found - subscription
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: unprocessable entity - not in paused state
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
  /api/subscriptions/{id}/cancel:
    post:
      summary: Cancel a subscription
      description: Cancel a subscription
      tags:
        - Subscriptions
      operationId: cancelSubscription
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
        - name: customer_id
          in: query
          required: false
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscription:
                    title: Commerce::Subscription
                    type: object
                    properties:
                      id:
                        type: integer
                      next_bill_date:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date
                      last_bill_date:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date
                      next_ship_date:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date
                      last_ship_date:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date
                      status:
                        example: active
                        type: string
                        enum:
                          - pending
                          - active
                          - paused
                          - past_due
                          - cancelled
                          - trial
                      disabled:
                        example: false
                        type:
                          - boolean
                          - 'null'
                        default: false
                      quantity:
                        example: 1
                        type: integer
                        default: 1
                        minimum: 1
                      price:
                        example: 100
                        type: number
                      original_price:
                        example: 100
                        type: number
                      attempts:
                        example: 1
                        type:
                          - integer
                          - 'null'
                        default: 0
                      last_failed_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      next_retry_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      skipped_count:
                        example: 1
                        type:
                          - integer
                          - 'null'
                        default: 0
                      max_skips:
                        example: 1
                        type:
                          - integer
                          - 'null'
                      trial_ends_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      cancelled_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      created_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      updated_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      notes:
                        example: This is a sample commerce subscription
                        type:
                          - string
                          - 'null'
                      in_trial:
                        example: false
                        type: boolean
                      subscription_plan:
                        title: Commerce::SubscriptionPlan
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: Test Subscription Plan
                            type: string
                          billing_interval:
                            example: 1
                            type: integer
                            default: 1
                            minimum: 1
                          billing_interval_unit:
                            description: 'Possible values: `day`, `week`, `month`, `year`'
                            example: day
                            type: string
                            default: month
                          shipping_interval:
                            example: 1
                            type: integer
                            default: 1
                            minimum: 1
                          shipping_interval_unit:
                            description: 'Possible values: `day`, `week`, `month`, `year`'
                            example: day
                            type: string
                            default: month
                          trial_period:
                            example: 1
                            type:
                              - integer
                              - 'null'
                            minimum: 1
                          trial_period_unit:
                            description: 'Possible values: `day`, `week`, `month`, `year`'
                            example: day
                            type:
                              - string
                              - 'null'
                          split_volume:
                            example: true
                            type: boolean
                            default: false
                          allow_skipping:
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: true
                          max_skips:
                            example: 1
                            type:
                              - integer
                              - 'null'
                            minimum: 1
                          price_adjustment_type:
                            example: percentage or fixed_amount
                            type:
                              - string
                              - 'null'
                          price_adjustment_amount:
                            example: 10
                            type:
                              - number
                              - 'null'
                          max_quantity:
                            example: 100
                            type:
                              - integer
                              - 'null'
                            minimum: 1
                          active:
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: true
                          company_default:
                            example: false
                            type:
                              - boolean
                              - 'null'
                            default: false
                          created_at:
                            example: '2025-03-10T00:00:00Z'
                            type: string
                            format: date-time
                          updated_at:
                            example: '2025-03-10T00:00:00Z'
                            type: string
                            format: date-time
                          products_count:
                            example: 10
                            type:
                              - integer
                              - 'null'
                          subscribers_count:
                            example: 10
                            type:
                              - integer
                              - 'null'
                        required:
                          - id
                          - name
                          - billing_interval
                          - billing_interval_unit
                          - shipping_interval
                          - shipping_interval_unit
                          - split_volume
                          - created_at
                          - updated_at
                      customer:
                        title: Customer
                        type: object
                        properties:
                          id:
                            type: integer
                          account_id:
                            type:
                              - string
                              - 'null'
                          first_name:
                            type:
                              - string
                              - 'null'
                          last_name:
                            type:
                              - string
                              - 'null'
                          full_name:
                            type: string
                          email:
                            type: string
                            pattern: >-
                              \A[a-zA-Z0-9.!\#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\z
                          verified_email:
                            type:
                              - boolean
                              - 'null'
                            default: false
                          phone:
                            type:
                              - string
                              - 'null'
                          orders_count:
                            type:
                              - integer
                              - 'null'
                            default: 0
                          created_at:
                            type: string
                            format: date-time
                          display_total_spent:
                            type: string
                          metadata:
                            type: object
                            default: '{}'
                          user_company_id:
                            type:
                              - integer
                              - 'null'
                          external_id:
                            type:
                              - string
                              - 'null'
                          last_order_id:
                            example: 101
                            type:
                              - integer
                              - 'null'
                          notes:
                            example: This is a note
                            type:
                              - string
                              - 'null'
                          active:
                            type: boolean
                          total_spent:
                            example: 100
                            type:
                              - number
                              - string
                          customer_notes:
                            type: array
                            items:
                              title: CustomerNote
                              type: object
                              properties:
                                id:
                                  type: integer
                                note:
                                  type: string
                                user_company_id:
                                  type:
                                    - integer
                                    - 'null'
                                customer_id:
                                  type: integer
                                resource_id:
                                  type:
                                    - integer
                                    - 'null'
                                resource_type:
                                  type:
                                    - string
                                    - 'null'
                                created_at:
                                  type: string
                                  format: date-time
                              required:
                                - id
                                - note
                                - customer_id
                                - created_at
                          default_address:
                            title: Address
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                              name:
                                example: John Doe
                                type: string
                              address1:
                                example: 123 Main St
                                type: string
                              address2:
                                example: Apt 4B
                                type:
                                  - string
                                  - 'null'
                              address3:
                                example: Building 5
                                type:
                                  - string
                                  - 'null'
                              city:
                                example: New York
                                type: string
                              state:
                                example: NY
                                type: string
                              subdivision_code:
                                example: NY
                                type:
                                  - string
                                  - 'null'
                              postal_code:
                                example: '10001'
                                type: string
                              country_code:
                                example: US
                                type:
                                  - string
                                  - 'null'
                              default:
                                description: >-
                                  Use this address by default when there are
                                  multiple addresses
                                example: true
                                type:
                                  - boolean
                                  - 'null'
                                default: false
                              first_name:
                                example: John
                                type: string
                              last_name:
                                example: Doe
                                type: string
                            required:
                              - id
                              - name
                              - address1
                              - city
                              - state
                              - postal_code
                              - first_name
                              - last_name
                          addresses:
                            type: array
                            items:
                              title: Address
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  example: John Doe
                                  type: string
                                address1:
                                  example: 123 Main St
                                  type: string
                                address2:
                                  example: Apt 4B
                                  type:
                                    - string
                                    - 'null'
                                address3:
                                  example: Building 5
                                  type:
                                    - string
                                    - 'null'
                                city:
                                  example: New York
                                  type: string
                                state:
                                  example: NY
                                  type: string
                                subdivision_code:
                                  example: NY
                                  type:
                                    - string
                                    - 'null'
                                postal_code:
                                  example: '10001'
                                  type: string
                                country_code:
                                  example: US
                                  type:
                                    - string
                                    - 'null'
                                default:
                                  description: >-
                                    Use this address by default when there are
                                    multiple addresses
                                  example: true
                                  type:
                                    - boolean
                                    - 'null'
                                  default: false
                                first_name:
                                  example: John
                                  type: string
                                last_name:
                                  example: Doe
                                  type: string
                              required:
                                - id
                                - name
                                - address1
                                - city
                                - state
                                - postal_code
                                - first_name
                                - last_name
                          active_subscriptions_count:
                            example: 10
                            type: integer
                          inactive_subscriptions_count:
                            example: 10
                            type: integer
                          is_rep:
                            example: true
                            type: boolean
                        required:
                          - id
                          - full_name
                          - email
                          - created_at
                          - display_total_spent
                          - metadata
                          - active
                          - total_spent
                          - customer_notes
                          - addresses
                          - active_subscriptions_count
                          - inactive_subscriptions_count
                          - is_rep
                      variant:
                        title: Variant
                        type: object
                        properties:
                          id:
                            type: integer
                          title:
                            example: Variant 1
                            type:
                              - string
                              - 'null'
                          image_url:
                            example: https://via.placeholder.com/150
                            type:
                              - string
                              - 'null'
                          image_path:
                            example: https://via.placeholder.com/150
                            type:
                              - string
                              - 'null'
                          sku:
                            example: SKU-123456
                            type:
                              - string
                              - 'null'
                          primary_image:
                            example: https://via.placeholder.com/150
                            type:
                              - string
                              - 'null'
                          price:
                            example: 100
                            type:
                              - number
                              - 'null'
                          price_in_currency:
                            example: USD 100.00
                            type: string
                          options:
                            items:
                              type: object
                              properties:
                                title:
                                  type: string
                                  example: Size
                                value:
                                  type: string
                                  example: XL
                            type: array
                          product:
                            title: Product
                            type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              image_url:
                                type:
                                  - string
                                  - 'null'
                              image_path:
                                type:
                                  - string
                                  - 'null'
                              price:
                                type:
                                  - number
                                  - string
                                  - 'null'
                                default: '0.0'
                                minimum: 0
                                maximum: 99999999
                              cv:
                                type:
                                  - integer
                                  - 'null'
                                default: 0
                              tax:
                                type:
                                  - number
                                  - string
                                  - 'null'
                                default: '0.0'
                              sku:
                                type:
                                  - string
                                  - 'null'
                              price_in_currency:
                                type: string
                              tax_in_currency:
                                type: string
                              cv_in_currency:
                                type: string
                            required:
                              - id
                              - title
                              - price_in_currency
                              - tax_in_currency
                              - cv_in_currency
                        required:
                          - id
                          - price_in_currency
                          - options
                          - product
                      address:
                        title: Address
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: John Doe
                            type: string
                          address1:
                            example: 123 Main St
                            type: string
                          address2:
                            example: Apt 4B
                            type:
                              - string
                              - 'null'
                          address3:
                            example: Building 5
                            type:
                              - string
                              - 'null'
                          city:
                            example: New York
                            type: string
                          state:
                            example: NY
                            type: string
                          subdivision_code:
                            example: NY
                            type:
                              - string
                              - 'null'
                          postal_code:
                            example: '10001'
                            type: string
                          country_code:
                            example: US
                            type:
                              - string
                              - 'null'
                          default:
                            description: >-
                              Use this address by default when there are
                              multiple addresses
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: false
                          first_name:
                            example: John
                            type: string
                          last_name:
                            example: Doe
                            type: string
                        required:
                          - id
                          - name
                          - address1
                          - city
                          - state
                          - postal_code
                          - first_name
                          - last_name
                      payment_method:
                        title: Commerce::PaymentMethod
                        type: object
                        properties:
                          id:
                            type: integer
                          source:
                            type: string
                            enum:
                              - apple_pay
                              - paypal
                              - card
                              - iap
                              - bread
                              - affirm
                              - google_pay
                              - klarna
                              - droplet
                          created_at:
                            type: string
                            format: date-time
                          updated_at:
                            type: string
                            format: date-time
                          default:
                            type: boolean
                          payment_type:
                            example: Credit Card
                            type: string
                          details:
                            type: object
                        required:
                          - id
                          - source
                          - created_at
                          - updated_at
                          - default
                          - payment_type
                          - details
                      currency:
                        title: Currency
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: United States Dollar
                            type:
                              - string
                              - 'null'
                          code:
                            example: USD
                            type: string
                          rate:
                            example: 1
                            type:
                              - number
                              - string
                              - 'null'
                          active:
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: false
                          symbol:
                            example: $
                            type:
                              - string
                              - 'null'
                        required:
                          - id
                          - code
                      country:
                        title: Country
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: United States
                            type: string
                          iso:
                            description: 2-letter country code (ISO 3166-1 alpha-2)
                            example: US
                            type: string
                        required:
                          - id
                          - name
                          - iso
                      company:
                        title: Company
                        type: object
                        properties:
                          id:
                            type: integer
                        required:
                          - id
                      subscription_skips:
                        type: array
                        items:
                          title: Commerce::SubscriptionSkip
                          type: object
                          properties:
                            id:
                              type: integer
                            skipped_date:
                              example: '2025-01-01T00:00:00Z'
                              type: string
                              format: date
                            reason:
                              example: Customer requested to skip next billing
                              type:
                                - 'null'
                            created_at:
                              example: '2025-01-01T00:00:00Z'
                              type: string
                              format: date-time
                            updated_at:
                              example: '2025-01-01T00:00:00Z'
                              type: string
                              format: date-time
                          required:
                            - id
                            - skipped_date
                            - created_at
                            - updated_at
                      orders:
                        type: array
                        items:
                          title: Commerce::Order
                          type: object
                          properties:
                            id:
                              type: integer
                            first_name:
                              type:
                                - string
                                - 'null'
                            last_name:
                              type:
                                - string
                                - 'null'
                            email:
                              type:
                                - string
                                - 'null'
                            phone:
                              type:
                                - string
                                - 'null'
                            order_number:
                              type:
                                - string
                                - 'null'
                            status:
                              type: string
                              enum:
                                - awaiting_payment
                                - awaiting_shipment
                                - shipped
                                - delivered
                                - archived
                                - cancelled
                                - failed_payment
                                - draft
                            order_type:
                              type: string
                              enum:
                                - requested
                                - purchased
                                - imported
                                - abandoned
                            amount:
                              type:
                                - number
                                - string
                                - 'null'
                              default: '0.0'
                            note:
                              type:
                                - string
                                - 'null'
                            currency_code:
                              type:
                                - string
                                - 'null'
                            created_at:
                              type: string
                              format: date-time
                            updated_at:
                              type: string
                              format: date-time
                            metadata:
                              type:
                                - object
                                - 'null'
                              default: '{}'
                            token:
                              type: string
                            refundable_amount:
                              type: string
                            shipping_method:
                              title: ShippingMethod
                              type:
                                - object
                                - 'null'
                              properties:
                                id:
                                  type: integer
                                name:
                                  type: string
                                delivery_time_estimate:
                                  type:
                                    - string
                                    - 'null'
                              required:
                                - id
                                - name
                            items_quantity:
                              example: 5
                              type: integer
                          required:
                            - id
                            - status
                            - order_type
                            - created_at
                            - updated_at
                            - token
                            - refundable_amount
                            - items_quantity
                    required:
                      - id
                      - next_bill_date
                      - status
                      - quantity
                      - price
                      - original_price
                      - created_at
                      - updated_at
                      - in_trial
                      - subscription_plan
                      - customer
                      - variant
                      - address
                      - payment_method
                      - currency
                      - country
                      - company
                      - subscription_skips
                      - orders
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - subscription
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
  /api/subscriptions/{id}/reactivate:
    post:
      summary: Reactivate a cancelled subscription
      description: Reactivate a previously cancelled subscription
      tags:
        - Subscriptions
      operationId: reactivateSubscription
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
        - name: customer_id
          in: query
          required: true
          schema:
            type: integer
        - name: next_bill_date
          in: query
          schema:
            type: string
            format: date
          required: false
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscription:
                    title: Commerce::Subscription
                    type: object
                    properties:
                      id:
                        type: integer
                      next_bill_date:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date
                      last_bill_date:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date
                      next_ship_date:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date
                      last_ship_date:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date
                      status:
                        example: active
                        type: string
                        enum:
                          - pending
                          - active
                          - paused
                          - past_due
                          - cancelled
                          - trial
                      disabled:
                        example: false
                        type:
                          - boolean
                          - 'null'
                        default: false
                      quantity:
                        example: 1
                        type: integer
                        default: 1
                        minimum: 1
                      price:
                        example: 100
                        type: number
                      original_price:
                        example: 100
                        type: number
                      attempts:
                        example: 1
                        type:
                          - integer
                          - 'null'
                        default: 0
                      last_failed_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      next_retry_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      skipped_count:
                        example: 1
                        type:
                          - integer
                          - 'null'
                        default: 0
                      max_skips:
                        example: 1
                        type:
                          - integer
                          - 'null'
                      trial_ends_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      cancelled_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      created_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      updated_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      notes:
                        example: This is a sample commerce subscription
                        type:
                          - string
                          - 'null'
                      in_trial:
                        example: false
                        type: boolean
                      subscription_plan:
                        title: Commerce::SubscriptionPlan
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: Test Subscription Plan
                            type: string
                          billing_interval:
                            example: 1
                            type: integer
                            default: 1
                            minimum: 1
                          billing_interval_unit:
                            description: 'Possible values: `day`, `week`, `month`, `year`'
                            example: day
                            type: string
                            default: month
                          shipping_interval:
                            example: 1
                            type: integer
                            default: 1
                            minimum: 1
                          shipping_interval_unit:
                            description: 'Possible values: `day`, `week`, `month`, `year`'
                            example: day
                            type: string
                            default: month
                          trial_period:
                            example: 1
                            type:
                              - integer
                              - 'null'
                            minimum: 1
                          trial_period_unit:
                            description: 'Possible values: `day`, `week`, `month`, `year`'
                            example: day
                            type:
                              - string
                              - 'null'
                          split_volume:
                            example: true
                            type: boolean
                            default: false
                          allow_skipping:
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: true
                          max_skips:
                            example: 1
                            type:
                              - integer
                              - 'null'
                            minimum: 1
                          price_adjustment_type:
                            example: percentage or fixed_amount
                            type:
                              - string
                              - 'null'
                          price_adjustment_amount:
                            example: 10
                            type:
                              - number
                              - 'null'
                          max_quantity:
                            example: 100
                            type:
                              - integer
                              - 'null'
                            minimum: 1
                          active:
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: true
                          company_default:
                            example: false
                            type:
                              - boolean
                              - 'null'
                            default: false
                          created_at:
                            example: '2025-03-10T00:00:00Z'
                            type: string
                            format: date-time
                          updated_at:
                            example: '2025-03-10T00:00:00Z'
                            type: string
                            format: date-time
                          products_count:
                            example: 10
                            type:
                              - integer
                              - 'null'
                          subscribers_count:
                            example: 10
                            type:
                              - integer
                              - 'null'
                        required:
                          - id
                          - name
                          - billing_interval
                          - billing_interval_unit
                          - shipping_interval
                          - shipping_interval_unit
                          - split_volume
                          - created_at
                          - updated_at
                      customer:
                        title: Customer
                        type: object
                        properties:
                          id:
                            type: integer
                          account_id:
                            type:
                              - string
                              - 'null'
                          first_name:
                            type:
                              - string
                              - 'null'
                          last_name:
                            type:
                              - string
                              - 'null'
                          full_name:
                            type: string
                          email:
                            type: string
                            pattern: >-
                              \A[a-zA-Z0-9.!\#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\z
                          verified_email:
                            type:
                              - boolean
                              - 'null'
                            default: false
                          phone:
                            type:
                              - string
                              - 'null'
                          orders_count:
                            type:
                              - integer
                              - 'null'
                            default: 0
                          created_at:
                            type: string
                            format: date-time
                          display_total_spent:
                            type: string
                          metadata:
                            type: object
                            default: '{}'
                          user_company_id:
                            type:
                              - integer
                              - 'null'
                          external_id:
                            type:
                              - string
                              - 'null'
                          last_order_id:
                            example: 101
                            type:
                              - integer
                              - 'null'
                          notes:
                            example: This is a note
                            type:
                              - string
                              - 'null'
                          active:
                            type: boolean
                          total_spent:
                            example: 100
                            type:
                              - number
                              - string
                          customer_notes:
                            type: array
                            items:
                              title: CustomerNote
                              type: object
                              properties:
                                id:
                                  type: integer
                                note:
                                  type: string
                                user_company_id:
                                  type:
                                    - integer
                                    - 'null'
                                customer_id:
                                  type: integer
                                resource_id:
                                  type:
                                    - integer
                                    - 'null'
                                resource_type:
                                  type:
                                    - string
                                    - 'null'
                                created_at:
                                  type: string
                                  format: date-time
                              required:
                                - id
                                - note
                                - customer_id
                                - created_at
                          default_address:
                            title: Address
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                              name:
                                example: John Doe
                                type: string
                              address1:
                                example: 123 Main St
                                type: string
                              address2:
                                example: Apt 4B
                                type:
                                  - string
                                  - 'null'
                              address3:
                                example: Building 5
                                type:
                                  - string
                                  - 'null'
                              city:
                                example: New York
                                type: string
                              state:
                                example: NY
                                type: string
                              subdivision_code:
                                example: NY
                                type:
                                  - string
                                  - 'null'
                              postal_code:
                                example: '10001'
                                type: string
                              country_code:
                                example: US
                                type:
                                  - string
                                  - 'null'
                              default:
                                description: >-
                                  Use this address by default when there are
                                  multiple addresses
                                example: true
                                type:
                                  - boolean
                                  - 'null'
                                default: false
                              first_name:
                                example: John
                                type: string
                              last_name:
                                example: Doe
                                type: string
                            required:
                              - id
                              - name
                              - address1
                              - city
                              - state
                              - postal_code
                              - first_name
                              - last_name
                          addresses:
                            type: array
                            items:
                              title: Address
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  example: John Doe
                                  type: string
                                address1:
                                  example: 123 Main St
                                  type: string
                                address2:
                                  example: Apt 4B
                                  type:
                                    - string
                                    - 'null'
                                address3:
                                  example: Building 5
                                  type:
                                    - string
                                    - 'null'
                                city:
                                  example: New York
                                  type: string
                                state:
                                  example: NY
                                  type: string
                                subdivision_code:
                                  example: NY
                                  type:
                                    - string
                                    - 'null'
                                postal_code:
                                  example: '10001'
                                  type: string
                                country_code:
                                  example: US
                                  type:
                                    - string
                                    - 'null'
                                default:
                                  description: >-
                                    Use this address by default when there are
                                    multiple addresses
                                  example: true
                                  type:
                                    - boolean
                                    - 'null'
                                  default: false
                                first_name:
                                  example: John
                                  type: string
                                last_name:
                                  example: Doe
                                  type: string
                              required:
                                - id
                                - name
                                - address1
                                - city
                                - state
                                - postal_code
                                - first_name
                                - last_name
                          active_subscriptions_count:
                            example: 10
                            type: integer
                          inactive_subscriptions_count:
                            example: 10
                            type: integer
                          is_rep:
                            example: true
                            type: boolean
                        required:
                          - id
                          - full_name
                          - email
                          - created_at
                          - display_total_spent
                          - metadata
                          - active
                          - total_spent
                          - customer_notes
                          - addresses
                          - active_subscriptions_count
                          - inactive_subscriptions_count
                          - is_rep
                      variant:
                        title: Variant
                        type: object
                        properties:
                          id:
                            type: integer
                          title:
                            example: Variant 1
                            type:
                              - string
                              - 'null'
                          image_url:
                            example: https://via.placeholder.com/150
                            type:
                              - string
                              - 'null'
                          image_path:
                            example: https://via.placeholder.com/150
                            type:
                              - string
                              - 'null'
                          sku:
                            example: SKU-123456
                            type:
                              - string
                              - 'null'
                          primary_image:
                            example: https://via.placeholder.com/150
                            type:
                              - string
                              - 'null'
                          price:
                            example: 100
                            type:
                              - number
                              - 'null'
                          price_in_currency:
                            example: USD 100.00
                            type: string
                          options:
                            items:
                              type: object
                              properties:
                                title:
                                  type: string
                                  example: Size
                                value:
                                  type: string
                                  example: XL
                            type: array
                          product:
                            title: Product
                            type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              image_url:
                                type:
                                  - string
                                  - 'null'
                              image_path:
                                type:
                                  - string
                                  - 'null'
                              price:
                                type:
                                  - number
                                  - string
                                  - 'null'
                                default: '0.0'
                                minimum: 0
                                maximum: 99999999
                              cv:
                                type:
                                  - integer
                                  - 'null'
                                default: 0
                              tax:
                                type:
                                  - number
                                  - string
                                  - 'null'
                                default: '0.0'
                              sku:
                                type:
                                  - string
                                  - 'null'
                              price_in_currency:
                                type: string
                              tax_in_currency:
                                type: string
                              cv_in_currency:
                                type: string
                            required:
                              - id
                              - title
                              - price_in_currency
                              - tax_in_currency
                              - cv_in_currency
                        required:
                          - id
                          - price_in_currency
                          - options
                          - product
                      address:
                        title: Address
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: John Doe
                            type: string
                          address1:
                            example: 123 Main St
                            type: string
                          address2:
                            example: Apt 4B
                            type:
                              - string
                              - 'null'
                          address3:
                            example: Building 5
                            type:
                              - string
                              - 'null'
                          city:
                            example: New York
                            type: string
                          state:
                            example: NY
                            type: string
                          subdivision_code:
                            example: NY
                            type:
                              - string
                              - 'null'
                          postal_code:
                            example: '10001'
                            type: string
                          country_code:
                            example: US
                            type:
                              - string
                              - 'null'
                          default:
                            description: >-
                              Use this address by default when there are
                              multiple addresses
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: false
                          first_name:
                            example: John
                            type: string
                          last_name:
                            example: Doe
                            type: string
                        required:
                          - id
                          - name
                          - address1
                          - city
                          - state
                          - postal_code
                          - first_name
                          - last_name
                      payment_method:
                        title: Commerce::PaymentMethod
                        type: object
                        properties:
                          id:
                            type: integer
                          source:
                            type: string
                            enum:
                              - apple_pay
                              - paypal
                              - card
                              - iap
                              - bread
                              - affirm
                              - google_pay
                              - klarna
                              - droplet
                          created_at:
                            type: string
                            format: date-time
                          updated_at:
                            type: string
                            format: date-time
                          default:
                            type: boolean
                          payment_type:
                            example: Credit Card
                            type: string
                          details:
                            type: object
                        required:
                          - id
                          - source
                          - created_at
                          - updated_at
                          - default
                          - payment_type
                          - details
                      currency:
                        title: Currency
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: United States Dollar
                            type:
                              - string
                              - 'null'
                          code:
                            example: USD
                            type: string
                          rate:
                            example: 1
                            type:
                              - number
                              - string
                              - 'null'
                          active:
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: false
                          symbol:
                            example: $
                            type:
                              - string
                              - 'null'
                        required:
                          - id
                          - code
                      country:
                        title: Country
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: United States
                            type: string
                          iso:
                            description: 2-letter country code (ISO 3166-1 alpha-2)
                            example: US
                            type: string
                        required:
                          - id
                          - name
                          - iso
                      company:
                        title: Company
                        type: object
                        properties:
                          id:
                            type: integer
                        required:
                          - id
                      subscription_skips:
                        type: array
                        items:
                          title: Commerce::SubscriptionSkip
                          type: object
                          properties:
                            id:
                              type: integer
                            skipped_date:
                              example: '2025-01-01T00:00:00Z'
                              type: string
                              format: date
                            reason:
                              example: Customer requested to skip next billing
                              type:
                                - 'null'
                            created_at:
                              example: '2025-01-01T00:00:00Z'
                              type: string
                              format: date-time
                            updated_at:
                              example: '2025-01-01T00:00:00Z'
                              type: string
                              format: date-time
                          required:
                            - id
                            - skipped_date
                            - created_at
                            - updated_at
                      orders:
                        type: array
                        items:
                          title: Commerce::Order
                          type: object
                          properties:
                            id:
                              type: integer
                            first_name:
                              type:
                                - string
                                - 'null'
                            last_name:
                              type:
                                - string
                                - 'null'
                            email:
                              type:
                                - string
                                - 'null'
                            phone:
                              type:
                                - string
                                - 'null'
                            order_number:
                              type:
                                - string
                                - 'null'
                            status:
                              type: string
                              enum:
                                - awaiting_payment
                                - awaiting_shipment
                                - shipped
                                - delivered
                                - archived
                                - cancelled
                                - failed_payment
                                - draft
                            order_type:
                              type: string
                              enum:
                                - requested
                                - purchased
                                - imported
                                - abandoned
                            amount:
                              type:
                                - number
                                - string
                                - 'null'
                              default: '0.0'
                            note:
                              type:
                                - string
                                - 'null'
                            currency_code:
                              type:
                                - string
                                - 'null'
                            created_at:
                              type: string
                              format: date-time
                            updated_at:
                              type: string
                              format: date-time
                            metadata:
                              type:
                                - object
                                - 'null'
                              default: '{}'
                            token:
                              type: string
                            refundable_amount:
                              type: string
                            shipping_method:
                              title: ShippingMethod
                              type:
                                - object
                                - 'null'
                              properties:
                                id:
                                  type: integer
                                name:
                                  type: string
                                delivery_time_estimate:
                                  type:
                                    - string
                                    - 'null'
                              required:
                                - id
                                - name
                            items_quantity:
                              example: 5
                              type: integer
                          required:
                            - id
                            - status
                            - order_type
                            - created_at
                            - updated_at
                            - token
                            - refundable_amount
                            - items_quantity
                    required:
                      - id
                      - next_bill_date
                      - status
                      - quantity
                      - price
                      - original_price
                      - created_at
                      - updated_at
                      - in_trial
                      - subscription_plan
                      - customer
                      - variant
                      - address
                      - payment_method
                      - currency
                      - country
                      - company
                      - subscription_skips
                      - orders
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - subscription
        '404':
          description: not found - subscription
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: unprocessable entity - not in cancelled state
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
  /api/subscriptions/{id}/skip_next_billing:
    post:
      summary: Skip next billing
      description: Skip next billing
      tags:
        - Subscriptions
      operationId: skipNextBilling
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
        - name: customer_id
          in: query
          required: false
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscription:
                    title: Commerce::Subscription
                    type: object
                    properties:
                      id:
                        type: integer
                      next_bill_date:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date
                      last_bill_date:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date
                      next_ship_date:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date
                      last_ship_date:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date
                      status:
                        example: active
                        type: string
                        enum:
                          - pending
                          - active
                          - paused
                          - past_due
                          - cancelled
                          - trial
                      disabled:
                        example: false
                        type:
                          - boolean
                          - 'null'
                        default: false
                      quantity:
                        example: 1
                        type: integer
                        default: 1
                        minimum: 1
                      price:
                        example: 100
                        type: number
                      original_price:
                        example: 100
                        type: number
                      attempts:
                        example: 1
                        type:
                          - integer
                          - 'null'
                        default: 0
                      last_failed_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      next_retry_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      skipped_count:
                        example: 1
                        type:
                          - integer
                          - 'null'
                        default: 0
                      max_skips:
                        example: 1
                        type:
                          - integer
                          - 'null'
                      trial_ends_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      cancelled_at:
                        example: '2025-03-10T00:00:00Z'
                        type:
                          - string
                          - 'null'
                        format: date-time
                      created_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      updated_at:
                        example: '2025-03-10T00:00:00Z'
                        type: string
                        format: date-time
                      notes:
                        example: This is a sample commerce subscription
                        type:
                          - string
                          - 'null'
                      in_trial:
                        example: false
                        type: boolean
                      subscription_plan:
                        title: Commerce::SubscriptionPlan
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: Test Subscription Plan
                            type: string
                          billing_interval:
                            example: 1
                            type: integer
                            default: 1
                            minimum: 1
                          billing_interval_unit:
                            description: 'Possible values: `day`, `week`, `month`, `year`'
                            example: day
                            type: string
                            default: month
                          shipping_interval:
                            example: 1
                            type: integer
                            default: 1
                            minimum: 1
                          shipping_interval_unit:
                            description: 'Possible values: `day`, `week`, `month`, `year`'
                            example: day
                            type: string
                            default: month
                          trial_period:
                            example: 1
                            type:
                              - integer
                              - 'null'
                            minimum: 1
                          trial_period_unit:
                            description: 'Possible values: `day`, `week`, `month`, `year`'
                            example: day
                            type:
                              - string
                              - 'null'
                          split_volume:
                            example: true
                            type: boolean
                            default: false
                          allow_skipping:
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: true
                          max_skips:
                            example: 1
                            type:
                              - integer
                              - 'null'
                            minimum: 1
                          price_adjustment_type:
                            example: percentage or fixed_amount
                            type:
                              - string
                              - 'null'
                          price_adjustment_amount:
                            example: 10
                            type:
                              - number
                              - 'null'
                          max_quantity:
                            example: 100
                            type:
                              - integer
                              - 'null'
                            minimum: 1
                          active:
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: true
                          company_default:
                            example: false
                            type:
                              - boolean
                              - 'null'
                            default: false
                          created_at:
                            example: '2025-03-10T00:00:00Z'
                            type: string
                            format: date-time
                          updated_at:
                            example: '2025-03-10T00:00:00Z'
                            type: string
                            format: date-time
                          products_count:
                            example: 10
                            type:
                              - integer
                              - 'null'
                          subscribers_count:
                            example: 10
                            type:
                              - integer
                              - 'null'
                        required:
                          - id
                          - name
                          - billing_interval
                          - billing_interval_unit
                          - shipping_interval
                          - shipping_interval_unit
                          - split_volume
                          - created_at
                          - updated_at
                      customer:
                        title: Customer
                        type: object
                        properties:
                          id:
                            type: integer
                          account_id:
                            type:
                              - string
                              - 'null'
                          first_name:
                            type:
                              - string
                              - 'null'
                          last_name:
                            type:
                              - string
                              - 'null'
                          full_name:
                            type: string
                          email:
                            type: string
                            pattern: >-
                              \A[a-zA-Z0-9.!\#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\z
                          verified_email:
                            type:
                              - boolean
                              - 'null'
                            default: false
                          phone:
                            type:
                              - string
                              - 'null'
                          orders_count:
                            type:
                              - integer
                              - 'null'
                            default: 0
                          created_at:
                            type: string
                            format: date-time
                          display_total_spent:
                            type: string
                          metadata:
                            type: object
                            default: '{}'
                          user_company_id:
                            type:
                              - integer
                              - 'null'
                          external_id:
                            type:
                              - string
                              - 'null'
                          last_order_id:
                            example: 101
                            type:
                              - integer
                              - 'null'
                          notes:
                            example: This is a note
                            type:
                              - string
                              - 'null'
                          active:
                            type: boolean
                          total_spent:
                            example: 100
                            type:
                              - number
                              - string
                          customer_notes:
                            type: array
                            items:
                              title: CustomerNote
                              type: object
                              properties:
                                id:
                                  type: integer
                                note:
                                  type: string
                                user_company_id:
                                  type:
                                    - integer
                                    - 'null'
                                customer_id:
                                  type: integer
                                resource_id:
                                  type:
                                    - integer
                                    - 'null'
                                resource_type:
                                  type:
                                    - string
                                    - 'null'
                                created_at:
                                  type: string
                                  format: date-time
                              required:
                                - id
                                - note
                                - customer_id
                                - created_at
                          default_address:
                            title: Address
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                              name:
                                example: John Doe
                                type: string
                              address1:
                                example: 123 Main St
                                type: string
                              address2:
                                example: Apt 4B
                                type:
                                  - string
                                  - 'null'
                              address3:
                                example: Building 5
                                type:
                                  - string
                                  - 'null'
                              city:
                                example: New York
                                type: string
                              state:
                                example: NY
                                type: string
                              subdivision_code:
                                example: NY
                                type:
                                  - string
                                  - 'null'
                              postal_code:
                                example: '10001'
                                type: string
                              country_code:
                                example: US
                                type:
                                  - string
                                  - 'null'
                              default:
                                description: >-
                                  Use this address by default when there are
                                  multiple addresses
                                example: true
                                type:
                                  - boolean
                                  - 'null'
                                default: false
                              first_name:
                                example: John
                                type: string
                              last_name:
                                example: Doe
                                type: string
                            required:
                              - id
                              - name
                              - address1
                              - city
                              - state
                              - postal_code
                              - first_name
                              - last_name
                          addresses:
                            type: array
                            items:
                              title: Address
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  example: John Doe
                                  type: string
                                address1:
                                  example: 123 Main St
                                  type: string
                                address2:
                                  example: Apt 4B
                                  type:
                                    - string
                                    - 'null'
                                address3:
                                  example: Building 5
                                  type:
                                    - string
                                    - 'null'
                                city:
                                  example: New York
                                  type: string
                                state:
                                  example: NY
                                  type: string
                                subdivision_code:
                                  example: NY
                                  type:
                                    - string
                                    - 'null'
                                postal_code:
                                  example: '10001'
                                  type: string
                                country_code:
                                  example: US
                                  type:
                                    - string
                                    - 'null'
                                default:
                                  description: >-
                                    Use this address by default when there are
                                    multiple addresses
                                  example: true
                                  type:
                                    - boolean
                                    - 'null'
                                  default: false
                                first_name:
                                  example: John
                                  type: string
                                last_name:
                                  example: Doe
                                  type: string
                              required:
                                - id
                                - name
                                - address1
                                - city
                                - state
                                - postal_code
                                - first_name
                                - last_name
                          active_subscriptions_count:
                            example: 10
                            type: integer
                          inactive_subscriptions_count:
                            example: 10
                            type: integer
                          is_rep:
                            example: true
                            type: boolean
                        required:
                          - id
                          - full_name
                          - email
                          - created_at
                          - display_total_spent
                          - metadata
                          - active
                          - total_spent
                          - customer_notes
                          - addresses
                          - active_subscriptions_count
                          - inactive_subscriptions_count
                          - is_rep
                      variant:
                        title: Variant
                        type: object
                        properties:
                          id:
                            type: integer
                          title:
                            example: Variant 1
                            type:
                              - string
                              - 'null'
                          image_url:
                            example: https://via.placeholder.com/150
                            type:
                              - string
                              - 'null'
                          image_path:
                            example: https://via.placeholder.com/150
                            type:
                              - string
                              - 'null'
                          sku:
                            example: SKU-123456
                            type:
                              - string
                              - 'null'
                          primary_image:
                            example: https://via.placeholder.com/150
                            type:
                              - string
                              - 'null'
                          price:
                            example: 100
                            type:
                              - number
                              - 'null'
                          price_in_currency:
                            example: USD 100.00
                            type: string
                          options:
                            items:
                              type: object
                              properties:
                                title:
                                  type: string
                                  example: Size
                                value:
                                  type: string
                                  example: XL
                            type: array
                          product:
                            title: Product
                            type: object
                            properties:
                              id:
                                type: integer
                              title:
                                type: string
                              image_url:
                                type:
                                  - string
                                  - 'null'
                              image_path:
                                type:
                                  - string
                                  - 'null'
                              price:
                                type:
                                  - number
                                  - string
                                  - 'null'
                                default: '0.0'
                                minimum: 0
                                maximum: 99999999
                              cv:
                                type:
                                  - integer
                                  - 'null'
                                default: 0
                              tax:
                                type:
                                  - number
                                  - string
                                  - 'null'
                                default: '0.0'
                              sku:
                                type:
                                  - string
                                  - 'null'
                              price_in_currency:
                                type: string
                              tax_in_currency:
                                type: string
                              cv_in_currency:
                                type: string
                            required:
                              - id
                              - title
                              - price_in_currency
                              - tax_in_currency
                              - cv_in_currency
                        required:
                          - id
                          - price_in_currency
                          - options
                          - product
                      address:
                        title: Address
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: John Doe
                            type: string
                          address1:
                            example: 123 Main St
                            type: string
                          address2:
                            example: Apt 4B
                            type:
                              - string
                              - 'null'
                          address3:
                            example: Building 5
                            type:
                              - string
                              - 'null'
                          city:
                            example: New York
                            type: string
                          state:
                            example: NY
                            type: string
                          subdivision_code:
                            example: NY
                            type:
                              - string
                              - 'null'
                          postal_code:
                            example: '10001'
                            type: string
                          country_code:
                            example: US
                            type:
                              - string
                              - 'null'
                          default:
                            description: >-
                              Use this address by default when there are
                              multiple addresses
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: false
                          first_name:
                            example: John
                            type: string
                          last_name:
                            example: Doe
                            type: string
                        required:
                          - id
                          - name
                          - address1
                          - city
                          - state
                          - postal_code
                          - first_name
                          - last_name
                      payment_method:
                        title: Commerce::PaymentMethod
                        type: object
                        properties:
                          id:
                            type: integer
                          source:
                            type: string
                            enum:
                              - apple_pay
                              - paypal
                              - card
                              - iap
                              - bread
                              - affirm
                              - google_pay
                              - klarna
                              - droplet
                          created_at:
                            type: string
                            format: date-time
                          updated_at:
                            type: string
                            format: date-time
                          default:
                            type: boolean
                          payment_type:
                            example: Credit Card
                            type: string
                          details:
                            type: object
                        required:
                          - id
                          - source
                          - created_at
                          - updated_at
                          - default
                          - payment_type
                          - details
                      currency:
                        title: Currency
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: United States Dollar
                            type:
                              - string
                              - 'null'
                          code:
                            example: USD
                            type: string
                          rate:
                            example: 1
                            type:
                              - number
                              - string
                              - 'null'
                          active:
                            example: true
                            type:
                              - boolean
                              - 'null'
                            default: false
                          symbol:
                            example: $
                            type:
                              - string
                              - 'null'
                        required:
                          - id
                          - code
                      country:
                        title: Country
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            example: United States
                            type: string
                          iso:
                            description: 2-letter country code (ISO 3166-1 alpha-2)
                            example: US
                            type: string
                        required:
                          - id
                          - name
                          - iso
                      company:
                        title: Company
                        type: object
                        properties:
                          id:
                            type: integer
                        required:
                          - id
                      subscription_skips:
                        type: array
                        items:
                          title: Commerce::SubscriptionSkip
                          type: object
                          properties:
                            id:
                              type: integer
                            skipped_date:
                              example: '2025-01-01T00:00:00Z'
                              type: string
                              format: date
                            reason:
                              example: Customer requested to skip next billing
                              type:
                                - 'null'
                            created_at:
                              example: '2025-01-01T00:00:00Z'
                              type: string
                              format: date-time
                            updated_at:
                              example: '2025-01-01T00:00:00Z'
                              type: string
                              format: date-time
                          required:
                            - id
                            - skipped_date
                            - created_at
                            - updated_at
                      orders:
                        type: array
                        items:
                          title: Commerce::Order
                          type: object
                          properties:
                            id:
                              type: integer
                            first_name:
                              type:
                                - string
                                - 'null'
                            last_name:
                              type:
                                - string
                                - 'null'
                            email:
                              type:
                                - string
                                - 'null'
                            phone:
                              type:
                                - string
                                - 'null'
                            order_number:
                              type:
                                - string
                                - 'null'
                            status:
                              type: string
                              enum:
                                - awaiting_payment
                                - awaiting_shipment
                                - shipped
                                - delivered
                                - archived
                                - cancelled
                                - failed_payment
                                - draft
                            order_type:
                              type: string
                              enum:
                                - requested
                                - purchased
                                - imported
                                - abandoned
                            amount:
                              type:
                                - number
                                - string
                                - 'null'
                              default: '0.0'
                            note:
                              type:
                                - string
                                - 'null'
                            currency_code:
                              type:
                                - string
                                - 'null'
                            created_at:
                              type: string
                              format: date-time
                            updated_at:
                              type: string
                              format: date-time
                            metadata:
                              type:
                                - object
                                - 'null'
                              default: '{}'
                            token:
                              type: string
                            refundable_amount:
                              type: string
                            shipping_method:
                              title: ShippingMethod
                              type:
                                - object
                                - 'null'
                              properties:
                                id:
                                  type: integer
                                name:
                                  type: string
                                delivery_time_estimate:
                                  type:
                                    - string
                                    - 'null'
                              required:
                                - id
                                - name
                            items_quantity:
                              example: 5
                              type: integer
                          required:
                            - id
                            - status
                            - order_type
                            - created_at
                            - updated_at
                            - token
                            - refundable_amount
                            - items_quantity
                    required:
                      - id
                      - next_bill_date
                      - status
                      - quantity
                      - price
                      - original_price
                      - created_at
                      - updated_at
                      - in_trial
                      - subscription_plan
                      - customer
                      - variant
                      - address
                      - payment_method
                      - currency
                      - country
                      - company
                      - subscription_skips
                      - orders
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - subscription
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
  /api/subscriptions/{id}/orders:
    get:
      summary: Show orders created from the subscription
      description: Show a subscription
      tags:
        - Subscriptions
      operationId: showOrders
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
        - name: customer_id
          in: query
          required: false
          schema:
            type: integer
        - name: sort_by
          in: query
          required: false
          description: Sort field for orders
          schema:
            type: string
            enum:
              - created_at
              - id
              - no_of_items
              - amount
        - name: sort_direction
          in: query
          required: false
          description: Sort direction
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  orders:
                    type: array
                    items:
                      title: Commerce::Order
                      type: object
                      properties:
                        id:
                          type: integer
                        first_name:
                          type:
                            - string
                            - 'null'
                        last_name:
                          type:
                            - string
                            - 'null'
                        email:
                          type:
                            - string
                            - 'null'
                        phone:
                          type:
                            - string
                            - 'null'
                        order_number:
                          type:
                            - string
                            - 'null'
                        status:
                          type: string
                          enum:
                            - awaiting_payment
                            - awaiting_shipment
                            - shipped
                            - delivered
                            - archived
                            - cancelled
                            - failed_payment
                            - draft
                        order_type:
                          type: string
                          enum:
                            - requested
                            - purchased
                            - imported
                            - abandoned
                        amount:
                          type:
                            - number
                            - string
                            - 'null'
                          default: '0.0'
                        note:
                          type:
                            - string
                            - 'null'
                        currency_code:
                          type:
                            - string
                            - 'null'
                        created_at:
                          type: string
                          format: date-time
                        updated_at:
                          type: string
                          format: date-time
                        metadata:
                          type:
                            - object
                            - 'null'
                          default: '{}'
                        token:
                          type: string
                        refundable_amount:
                          type: string
                      required:
                        - id
                        - status
                        - order_type
                        - created_at
                        - updated_at
                        - token
                        - refundable_amount
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - orders
  /api/company/tags:
    get:
      summary: List Tags
      tags:
        - Tags
      security:
        - bearer_auth: []
      operationId: listTags
      parameters: []
      responses:
        '200':
          description: tags found
          content:
            application/json:
              schema:
                type: object
                properties:
                  tag:
                    type: array
                    items:
                      title: Tag
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          example: Bundle
                          type: string
                        source:
                          example: product
                          type: string
                      required:
                        - id
                        - name
                        - source
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
    post:
      summary: Create Tags
      tags:
        - Tags
      security:
        - bearer_auth: []
      operationId: createTag
      parameters: []
      responses:
        '201':
          description: tags created
          content:
            application/json:
              schema:
                type: object
                properties:
                  tag:
                    title: Tag
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        example: Bundle
                        type: string
                      source:
                        example: product
                        type: string
                    required:
                      - id
                      - name
                      - source
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: unprocessable entity
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                tag:
                  type: object
                  properties:
                    name:
                      type: string
                    source:
                      type: string
                  required:
                    - name
                    - source
              required:
                - tag
        required: true
  /api/tax_categories:
    get:
      summary: Get tax categories
      tags:
        - Tax Categories
      operationId: getTaxCategories
      security:
        - bearer_auth: []
      description: Get the tax categories
      parameters:
        - name: parent_id
          in: query
          required: false
          description: Children of this Category id
          schema:
            type: integer
        - name: search
          in: query
          required: false
          description: Search Keyword
          example: Tangible personal property
          schema:
            type: string
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  tax_categories:
                    type: array
                    items:
                      title: TaxCategory
                      type: object
                      properties:
                        id:
                          type: integer
                        code:
                          example: SV010020
                          type: string
                        title:
                          example: Tangible personal property (tpp)
                          type: string
                        has_children:
                          description: >-
                            Indicates whether the tax category has any
                            sub-categories
                          example: true
                          type: boolean
                        selectable:
                          description: >-
                            Indicates whether the tax category can be
                            selected.          Only categories with tax codes
                            are selectable
                          example: true
                          type: boolean
                        parent_id:
                          description: >-
                            ID of the parent tax category, null for root
                            categories
                          example: 123
                          type:
                            - integer
                            - 'null'
                        parent_title:
                          description: >-
                            Title of the parent tax category, null for root
                            categories
                          example: Parent Category
                          type:
                            - string
                            - 'null'
                      required:
                        - id
                        - code
                        - title
                        - has_children
                        - selectable
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
  /api/tax_categories/{id}:
    get:
      summary: Retrieve a tax category
      tags:
        - Tax Categories
      operationId: getTaxCategory
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: tax category found
          content:
            application/json:
              schema:
                type: object
                properties:
                  tax_category:
                    title: TaxCategory
                    type: object
                    properties:
                      id:
                        type: integer
                      code:
                        example: SV010020
                        type: string
                      title:
                        example: Tangible personal property (tpp)
                        type: string
                      has_children:
                        description: >-
                          Indicates whether the tax category has any
                          sub-categories
                        example: true
                        type: boolean
                      selectable:
                        description: >-
                          Indicates whether the tax category can be
                          selected.          Only categories with tax codes are
                          selectable
                        example: true
                        type: boolean
                      parent_id:
                        description: >-
                          ID of the parent tax category, null for root
                          categories
                        example: 123
                        type:
                          - integer
                          - 'null'
                      parent_title:
                        description: >-
                          Title of the parent tax category, null for root
                          categories
                        example: Parent Category
                        type:
                          - string
                          - 'null'
                    required:
                      - id
                      - code
                      - title
                      - has_children
                      - selectable
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
  /api/tracking_informations:
    get:
      summary: List tracking informations
      description: List all tracking informations
      tags:
        - Tracking Informations
      operationId: listTrackingInformations
      security:
        - bearer_auth: []
      parameters:
        - name: order_id
          in: query
          required: false
          description: Filter by order ID
          schema:
            type: integer
        - name: order_fulfillment_id
          in: query
          required: false
          description: Filter by order fulfillment ID
          schema:
            type: integer
        - name: page
          in: query
          required: false
          description: Page number
          schema:
            type: integer
        - name: per_page
          in: query
          required: false
          description: Items per page
          schema:
            type: integer
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  json:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        tracking_number:
                          type: string
                          example: 1Z999AA10123456784
                        shipping_carrier:
                          type: string
                          example: UPS
                        created_at:
                          type: string
                          format: date-time
                        updated_at:
                          type: string
                          format: date-time
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      timestamp:
                        type: string
                        format: date-time
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                          total_pages:
                            type: integer
                          total_count:
                            type: integer
                          per_page:
                            type: integer
    post:
      summary: Create tracking information
      tags:
        - Tracking Informations
      operationId: createTrackingInformation
      description: Create a new tracking information
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  tracking_number:
                    type: string
                    example: 1Z999AA10123456784
                  shipping_carrier:
                    type: string
                    example: UPS
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: order not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    properties:
                      base:
                        type: array
                        items:
                          type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                tracking_information:
                  type: object
                  properties:
                    tracking_number:
                      type: string
                    shipping_carrier:
                      type: string
                    order_id:
                      type: integer
                    order_fulfillment_id:
                      type: integer
                  required:
                    - tracking_number
                    - order_id
              required:
                - tracking_information
  /api/tracking_informations/{id}:
    get:
      summary: Show tracking information
      tags:
        - Tracking Informations
      operationId: showTrackingInformation
      description: Show a specific tracking information
      security:
        - bearer_auth: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  tracking_number:
                    type: string
                    example: 1Z999AA10123456784
                  shipping_carrier:
                    type: string
                    example: UPS
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    properties:
                      base:
                        type: array
                        items:
                          type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
    put:
      summary: Update tracking information
      tags:
        - Tracking Informations
      operationId: updateTrackingInformation
      description: Update a tracking information
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  tracking_number:
                    type: string
                    example: 1Z999AA10123456784
                  shipping_carrier:
                    type: string
                    example: UPS
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    properties:
                      base:
                        type: array
                        items:
                          type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                tracking_information:
                  type: object
                  properties:
                    tracking_number:
                      type: string
                    shipping_carrier:
                      type: string
                    order_fulfillment_id:
                      type: integer
              required:
                - tracking_information
    delete:
      summary: Delete tracking information
      tags:
        - Tracking Informations
      operationId: deleteTrackingInformation
      description: Delete a tracking information
      security:
        - bearer_auth: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    properties:
                      base:
                        type: array
                        items:
                          type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
    parameters:
      - name: id
        in: path
        description: Tracking Information ID
        required: true
        schema:
          type: integer
  /api/trees/{tree_id}/tree_nodes:
    get:
      summary: List of tree nodes
      description: List all tree nodes
      tags:
        - Tree Nodes
      operationId: listTreeNodes
      security:
        - bearer_auth: []
      parameters:
        - name: tree_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  tree_nodes:
                    type: array
                    items:
                      title: TreeNode
                      type: object
                      properties:
                        id:
                          type: integer
                        member_id:
                          description: The ID of the member
                          example: 110
                          type: integer
                        member_type:
                          description: Can either be a Customer or an UserCompany/Rep
                          example: Customer
                          type: string
                        created_at:
                          example: '2021-01-01T00:00:00Z'
                          type: string
                          format: date-time
                        updated_at:
                          example: '2021-01-01T00:00:00Z'
                          type: string
                          format: date-time
                      required:
                        - id
                        - member_id
                        - member_type
                        - created_at
                        - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - tree_nodes
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
    post:
      summary: Create a tree node
      description: Create a tree node
      tags:
        - Tree Nodes
      operationId: createTreeNode
      security:
        - bearer_auth: []
      parameters:
        - name: tree_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '201':
          description: success with parent
          content:
            application/json:
              schema:
                type: object
                properties:
                  tree_node:
                    title: TreeNode
                    type: object
                    properties:
                      id:
                        type: integer
                      member_id:
                        description: The ID of the member
                        example: 110
                        type: integer
                      member_type:
                        description: Can either be a Customer or an UserCompany/Rep
                        example: Customer
                        type: string
                      created_at:
                        example: '2021-01-01T00:00:00Z'
                        type: string
                        format: date-time
                      updated_at:
                        example: '2021-01-01T00:00:00Z'
                        type: string
                        format: date-time
                    required:
                      - id
                      - member_id
                      - member_type
                      - created_at
                      - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - tree_node
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                tree_node:
                  type: object
                  properties:
                    member_id:
                      type: integer
                    member_type:
                      type: string
                    parent_id:
                      type: integer
                  required:
                    - member_id
                    - member_type
              required:
                - tree_id
                - tree_node
  /api/trees/{tree_id}/tree_nodes/{id}:
    get:
      summary: Show a tree node
      description: Show a tree node
      tags:
        - Tree Nodes
      operationId: showTreeNode
      security:
        - bearer_auth: []
      parameters:
        - name: tree_id
          in: path
          required: true
          schema:
            type: integer
        - name: id
          in: path
          required: true
          schema:
            type: integer
        - name: downline
          in: query
          schema:
            type: boolean
          required: false
          description: Include downline in response
      responses:
        '200':
          description: success with downline
          content:
            application/json:
              schema:
                type: object
                properties:
                  tree_node:
                    title: TreeNode
                    type: object
                    properties:
                      id:
                        type: integer
                      member_id:
                        description: The ID of the member
                        example: 110
                        type: integer
                      member_type:
                        description: Can either be a Customer or an UserCompany/Rep
                        example: Customer
                        type: string
                      created_at:
                        example: '2021-01-01T00:00:00Z'
                        type: string
                        format: date-time
                      updated_at:
                        example: '2021-01-01T00:00:00Z'
                        type: string
                        format: date-time
                      downline:
                        type: array
                    required:
                      - id
                      - member_id
                      - member_type
                      - created_at
                      - updated_at
                      - downline
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - tree_node
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
    put:
      summary: Update a tree node
      description: Update a tree node
      tags:
        - Tree Nodes
      operationId: updateTreeNode
      security:
        - bearer_auth: []
      parameters:
        - name: tree_id
          in: path
          required: true
          schema:
            type: integer
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  tree_node:
                    title: TreeNode
                    type: object
                    properties:
                      id:
                        type: integer
                      member_id:
                        description: The ID of the member
                        example: 110
                        type: integer
                      member_type:
                        description: Can either be a Customer or an UserCompany/Rep
                        example: Customer
                        type: string
                      created_at:
                        example: '2021-01-01T00:00:00Z'
                        type: string
                        format: date-time
                      updated_at:
                        example: '2021-01-01T00:00:00Z'
                        type: string
                        format: date-time
                    required:
                      - id
                      - member_id
                      - member_type
                      - created_at
                      - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - tree_node
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                tree_node:
                  type: object
                  properties:
                    member_id:
                      type: integer
                    member_type:
                      type: string
                    parent_id:
                      type: integer
                  required:
                    - member_id
                    - member_type
              required:
                - tree_id
                - id
                - tree_node
    delete:
      summary: Delete a tree node
      description: Delete a tree node
      tags:
        - Tree Nodes
      operationId: destroyTreeNode
      security:
        - bearer_auth: []
      parameters:
        - name: tree_id
          in: path
          required: true
          schema:
            type: integer
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  tree_node:
                    title: TreeNode
                    type: object
                    properties:
                      id:
                        type: integer
                    required:
                      - id
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - tree_node
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
  /api/trees:
    get:
      summary: List of trees
      description: List all trees
      tags:
        - Trees
      operationId: listTrees
      security:
        - bearer_auth: []
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  trees:
                    type: array
                    items:
                      title: Tree
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          example: Test Tree
                          type: string
                        tree_type:
                          example: enrollment
                          type: string
                        settings:
                          example:
                            enabled: true
                          type:
                            - object
                            - 'null'
                          default: '{}'
                        created_at:
                          example: '2021-01-01T00:00:00Z'
                          type: string
                          format: date-time
                        updated_at:
                          example: '2021-01-01T00:00:00Z'
                          type: string
                          format: date-time
                      required:
                        - id
                        - name
                        - tree_type
                        - created_at
                        - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - trees
    post:
      summary: Create a tree
      description: Create a tree
      tags:
        - Trees
      operationId: createTree
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  tree:
                    title: Tree
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        example: Test Tree
                        type: string
                      tree_type:
                        example: enrollment
                        type: string
                      settings:
                        example:
                          enabled: true
                        type:
                          - object
                          - 'null'
                        default: '{}'
                      created_at:
                        example: '2021-01-01T00:00:00Z'
                        type: string
                        format: date-time
                      updated_at:
                        example: '2021-01-01T00:00:00Z'
                        type: string
                        format: date-time
                    required:
                      - id
                      - name
                      - tree_type
                      - created_at
                      - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - tree
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                tree:
                  type: object
                  properties:
                    name:
                      type: string
                    tree_type:
                      type: string
                    settings:
                      type: object
                  required:
                    - name
                    - tree_type
              required:
                - tree
  /api/trees/{id}:
    get:
      summary: Show a tree
      description: Show a tree
      tags:
        - Trees
      operationId: showTree
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  tree:
                    title: Tree
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        example: Test Tree
                        type: string
                      tree_type:
                        example: enrollment
                        type: string
                      settings:
                        example:
                          enabled: true
                        type:
                          - object
                          - 'null'
                        default: '{}'
                      created_at:
                        example: '2021-01-01T00:00:00Z'
                        type: string
                        format: date-time
                      updated_at:
                        example: '2021-01-01T00:00:00Z'
                        type: string
                        format: date-time
                    required:
                      - id
                      - name
                      - tree_type
                      - created_at
                      - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - tree
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
    put:
      summary: Update a tree
      description: Update a tree
      tags:
        - Trees
      operationId: updateTree
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  tree:
                    title: Tree
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        example: Test Tree
                        type: string
                      tree_type:
                        example: enrollment
                        type: string
                      settings:
                        example:
                          enabled: true
                        type:
                          - object
                          - 'null'
                        default: '{}'
                      created_at:
                        example: '2021-01-01T00:00:00Z'
                        type: string
                        format: date-time
                      updated_at:
                        example: '2021-01-01T00:00:00Z'
                        type: string
                        format: date-time
                    required:
                      - id
                      - name
                      - tree_type
                      - created_at
                      - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - tree
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                tree:
                  type: object
                  properties:
                    name:
                      type: string
                      example: Test Tree
                    tree_type:
                      type: string
                      enum:
                        - enrollment
                        - placement
                        - other
                      example: enrollment
                    settings:
                      type: object
                      example:
                        test: true
                  required:
                    - name
                    - tree_type
              required:
                - tree
    delete:
      summary: Delete a tree
      description: Delete a tree
      tags:
        - Trees
      operationId: destroyTree
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  tree:
                    title: Tree
                    type: object
                    properties:
                      id:
                        type: integer
                    required:
                      - id
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - tree
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
  /api/v202506/users:
    post:
      summary: Creates a user
      tags:
        - Users
      operationId: createUserInvalidRole
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: user created with admin role and admin_roles
          content:
            application/json:
              schema:
                type: object
                properties:
                  user_company:
                    title: UserCompany
                    type: object
                    properties:
                      id:
                        type: integer
                      first_name:
                        description: User's first name
                        example: John
                        type:
                          - string
                          - 'null'
                      last_name:
                        description: User's last name
                        example: Doe
                        type:
                          - string
                          - 'null'
                      image_url:
                        description: User's image URL
                        example: https://example.com/image.jpg
                        type:
                          - string
                          - 'null'
                      company_id:
                        description: ID of the company the user belongs to
                        example: 42
                        type:
                          - integer
                          - 'null'
                      external_id:
                        description: External identifier for the user
                        example: EXT123456
                        type:
                          - string
                          - 'null'
                      username:
                        description: User's unique username within the company
                        example: johny_jobs
                        type:
                          - string
                          - 'null'
                      active:
                        default: true
                        description: Whether the user is active in the company
                        example: true
                        type: boolean
                      mysite_url:
                        description: URL to the user's personal site
                        example: https://mycompany.com/johny_jobs
                        type:
                          - string
                          - 'null'
                      rank:
                        description: External ID of Rank the User is linked to
                        example: '234234'
                        type:
                          - integer
                          - string
                          - 'null'
                      share_guid:
                        description: Unique identifier for sharing content
                        example: a6848f0b
                        type:
                          - string
                          - 'null'
                      legacy_number:
                        description: User's legacy phone number
                        example: '+18001234567'
                        type:
                          - string
                          - 'null'
                      created_at:
                        description: Date and time the user was created
                        example: '2021-01-01T00:00:00Z'
                        type:
                          - string
                          - 'null'
                      roles:
                        description: Roles of the user
                        example:
                          - customer_service
                          - developer
                        type:
                          - array
                          - 'null'
                      affiliate:
                        description: User's affiliate information
                        example: >-
                          {id: 1, external_id: 3, username: "johny_jobs", email:
                          "johny.jobs@example.com", credit: "a6848f0b"}
                        type:
                          - object
                          - 'null'
                      rank_id:
                        description: ID of Rank the User is linked to
                        example: 234234
                        type:
                          - integer
                          - 'null'
                      user:
                        title: User
                        type: object
                        properties:
                          id:
                            type: integer
                          first_name:
                            description: User's first name
                            example: John
                            type:
                              - string
                              - 'null'
                          last_name:
                            description: User's last name
                            example: Doe
                            type:
                              - string
                              - 'null'
                          email:
                            description: User's email address
                            example: john@example.com
                            type:
                              - string
                              - 'null'
                          avatar:
                            description: User's avatar URL
                            example: https://example.com/avatar.jpg
                            type:
                              - string
                              - 'null'
                          phone:
                            description: User's phone
                            example: '+18018888888'
                            type:
                              - string
                              - 'null'
                          google_id:
                            description: User's Google Id
                            example: ''
                            type:
                              - string
                              - 'null'
                          bio:
                            description: User's Bio
                            example: >-
                              Software engineer passionate about creating
                              intuitive user experiences
                            type:
                              - string
                              - 'null'
                          facebook:
                            description: User's Facebook profile URL
                            example: https://facebook.com/johndoe
                            type:
                              - string
                              - 'null'
                          instagram:
                            description: User's Instagram handle
                            example: johndoe_insta
                            type:
                              - string
                              - 'null'
                          twitter:
                            description: User's Twitter/X handle
                            example: johndoe_tweets
                            type:
                              - string
                              - 'null'
                          linkedin:
                            description: User's LinkedIn profile URL
                            example: https://linkedin.com/in/johndoe
                            type:
                              - string
                              - 'null'
                          whatsapp:
                            description: User's WhatsApp number
                            example: '+18019999999'
                            type:
                              - string
                              - 'null'
                          wechat:
                            description: User's WeChat ID
                            example: johndoe_wechat
                            type:
                              - string
                              - 'null'
                          youtube:
                            description: User's YouTube channel URL
                            example: https://youtube.com/channel/UC123abc456def
                            type:
                              - string
                              - 'null'
                          zip_code:
                            description: User's ZIP/postal code
                            example: '84102'
                            type:
                              - string
                              - 'null'
                          dob:
                            description: User's date of birth
                            example: '1990-05-15'
                            type:
                              - string
                              - 'null'
                          gender:
                            description: User's gender
                            example: male
                            type:
                              - string
                              - 'null'
                          time_zone:
                            description: User's time zone
                            example: America/New_York
                            type:
                              - string
                              - 'null'
                          dnd:
                            default: 'off'
                            description: User's Do Not Disturb preference
                            example: 'true'
                            type:
                              - string
                              - 'null'
                          user_type:
                            description: Type of user
                            example: admin
                            type:
                              - string
                              - 'null'
                          language:
                            title: Language
                            type: object
                            properties:
                              id:
                                type: integer
                              name:
                                example: English
                                type:
                                  - string
                                  - 'null'
                              iso:
                                example: en
                                type:
                                  - string
                                  - 'null'
                            required:
                              - id
                          country:
                            title: Country
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                              name:
                                example: United States
                                type: string
                              iso:
                                description: 2-letter country code (ISO 3166-1 alpha-2)
                                example: US
                                type: string
                            required:
                              - id
                              - name
                              - iso
                        required:
                          - id
                          - first_name
                          - last_name
                          - email
                          - avatar
                          - phone
                          - google_id
                          - bio
                          - facebook
                          - instagram
                          - twitter
                          - linkedin
                          - whatsapp
                          - wechat
                          - youtube
                          - zip_code
                          - dob
                          - gender
                          - time_zone
                          - dnd
                          - user_type
                          - language
                    required:
                      - id
                      - first_name
                      - last_name
                      - company_id
                      - external_id
                      - username
                      - active
                      - mysite_url
                      - rank
                      - share_guid
                      - legacy_number
                      - created_at
                      - roles
                      - affiliate
                      - rank_id
                      - user
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - user_company
                  - meta
        '422':
          description: invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Invalid parameters
                  errors:
                    type: object
                    properties:
                      admin_roles:
                        type: array
                        items:
                          type: string
                        example:
                          - Admin roles can only be set when role is admin
                      role_assignments.role:
                        type: array
                        items:
                          type: string
                        example:
                          - company_id mismatch
                      role_assignments:
                        type: array
                        items:
                          type: string
                        example:
                          - is invalid
                      user.user_companies.role_assignments.role:
                        type: array
                        items:
                          type: string
                        example:
                          - company_id mismatch
                      user.user_companies.role_assignments:
                        type: array
                        items:
                          type: string
                        example:
                          - is invalid
                      user:
                        type: object
                        properties:
                          role:
                            type: array
                            items:
                              type: string
                            example:
                              - 'must be one of: admin, rep, user'
                    example:
                      country_code:
                        - is missing
                      language_code:
                        - is missing
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                country_code:
                  type: string
                language_code:
                  type: string
                user:
                  type: object
                  properties:
                    email:
                      type: string
                    first_name:
                      type: string
                    last_name:
                      type: string
                    password:
                      type: string
                    avatar:
                      type: string
                    phone:
                      type: string
                    google_id:
                      type: string
                    bio:
                      type: string
                    facebook:
                      type: string
                    instagram:
                      type: string
                    twitter:
                      type: string
                    linkedin:
                      type: string
                    whatsapp:
                      type: string
                    wechat:
                      type: string
                    youtube:
                      type: string
                    zip_code:
                      type: string
                    dob:
                      type: string
                      format: date
                    gender:
                      type: string
                    time_zone:
                      type: string
                    push_notifications:
                      type: boolean
                    email_notifications:
                      type: boolean
                    sms_notifications:
                      type: boolean
                    external_id:
                      type: string
                    username:
                      type: string
                    active:
                      type: boolean
                    role:
                      type: string
                      enum:
                        - admin
                        - rep
                        - user
                    admin_roles:
                      type: array
                      items:
                        type: integer
                    affiliate:
                      type: object
                      properties:
                        id:
                          type: string
                        external_id:
                          type: string
                        username:
                          type: string
                        email:
                          type: string
                      required: []
                  required:
                    - email
                    - affiliate
              required:
                - country_code
                - language_code
                - user
    get:
      summary: Get users with optional filters
      tags:
        - Users
      operationId: indexUsers
      security:
        - bearer_auth: []
      parameters:
        - name: search_query
          in: query
          required: false
          description: >-
            Filter users with search query that matches with their first name,
            last name or email
          schema:
            type: string
        - name: role
          in: query
          required: false
          example: rep
          description: Filter users by their roles.
          schema:
            type: string
        - name: sorted_by
          in: query
          required: false
          example: first_name_asc
          description: >
            Sort the records by one of the supported attributes:

              - first_name

            The sort attribute should be followed by one of the order
            directives: '_asc', '_desc'
          schema:
            type: string
        - name: page
          in: query
          schema:
            type: integer
            default: 1
          required: false
          description: Page number for pagination
        - name: per_page
          in: query
          schema:
            type: integer
            default: 50
          required: false
          description: Number of records per page
        - name: by_metadata
          in: query
          schema:
            type: string
            default: '{}'
            format: json
          required: false
          description: Search JSON meta data
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  user_companies:
                    type: array
                    items:
                      title: UserCompany
                      type: object
                      properties:
                        id:
                          type: integer
                        first_name:
                          description: User's first name
                          example: John
                          type:
                            - string
                            - 'null'
                        last_name:
                          description: User's last name
                          example: Doe
                          type:
                            - string
                            - 'null'
                        image_url:
                          description: User's image URL
                          example: https://example.com/image.jpg
                          type:
                            - string
                            - 'null'
                        company_id:
                          description: ID of the company the user belongs to
                          example: 42
                          type:
                            - integer
                            - 'null'
                        external_id:
                          description: External identifier for the user
                          example: EXT123456
                          type:
                            - string
                            - 'null'
                        username:
                          description: User's unique username within the company
                          example: johny_jobs
                          type:
                            - string
                            - 'null'
                        active:
                          default: true
                          description: Whether the user is active in the company
                          example: true
                          type: boolean
                        mysite_url:
                          description: URL to the user's personal site
                          example: https://mycompany.com/johny_jobs
                          type:
                            - string
                            - 'null'
                        rank:
                          description: External ID of Rank the User is linked to
                          example: '234234'
                          type:
                            - integer
                            - string
                            - 'null'
                        share_guid:
                          description: Unique identifier for sharing content
                          example: a6848f0b
                          type:
                            - string
                            - 'null'
                        legacy_number:
                          description: User's legacy phone number
                          example: '+18001234567'
                          type:
                            - string
                            - 'null'
                        created_at:
                          description: Date and time the user was created
                          example: '2021-01-01T00:00:00Z'
                          type:
                            - string
                            - 'null'
                        roles:
                          description: Roles of the user
                          example:
                            - customer_service
                            - developer
                          type:
                            - array
                            - 'null'
                        affiliate:
                          description: User's affiliate information
                          example: >-
                            {id: 1, external_id: 3, username: "johny_jobs",
                            email: "johny.jobs@example.com", credit: "a6848f0b"}
                          type:
                            - object
                            - 'null'
                        rank_id:
                          description: ID of Rank the User is linked to
                          example: 234234
                          type:
                            - integer
                            - 'null'
                        user:
                          title: User
                          type: object
                          properties:
                            id:
                              type: integer
                            first_name:
                              description: User's first name
                              example: John
                              type:
                                - string
                                - 'null'
                            last_name:
                              description: User's last name
                              example: Doe
                              type:
                                - string
                                - 'null'
                            email:
                              description: User's email address
                              example: john@example.com
                              type:
                                - string
                                - 'null'
                            avatar:
                              description: User's avatar URL
                              example: https://example.com/avatar.jpg
                              type:
                                - string
                                - 'null'
                            phone:
                              description: User's phone
                              example: '+18018888888'
                              type:
                                - string
                                - 'null'
                            google_id:
                              description: User's Google Id
                              example: ''
                              type:
                                - string
                                - 'null'
                            bio:
                              description: User's Bio
                              example: >-
                                Software engineer passionate about creating
                                intuitive user experiences
                              type:
                                - string
                                - 'null'
                            facebook:
                              description: User's Facebook profile URL
                              example: https://facebook.com/johndoe
                              type:
                                - string
                                - 'null'
                            instagram:
                              description: User's Instagram handle
                              example: johndoe_insta
                              type:
                                - string
                                - 'null'
                            twitter:
                              description: User's Twitter/X handle
                              example: johndoe_tweets
                              type:
                                - string
                                - 'null'
                            linkedin:
                              description: User's LinkedIn profile URL
                              example: https://linkedin.com/in/johndoe
                              type:
                                - string
                                - 'null'
                            whatsapp:
                              description: User's WhatsApp number
                              example: '+18019999999'
                              type:
                                - string
                                - 'null'
                            wechat:
                              description: User's WeChat ID
                              example: johndoe_wechat
                              type:
                                - string
                                - 'null'
                            youtube:
                              description: User's YouTube channel URL
                              example: https://youtube.com/channel/UC123abc456def
                              type:
                                - string
                                - 'null'
                            zip_code:
                              description: User's ZIP/postal code
                              example: '84102'
                              type:
                                - string
                                - 'null'
                            dob:
                              description: User's date of birth
                              example: '1990-05-15'
                              type:
                                - string
                                - 'null'
                            gender:
                              description: User's gender
                              example: male
                              type:
                                - string
                                - 'null'
                            time_zone:
                              description: User's time zone
                              example: America/New_York
                              type:
                                - string
                                - 'null'
                            dnd:
                              default: 'off'
                              description: User's Do Not Disturb preference
                              example: 'true'
                              type:
                                - string
                                - 'null'
                            user_type:
                              description: Type of user
                              example: admin
                              type:
                                - string
                                - 'null'
                            language:
                              title: Language
                              type: object
                              properties:
                                id:
                                  type: integer
                                name:
                                  example: English
                                  type:
                                    - string
                                    - 'null'
                                iso:
                                  example: en
                                  type:
                                    - string
                                    - 'null'
                              required:
                                - id
                            country:
                              title: Country
                              type:
                                - object
                                - 'null'
                              properties:
                                id:
                                  type: integer
                                name:
                                  example: United States
                                  type: string
                                iso:
                                  description: 2-letter country code (ISO 3166-1 alpha-2)
                                  example: US
                                  type: string
                              required:
                                - id
                                - name
                                - iso
                          required:
                            - id
                            - first_name
                            - last_name
                            - email
                            - avatar
                            - phone
                            - google_id
                            - bio
                            - facebook
                            - instagram
                            - twitter
                            - linkedin
                            - whatsapp
                            - wechat
                            - youtube
                            - zip_code
                            - dob
                            - gender
                            - time_zone
                            - dnd
                            - user_type
                            - language
                      required:
                        - id
                        - first_name
                        - last_name
                        - company_id
                        - external_id
                        - username
                        - active
                        - mysite_url
                        - rank
                        - share_guid
                        - legacy_number
                        - created_at
                        - roles
                        - affiliate
                        - rank_id
                        - user
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            example: 1
                          total_pages:
                            type: integer
                            example: 10
                          total_count:
                            type: integer
                            example: 100
                          per_page:
                            type: integer
                            example: 10
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Invalid parameters
                  errors:
                    type: object
                    example:
                      by_metadata:
                        - >-
                          The value `{referred_by: {user: 'John},}` in parameter
                          `by_metadata` is not a valid JSON
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: f5473a8c-8a86-4e0e-b3e8-95392003921b
                      timestamp:
                        type: string
                        example: '2024-12-10T08:04:10Z'
  /api/v202506/users/{id}:
    get:
      summary: Retrieves a user
      tags:
        - Users
      operationId: showUser
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          description: User ID or auth token
          required: true
          schema:
            type: string
      responses:
        '200':
          description: user found via auth token
          content:
            application/json:
              schema:
                type: object
                properties:
                  user_company:
                    title: UserCompany
                    type: object
                    properties:
                      id:
                        type: integer
                      first_name:
                        description: User's first name
                        example: John
                        type:
                          - string
                          - 'null'
                      last_name:
                        description: User's last name
                        example: Doe
                        type:
                          - string
                          - 'null'
                      image_url:
                        description: User's image URL
                        example: https://example.com/image.jpg
                        type:
                          - string
                          - 'null'
                      company_id:
                        description: ID of the company the user belongs to
                        example: 42
                        type:
                          - integer
                          - 'null'
                      external_id:
                        description: External identifier for the user
                        example: EXT123456
                        type:
                          - string
                          - 'null'
                      username:
                        description: User's unique username within the company
                        example: johny_jobs
                        type:
                          - string
                          - 'null'
                      active:
                        default: true
                        description: Whether the user is active in the company
                        example: true
                        type: boolean
                      mysite_url:
                        description: URL to the user's personal site
                        example: https://mycompany.com/johny_jobs
                        type:
                          - string
                          - 'null'
                      rank:
                        description: External ID of Rank the User is linked to
                        example: '234234'
                        type:
                          - integer
                          - string
                          - 'null'
                      share_guid:
                        description: Unique identifier for sharing content
                        example: a6848f0b
                        type:
                          - string
                          - 'null'
                      legacy_number:
                        description: User's legacy phone number
                        example: '+18001234567'
                        type:
                          - string
                          - 'null'
                      created_at:
                        description: Date and time the user was created
                        example: '2021-01-01T00:00:00Z'
                        type:
                          - string
                          - 'null'
                      roles:
                        description: Roles of the user
                        example:
                          - customer_service
                          - developer
                        type:
                          - array
                          - 'null'
                      affiliate:
                        description: User's affiliate information
                        example: >-
                          {id: 1, external_id: 3, username: "johny_jobs", email:
                          "johny.jobs@example.com", credit: "a6848f0b"}
                        type:
                          - object
                          - 'null'
                      rank_id:
                        description: ID of Rank the User is linked to
                        example: 234234
                        type:
                          - integer
                          - 'null'
                      user:
                        title: User
                        type: object
                        properties:
                          id:
                            type: integer
                          first_name:
                            description: User's first name
                            example: John
                            type:
                              - string
                              - 'null'
                          last_name:
                            description: User's last name
                            example: Doe
                            type:
                              - string
                              - 'null'
                          email:
                            description: User's email address
                            example: john@example.com
                            type:
                              - string
                              - 'null'
                          avatar:
                            description: User's avatar URL
                            example: https://example.com/avatar.jpg
                            type:
                              - string
                              - 'null'
                          phone:
                            description: User's phone
                            example: '+18018888888'
                            type:
                              - string
                              - 'null'
                          google_id:
                            description: User's Google Id
                            example: ''
                            type:
                              - string
                              - 'null'
                          bio:
                            description: User's Bio
                            example: >-
                              Software engineer passionate about creating
                              intuitive user experiences
                            type:
                              - string
                              - 'null'
                          facebook:
                            description: User's Facebook profile URL
                            example: https://facebook.com/johndoe
                            type:
                              - string
                              - 'null'
                          instagram:
                            description: User's Instagram handle
                            example: johndoe_insta
                            type:
                              - string
                              - 'null'
                          twitter:
                            description: User's Twitter/X handle
                            example: johndoe_tweets
                            type:
                              - string
                              - 'null'
                          linkedin:
                            description: User's LinkedIn profile URL
                            example: https://linkedin.com/in/johndoe
                            type:
                              - string
                              - 'null'
                          whatsapp:
                            description: User's WhatsApp number
                            example: '+18019999999'
                            type:
                              - string
                              - 'null'
                          wechat:
                            description: User's WeChat ID
                            example: johndoe_wechat
                            type:
                              - string
                              - 'null'
                          youtube:
                            description: User's YouTube channel URL
                            example: https://youtube.com/channel/UC123abc456def
                            type:
                              - string
                              - 'null'
                          zip_code:
                            description: User's ZIP/postal code
                            example: '84102'
                            type:
                              - string
                              - 'null'
                          dob:
                            description: User's date of birth
                            example: '1990-05-15'
                            type:
                              - string
                              - 'null'
                          gender:
                            description: User's gender
                            example: male
                            type:
                              - string
                              - 'null'
                          time_zone:
                            description: User's time zone
                            example: America/New_York
                            type:
                              - string
                              - 'null'
                          dnd:
                            default: 'off'
                            description: User's Do Not Disturb preference
                            example: 'true'
                            type:
                              - string
                              - 'null'
                          user_type:
                            description: Type of user
                            example: admin
                            type:
                              - string
                              - 'null'
                          language:
                            title: Language
                            type: object
                            properties:
                              id:
                                type: integer
                              name:
                                example: English
                                type:
                                  - string
                                  - 'null'
                              iso:
                                example: en
                                type:
                                  - string
                                  - 'null'
                            required:
                              - id
                          country:
                            title: Country
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                              name:
                                example: United States
                                type: string
                              iso:
                                description: 2-letter country code (ISO 3166-1 alpha-2)
                                example: US
                                type: string
                            required:
                              - id
                              - name
                              - iso
                        required:
                          - id
                          - first_name
                          - last_name
                          - email
                          - avatar
                          - phone
                          - google_id
                          - bio
                          - facebook
                          - instagram
                          - twitter
                          - linkedin
                          - whatsapp
                          - wechat
                          - youtube
                          - zip_code
                          - dob
                          - gender
                          - time_zone
                          - dnd
                          - user_type
                          - language
                    required:
                      - id
                      - first_name
                      - last_name
                      - company_id
                      - external_id
                      - username
                      - active
                      - mysite_url
                      - rank
                      - share_guid
                      - legacy_number
                      - created_at
                      - roles
                      - affiliate
                      - rank_id
                      - user
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - user_company
        '404':
          description: user not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: User not found
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
    patch:
      summary: Updates a user
      tags:
        - Users
      operationId: updateUserInvalidRole
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          description: User ID or auth token
          required: true
          schema:
            type: string
      responses:
        '200':
          description: user role updated to admin with admin_roles
          content:
            application/json:
              schema:
                type: object
                properties:
                  user_company:
                    title: UserCompany
                    type: object
                    properties:
                      id:
                        type: integer
                      first_name:
                        description: User's first name
                        example: John
                        type:
                          - string
                          - 'null'
                      last_name:
                        description: User's last name
                        example: Doe
                        type:
                          - string
                          - 'null'
                      image_url:
                        description: User's image URL
                        example: https://example.com/image.jpg
                        type:
                          - string
                          - 'null'
                      company_id:
                        description: ID of the company the user belongs to
                        example: 42
                        type:
                          - integer
                          - 'null'
                      external_id:
                        description: External identifier for the user
                        example: EXT123456
                        type:
                          - string
                          - 'null'
                      username:
                        description: User's unique username within the company
                        example: johny_jobs
                        type:
                          - string
                          - 'null'
                      active:
                        default: true
                        description: Whether the user is active in the company
                        example: true
                        type: boolean
                      mysite_url:
                        description: URL to the user's personal site
                        example: https://mycompany.com/johny_jobs
                        type:
                          - string
                          - 'null'
                      rank:
                        description: External ID of Rank the User is linked to
                        example: '234234'
                        type:
                          - integer
                          - string
                          - 'null'
                      share_guid:
                        description: Unique identifier for sharing content
                        example: a6848f0b
                        type:
                          - string
                          - 'null'
                      legacy_number:
                        description: User's legacy phone number
                        example: '+18001234567'
                        type:
                          - string
                          - 'null'
                      created_at:
                        description: Date and time the user was created
                        example: '2021-01-01T00:00:00Z'
                        type:
                          - string
                          - 'null'
                      roles:
                        description: Roles of the user
                        example:
                          - customer_service
                          - developer
                        type:
                          - array
                          - 'null'
                      affiliate:
                        description: User's affiliate information
                        example: >-
                          {id: 1, external_id: 3, username: "johny_jobs", email:
                          "johny.jobs@example.com", credit: "a6848f0b"}
                        type:
                          - object
                          - 'null'
                      rank_id:
                        description: ID of Rank the User is linked to
                        example: 234234
                        type:
                          - integer
                          - 'null'
                      user:
                        title: User
                        type: object
                        properties:
                          id:
                            type: integer
                          first_name:
                            description: User's first name
                            example: John
                            type:
                              - string
                              - 'null'
                          last_name:
                            description: User's last name
                            example: Doe
                            type:
                              - string
                              - 'null'
                          email:
                            description: User's email address
                            example: john@example.com
                            type:
                              - string
                              - 'null'
                          avatar:
                            description: User's avatar URL
                            example: https://example.com/avatar.jpg
                            type:
                              - string
                              - 'null'
                          phone:
                            description: User's phone
                            example: '+18018888888'
                            type:
                              - string
                              - 'null'
                          google_id:
                            description: User's Google Id
                            example: ''
                            type:
                              - string
                              - 'null'
                          bio:
                            description: User's Bio
                            example: >-
                              Software engineer passionate about creating
                              intuitive user experiences
                            type:
                              - string
                              - 'null'
                          facebook:
                            description: User's Facebook profile URL
                            example: https://facebook.com/johndoe
                            type:
                              - string
                              - 'null'
                          instagram:
                            description: User's Instagram handle
                            example: johndoe_insta
                            type:
                              - string
                              - 'null'
                          twitter:
                            description: User's Twitter/X handle
                            example: johndoe_tweets
                            type:
                              - string
                              - 'null'
                          linkedin:
                            description: User's LinkedIn profile URL
                            example: https://linkedin.com/in/johndoe
                            type:
                              - string
                              - 'null'
                          whatsapp:
                            description: User's WhatsApp number
                            example: '+18019999999'
                            type:
                              - string
                              - 'null'
                          wechat:
                            description: User's WeChat ID
                            example: johndoe_wechat
                            type:
                              - string
                              - 'null'
                          youtube:
                            description: User's YouTube channel URL
                            example: https://youtube.com/channel/UC123abc456def
                            type:
                              - string
                              - 'null'
                          zip_code:
                            description: User's ZIP/postal code
                            example: '84102'
                            type:
                              - string
                              - 'null'
                          dob:
                            description: User's date of birth
                            example: '1990-05-15'
                            type:
                              - string
                              - 'null'
                          gender:
                            description: User's gender
                            example: male
                            type:
                              - string
                              - 'null'
                          time_zone:
                            description: User's time zone
                            example: America/New_York
                            type:
                              - string
                              - 'null'
                          dnd:
                            default: 'off'
                            description: User's Do Not Disturb preference
                            example: 'true'
                            type:
                              - string
                              - 'null'
                          user_type:
                            description: Type of user
                            example: admin
                            type:
                              - string
                              - 'null'
                          language:
                            title: Language
                            type: object
                            properties:
                              id:
                                type: integer
                              name:
                                example: English
                                type:
                                  - string
                                  - 'null'
                              iso:
                                example: en
                                type:
                                  - string
                                  - 'null'
                            required:
                              - id
                          country:
                            title: Country
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                              name:
                                example: United States
                                type: string
                              iso:
                                description: 2-letter country code (ISO 3166-1 alpha-2)
                                example: US
                                type: string
                            required:
                              - id
                              - name
                              - iso
                        required:
                          - id
                          - first_name
                          - last_name
                          - email
                          - avatar
                          - phone
                          - google_id
                          - bio
                          - facebook
                          - instagram
                          - twitter
                          - linkedin
                          - whatsapp
                          - wechat
                          - youtube
                          - zip_code
                          - dob
                          - gender
                          - time_zone
                          - dnd
                          - user_type
                          - language
                    required:
                      - id
                      - first_name
                      - last_name
                      - company_id
                      - external_id
                      - username
                      - active
                      - mysite_url
                      - rank
                      - share_guid
                      - legacy_number
                      - created_at
                      - roles
                      - affiliate
                      - rank_id
                      - user
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - user_company
                  - meta
        '404':
          description: user not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: User not found
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: validation fails for invalid role
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    properties:
                      base:
                        type: array
                        items:
                          type: string
                        example:
                          - 'Validation failed: Role company_id mismatch'
                      admin_roles:
                        type: array
                        items:
                          type: string
                    example: Invalid parameters
                  errors:
                    type: object
                    properties:
                      user_company:
                        type: array
                        items:
                          type: object
                          properties:
                            base:
                              type: array
                              items:
                                type: string
                              example:
                                - 'Validation failed: Role company_id mismatch'
                            admin_roles:
                              type: array
                              items:
                                type: string
                      user:
                        type: object
                        properties:
                          role:
                            type: array
                            items:
                              type: string
                            example:
                              - 'must be one of: admin, rep, user'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                user:
                  type: object
                  properties:
                    email:
                      type: string
                    first_name:
                      type: string
                    last_name:
                      type: string
                    password:
                      type: string
                    avatar:
                      type: string
                    phone:
                      type: string
                    google_id:
                      type: string
                    bio:
                      type: string
                    facebook:
                      type: string
                    instagram:
                      type: string
                    twitter:
                      type: string
                    linkedin:
                      type: string
                    whatsapp:
                      type: string
                    wechat:
                      type: string
                    youtube:
                      type: string
                    zip_code:
                      type: string
                    dob:
                      type: string
                      format: date
                    gender:
                      type: string
                    time_zone:
                      type: string
                    push_notifications:
                      type: boolean
                    email_notifications:
                      type: boolean
                    sms_notifications:
                      type: boolean
                    external_id:
                      type: string
                    username:
                      type: string
                    active:
                      type: boolean
                    role:
                      type: string
                      enum:
                        - admin
                        - rep
                        - user
                    admin_roles:
                      type: array
                      items:
                        type: integer
                    affiliate:
                      type: object
                      properties:
                        id:
                          type: string
                        external_id:
                          type: string
                        username:
                          type: string
                        email:
                          type: string
                      required: []
                  required:
                    - email
                    - affiliate
              required:
                - country_code
                - language_code
                - user
    delete:
      summary: Deletes a user
      tags:
        - Users
      operationId: destroyUser
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          description: User ID or auth token
          required: true
          schema:
            type: string
      responses:
        '200':
          description: user deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    description: User ID
                    example: 1
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - id
                  - meta
        '404':
          description: user not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: User not found
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: failed to delete user
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: Failed to delete user
                  errors:
                    type: object
                    properties:
                      user:
                        type: array
                        items:
                          type: string
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
  /api/v202506/users/{id}/append_metadata:
    patch:
      summary: Append metadata field
      tags:
        - Users
      operationId: userAppendMetadataField
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          description: User ID or auth token
          required: true
          schema:
            type: string
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  user_company:
                    title: UserCompany
                    type: object
                    properties:
                      id:
                        type: integer
                      first_name:
                        description: User's first name
                        example: John
                        type:
                          - string
                          - 'null'
                      last_name:
                        description: User's last name
                        example: Doe
                        type:
                          - string
                          - 'null'
                      image_url:
                        description: User's image URL
                        example: https://example.com/image.jpg
                        type:
                          - string
                          - 'null'
                      company_id:
                        description: ID of the company the user belongs to
                        example: 42
                        type:
                          - integer
                          - 'null'
                      external_id:
                        description: External identifier for the user
                        example: EXT123456
                        type:
                          - string
                          - 'null'
                      username:
                        description: User's unique username within the company
                        example: johny_jobs
                        type:
                          - string
                          - 'null'
                      active:
                        default: true
                        description: Whether the user is active in the company
                        example: true
                        type: boolean
                      mysite_url:
                        description: URL to the user's personal site
                        example: https://mycompany.com/johny_jobs
                        type:
                          - string
                          - 'null'
                      rank:
                        description: External ID of Rank the User is linked to
                        example: '234234'
                        type:
                          - integer
                          - string
                          - 'null'
                      share_guid:
                        description: Unique identifier for sharing content
                        example: a6848f0b
                        type:
                          - string
                          - 'null'
                      legacy_number:
                        description: User's legacy phone number
                        example: '+18001234567'
                        type:
                          - string
                          - 'null'
                      created_at:
                        description: Date and time the user was created
                        example: '2021-01-01T00:00:00Z'
                        type:
                          - string
                          - 'null'
                      roles:
                        description: Roles of the user
                        example:
                          - customer_service
                          - developer
                        type:
                          - array
                          - 'null'
                      affiliate:
                        description: User's affiliate information
                        example: >-
                          {id: 1, external_id: 3, username: "johny_jobs", email:
                          "johny.jobs@example.com", credit: "a6848f0b"}
                        type:
                          - object
                          - 'null'
                      rank_id:
                        description: ID of Rank the User is linked to
                        example: 234234
                        type:
                          - integer
                          - 'null'
                      user:
                        title: User
                        type: object
                        properties:
                          id:
                            type: integer
                          first_name:
                            description: User's first name
                            example: John
                            type:
                              - string
                              - 'null'
                          last_name:
                            description: User's last name
                            example: Doe
                            type:
                              - string
                              - 'null'
                          email:
                            description: User's email address
                            example: john@example.com
                            type:
                              - string
                              - 'null'
                          avatar:
                            description: User's avatar URL
                            example: https://example.com/avatar.jpg
                            type:
                              - string
                              - 'null'
                          phone:
                            description: User's phone
                            example: '+18018888888'
                            type:
                              - string
                              - 'null'
                          google_id:
                            description: User's Google Id
                            example: ''
                            type:
                              - string
                              - 'null'
                          bio:
                            description: User's Bio
                            example: >-
                              Software engineer passionate about creating
                              intuitive user experiences
                            type:
                              - string
                              - 'null'
                          facebook:
                            description: User's Facebook profile URL
                            example: https://facebook.com/johndoe
                            type:
                              - string
                              - 'null'
                          instagram:
                            description: User's Instagram handle
                            example: johndoe_insta
                            type:
                              - string
                              - 'null'
                          twitter:
                            description: User's Twitter/X handle
                            example: johndoe_tweets
                            type:
                              - string
                              - 'null'
                          linkedin:
                            description: User's LinkedIn profile URL
                            example: https://linkedin.com/in/johndoe
                            type:
                              - string
                              - 'null'
                          whatsapp:
                            description: User's WhatsApp number
                            example: '+18019999999'
                            type:
                              - string
                              - 'null'
                          wechat:
                            description: User's WeChat ID
                            example: johndoe_wechat
                            type:
                              - string
                              - 'null'
                          youtube:
                            description: User's YouTube channel URL
                            example: https://youtube.com/channel/UC123abc456def
                            type:
                              - string
                              - 'null'
                          zip_code:
                            description: User's ZIP/postal code
                            example: '84102'
                            type:
                              - string
                              - 'null'
                          dob:
                            description: User's date of birth
                            example: '1990-05-15'
                            type:
                              - string
                              - 'null'
                          gender:
                            description: User's gender
                            example: male
                            type:
                              - string
                              - 'null'
                          time_zone:
                            description: User's time zone
                            example: America/New_York
                            type:
                              - string
                              - 'null'
                          dnd:
                            default: 'off'
                            description: User's Do Not Disturb preference
                            example: 'true'
                            type:
                              - string
                              - 'null'
                          user_type:
                            description: Type of user
                            example: admin
                            type:
                              - string
                              - 'null'
                          language:
                            title: Language
                            type: object
                            properties:
                              id:
                                type: integer
                              name:
                                example: English
                                type:
                                  - string
                                  - 'null'
                              iso:
                                example: en
                                type:
                                  - string
                                  - 'null'
                            required:
                              - id
                          country:
                            title: Country
                            type:
                              - object
                              - 'null'
                            properties:
                              id:
                                type: integer
                              name:
                                example: United States
                                type: string
                              iso:
                                description: 2-letter country code (ISO 3166-1 alpha-2)
                                example: US
                                type: string
                            required:
                              - id
                              - name
                              - iso
                        required:
                          - id
                          - first_name
                          - last_name
                          - email
                          - avatar
                          - phone
                          - google_id
                          - bio
                          - facebook
                          - instagram
                          - twitter
                          - linkedin
                          - whatsapp
                          - wechat
                          - youtube
                          - zip_code
                          - dob
                          - gender
                          - time_zone
                          - dnd
                          - user_type
                          - language
                    required:
                      - id
                      - first_name
                      - last_name
                      - company_id
                      - external_id
                      - username
                      - active
                      - mysite_url
                      - rank
                      - share_guid
                      - legacy_number
                      - created_at
                      - roles
                      - affiliate
                      - rank_id
                      - user
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: not found
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - User Company not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                metadata:
                  type: object
                  description: A JSON object that can store any custom data structure.
                  example:
                    profile_complete: true
                    preferences:
                      theme: dark
                      newsletter: true
              required:
                - metadata
  /api/v202506/users/find:
    get:
      summary: Finds a user
      tags:
        - Users
      operationId: findUser
      description: Find user using one of it's identifiers
      security:
        - bearer_auth: []
      parameters:
        - name: external_id
          in: query
          description: User's external id
          required: false
          schema:
            type: string
        - name: username
          in: query
          description: User's username
          required: false
          schema:
            type: string
        - name: email
          in: query
          description: User's email
          required: false
          schema:
            type: string
        - name: token
          in: query
          description: User's auth token
          required: false
          schema:
            type: string
        - name: share_guid
          in: query
          description: User's share guid
          required: false
          schema:
            type: string
      responses:
        '200':
          description: user found by share_guid
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    description: User ID
                    example: 1
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - id
                  - meta
        '404':
          description: user not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: User not found
                  errors:
                    type: object
                    properties:
                      id:
                        type: array
                        items:
                          type: string
                        example:
                          - not found
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
  /api/v1/variants/variant_countries:
    get:
      summary: Retrieves a list of variant countries of variant
      tags:
        - Variant Countries
      parameters:
        - name: variant_ids[]
          in: query
          required: true
          schema:
            type: array
            items:
              type: integer
              example: 1
      responses:
        '200':
          description: List of variant countries retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  variant_countries:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 662
                        active:
                          type: boolean
                          example: true
                        compare_price:
                          type: string
                          format: decimal
                          example: '0.0'
                        cost_of_goods_sold:
                          type: string
                          format: decimal
                          example: '0.0'
                        country_code:
                          type: string
                          example: US
                        currency_code:
                          type: string
                          example: USD
                        display_price:
                          type: string
                          example: $42.20 (USD)
                        display_subscription_price:
                          type: string
                          example: $0.00 (USD)
                        display_wholesale:
                          type: string
                          example: $0.00 (USD)
                        display_wholesale_subscription_price:
                          type: string
                          example: $0.00 (USD)
                        price:
                          type: string
                          format: decimal
                          example: '42.2'
                        shipping:
                          type: string
                          format: decimal
                          example: '0.0'
                        shipping_time:
                          type:
                            - string
                            - 'null'
                          example: null
                        subscription_price:
                          type: string
                          format: decimal
                          example: '0.0'
                        variant_id:
                          type: integer
                          example: 90
                        wholesale:
                          type: string
                          format: decimal
                          example: '0.0'
                        wholesale_subscription_price:
                          type: string
                          format: decimal
                          example: '0.0'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        format: date_time
                        example: '2024-12-11T08:00:00Z'
  /api/v1/variants/variant_countries/bulk_update:
    post:
      summary: Bulk Update Variant Countries
      tags:
        - Variant Countries
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: Bulk Update Successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  variant_countries:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 662
                        active:
                          type: boolean
                          example: true
                        compare_price:
                          type: string
                          format: decimal
                          example: '0.0'
                        cost_of_goods_sold:
                          type: string
                          format: decimal
                          example: '0.0'
                        country_code:
                          type: string
                          example: US
                        currency_code:
                          type: string
                          example: USD
                        display_price:
                          type: string
                          example: $42.20 (USD)
                        display_subscription_price:
                          type: string
                          example: $0.00 (USD)
                        display_wholesale:
                          type: string
                          example: $0.00 (USD)
                        display_wholesale_subscription_price:
                          type: string
                          example: $0.00 (USD)
                        price:
                          type: string
                          format: decimal
                          example: '42.2'
                        shipping:
                          type: string
                          format: decimal
                          example: '0.0'
                        shipping_time:
                          type:
                            - string
                            - 'null'
                          example: null
                        subscription_price:
                          type: string
                          format: decimal
                          example: '0.0'
                        variant_id:
                          type: integer
                          example: 90
                        wholesale:
                          type: string
                          format: decimal
                          example: '0.0'
                        wholesale_subscription_price:
                          type: string
                          format: decimal
                          example: '0.0'
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        format: date_time
                        example: '2024-12-11T08:00:00Z'
        '422':
          description: Validation Errors
          content:
            application/json:
              schema:
                type: object
                properties:
                  variant_countries:
                    type: array
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        sku:
                          type: string
                          example: invalid_sku
                        error_messages:
                          type: object
                          properties:
                            sku:
                              type: string
                              example: >-
                                There are 3 active variants with the SKU
                                invalid_sku
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        format: date_time
                        example: '2024-12-11T08:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                variant_countries:
                  type: array
                  items:
                    type: object
                    properties:
                      variant_country_id:
                        type:
                          - string
                          - 'null'
                        default: null
                      variant_country_external_id:
                        type:
                          - string
                          - 'null'
                        default: null
                      variant_id:
                        type:
                          - string
                          - 'null'
                        default: null
                      variant_external_id:
                        type:
                          - string
                          - 'null'
                        default: null
                      currency_code:
                        type: string
                      country_code:
                        type:
                          - string
                          - 'null'
                      sku:
                        type:
                          - string
                          - 'null'
                      price:
                        type:
                          - number
                          - string
                        format: float
                      wholesale:
                        type:
                          - number
                          - string
                        format: float
                      cv:
                        type: integer
                      qv:
                        type: integer
                      pc_cv:
                        type: integer
                      pc_qv:
                        type: integer
                    required:
                      - currency_code
                    anyOf:
                      - required:
                          - variant_country_id
                      - required:
                          - variant_country_external_id
                      - allOf:
                          - anyOf:
                              - required:
                                  - variant_id
                              - required:
                                  - variant_external_id
                          - required:
                              - country_code
                      - required:
                          - sku
                          - country_code
              required:
                - variant_countries
  /api/company/v1/variants/{id}:
    get:
      summary: Show variant
      tags:
        - Variants
      description: Retrieve a specific variant by ID
      operationId: showVariant
      security:
        - bearer_auth: []
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  variant:
                    title: Variant
                    type: object
                    properties:
                      id:
                        type: integer
                      title:
                        example: Variant 1
                        type:
                          - string
                          - 'null'
                      image_url:
                        example: https://via.placeholder.com/150
                        type:
                          - string
                          - 'null'
                      image_path:
                        example: https://via.placeholder.com/150
                        type:
                          - string
                          - 'null'
                      sku:
                        example: SKU-123456
                        type:
                          - string
                          - 'null'
                      primary_image:
                        example: https://via.placeholder.com/150
                        type:
                          - string
                          - 'null'
                      price:
                        example: 100
                        type:
                          - number
                          - 'null'
                      price_in_currency:
                        example: USD 100.00
                        type: string
                      options:
                        items:
                          type: object
                          properties:
                            title:
                              type: string
                              example: Size
                            value:
                              type: string
                              example: XL
                        type: array
                      is_master:
                        type:
                          - boolean
                          - 'null'
                        default: false
                      track_quantity:
                        type:
                          - boolean
                          - 'null'
                        default: false
                      bar_code:
                        type:
                          - string
                          - 'null'
                      limit_subscription:
                        type:
                          - boolean
                          - 'null'
                        default: false
                      subscription_max_qty:
                        type:
                          - integer
                          - 'null'
                      customer_limit:
                        type:
                          - integer
                          - 'null'
                        default: 0
                        minimum: 0
                      keep_selling:
                        type:
                          - boolean
                          - 'null'
                        default: false
                      active:
                        default: true
                        type: boolean
                      allow_subscription:
                        default: true
                        type: boolean
                      subscription_only:
                        default: false
                        type: boolean
                      shipping_included_in_price:
                        default: false
                        type: boolean
                      inventory_quantity:
                        default: 0
                        type: integer
                      option_attrs:
                        type: array
                      physical:
                        type:
                          - boolean
                          - 'null'
                      unit_of_size:
                        example: cm
                        type:
                          - string
                          - 'null'
                      height:
                        example: '13'
                        type:
                          - number
                          - 'null'
                      width:
                        example: '6'
                        type:
                          - number
                          - 'null'
                      length:
                        example: '12'
                        type:
                          - number
                          - 'null'
                      unit_of_weight:
                        example: kg
                        type:
                          - string
                          - 'null'
                      weight:
                        example: '3.2'
                        type:
                          - string
                          - 'null'
                      hs_code:
                        example: '3.2'
                        type:
                          - string
                          - 'null'
                      buyable:
                        type: boolean
                      images:
                        type: array
                      inventory_levels:
                        type: array
                      limit_quantity_per_customer:
                        type: boolean
                      country_of_origin:
                        title: Country
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          name:
                            example: United States
                            type: string
                          iso:
                            description: 2-letter country code (ISO 3166-1 alpha-2)
                            example: US
                            type: string
                        required:
                          - id
                          - name
                          - iso
                      variant_countries:
                        type: array
                        items:
                          title: VariantCountry
                          type: object
                          properties:
                            id:
                              type: integer
                            variant_id:
                              type: integer
                            active:
                              type:
                                - boolean
                                - 'null'
                              default: true
                            currency_code:
                              type:
                                - string
                                - 'null'
                            price:
                              type:
                                - number
                                - string
                                - 'null'
                              default: '0.0'
                              minimum: 0
                              maximum: 99999999
                            shipping:
                              type:
                                - number
                                - string
                                - 'null'
                              default: '0.0'
                            shipping_time:
                              type:
                                - string
                                - 'null'
                            subscription_price:
                              type:
                                - number
                                - string
                                - 'null'
                              default: '0.0'
                            wholesale:
                              type:
                                - number
                                - string
                                - 'null'
                              default: '0.0'
                            wholesale_subscription_price:
                              type:
                                - number
                                - string
                                - 'null'
                              default: '0.0'
                            cost_of_goods_sold:
                              type:
                                - number
                                - string
                                - 'null'
                              default: '0.0'
                            compare_price:
                              type:
                                - number
                                - string
                                - 'null'
                              default: '0.0'
                            country_code:
                              type: string
                            display_price:
                              type: string
                            display_subscription_price:
                              type: string
                            display_wholesale:
                              type: string
                            display_wholesale_subscription_price:
                              type: string
                            cv:
                              type:
                                - integer
                                - 'null'
                              default: 0
                            qv:
                              type:
                                - integer
                                - 'null'
                              default: 0
                            pc_cv:
                              type:
                                - integer
                                - 'null'
                            pc_qv:
                              type:
                                - integer
                                - 'null'
                          required:
                            - id
                            - variant_id
                            - country_code
                            - display_price
                            - display_subscription_price
                            - display_wholesale
                            - display_wholesale_subscription_price
                    required:
                      - id
                      - price_in_currency
                      - options
                      - active
                      - allow_subscription
                      - subscription_only
                      - shipping_included_in_price
                      - inventory_quantity
                      - option_attrs
                      - buyable
                      - images
                      - inventory_levels
                      - limit_quantity_per_customer
                      - variant_countries
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - variant
                  - meta
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '404':
          description: Variant not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
    put:
      summary: Update variant
      tags:
        - Variants
      description: Update a specific variant with pricing, inventory, and attribute data
      operationId: updateVariant
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: Variant updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  variant:
                    title: Variant
                    type: object
                    properties:
                      id:
                        type: integer
                      title:
                        example: Variant 1
                        type:
                          - string
                          - 'null'
                      image_url:
                        example: https://via.placeholder.com/150
                        type:
                          - string
                          - 'null'
                      image_path:
                        example: https://via.placeholder.com/150
                        type:
                          - string
                          - 'null'
                      sku:
                        example: SKU-123456
                        type:
                          - string
                          - 'null'
                      primary_image:
                        example: https://via.placeholder.com/150
                        type:
                          - string
                          - 'null'
                      price:
                        example: 100
                        type:
                          - number
                          - 'null'
                      price_in_currency:
                        example: USD 100.00
                        type: string
                      options:
                        items:
                          type: object
                          properties:
                            title:
                              type: string
                              example: Size
                            value:
                              type: string
                              example: XL
                        type: array
                      is_master:
                        type:
                          - boolean
                          - 'null'
                        default: false
                      track_quantity:
                        type:
                          - boolean
                          - 'null'
                        default: false
                      bar_code:
                        type:
                          - string
                          - 'null'
                      limit_subscription:
                        type:
                          - boolean
                          - 'null'
                        default: false
                      subscription_max_qty:
                        type:
                          - integer
                          - 'null'
                      customer_limit:
                        type:
                          - integer
                          - 'null'
                        default: 0
                        minimum: 0
                      keep_selling:
                        type:
                          - boolean
                          - 'null'
                        default: false
                      active:
                        default: true
                        type: boolean
                      allow_subscription:
                        default: true
                        type: boolean
                      subscription_only:
                        default: false
                        type: boolean
                      shipping_included_in_price:
                        default: false
                        type: boolean
                      inventory_quantity:
                        default: 0
                        type: integer
                      option_attrs:
                        type: array
                      physical:
                        type:
                          - boolean
                          - 'null'
                      unit_of_size:
                        example: cm
                        type:
                          - string
                          - 'null'
                      height:
                        example: '13'
                        type:
                          - number
                          - 'null'
                      width:
                        example: '6'
                        type:
                          - number
                          - 'null'
                      length:
                        example: '12'
                        type:
                          - number
                          - 'null'
                      unit_of_weight:
                        example: kg
                        type:
                          - string
                          - 'null'
                      weight:
                        example: '3.2'
                        type:
                          - string
                          - 'null'
                      hs_code:
                        example: '3.2'
                        type:
                          - string
                          - 'null'
                      buyable:
                        type: boolean
                      images:
                        type: array
                      inventory_levels:
                        type: array
                      limit_quantity_per_customer:
                        type: boolean
                      country_of_origin:
                        title: Country
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: integer
                          name:
                            example: United States
                            type: string
                          iso:
                            description: 2-letter country code (ISO 3166-1 alpha-2)
                            example: US
                            type: string
                        required:
                          - id
                          - name
                          - iso
                      variant_countries:
                        type: array
                        items:
                          title: VariantCountry
                          type: object
                          properties:
                            id:
                              type: integer
                            variant_id:
                              type: integer
                            active:
                              type:
                                - boolean
                                - 'null'
                              default: true
                            currency_code:
                              type:
                                - string
                                - 'null'
                            price:
                              type:
                                - number
                                - string
                                - 'null'
                              default: '0.0'
                              minimum: 0
                              maximum: 99999999
                            shipping:
                              type:
                                - number
                                - string
                                - 'null'
                              default: '0.0'
                            shipping_time:
                              type:
                                - string
                                - 'null'
                            subscription_price:
                              type:
                                - number
                                - string
                                - 'null'
                              default: '0.0'
                            wholesale:
                              type:
                                - number
                                - string
                                - 'null'
                              default: '0.0'
                            wholesale_subscription_price:
                              type:
                                - number
                                - string
                                - 'null'
                              default: '0.0'
                            cost_of_goods_sold:
                              type:
                                - number
                                - string
                                - 'null'
                              default: '0.0'
                            compare_price:
                              type:
                                - number
                                - string
                                - 'null'
                              default: '0.0'
                            country_code:
                              type: string
                            display_price:
                              type: string
                            display_subscription_price:
                              type: string
                            display_wholesale:
                              type: string
                            display_wholesale_subscription_price:
                              type: string
                            cv:
                              type:
                                - integer
                                - 'null'
                              default: 0
                            qv:
                              type:
                                - integer
                                - 'null'
                              default: 0
                            pc_cv:
                              type:
                                - integer
                                - 'null'
                            pc_qv:
                              type:
                                - integer
                                - 'null'
                          required:
                            - id
                            - variant_id
                            - country_code
                            - display_price
                            - display_subscription_price
                            - display_wholesale
                            - display_wholesale_subscription_price
                    required:
                      - id
                      - price_in_currency
                      - options
                      - active
                      - allow_subscription
                      - subscription_only
                      - shipping_included_in_price
                      - inventory_quantity
                      - option_attrs
                      - buyable
                      - images
                      - inventory_levels
                      - limit_quantity_per_customer
                      - variant_countries
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - variant
                  - meta
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '404':
          description: Variant not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
        '422':
          description: Missing required parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                variant:
                  type: object
                  properties:
                    option_attrs:
                      type: array
                      items:
                        type: string
                      description: Variant option attributes
                    sku:
                      type: string
                      description: Stock keeping unit
                    is_master:
                      type: boolean
                      description: Whether this is the master variant
                    title:
                      type: string
                      description: Variant title
                    track_quantity:
                      type: boolean
                      description: Whether to track inventory quantity
                    bar_code:
                      type: string
                      description: Product barcode
                    limit_subscription:
                      type: boolean
                      description: Whether to limit subscription purchases
                    subscription_max_qty:
                      type: integer
                      description: Maximum subscription quantity
                    customer_limit:
                      type: integer
                      description: Customer purchase limit
                    keep_selling:
                      type: boolean
                      description: Continue selling when out of stock
                    active:
                      type: boolean
                      description: Whether variant is active
                    allow_subscription:
                      type: boolean
                      description: Whether subscription is allowed
                    shipping_included_in_price:
                      type: boolean
                      description: Whether shipping is included in price
                    subscription_only:
                      type: boolean
                      description: Whether variant is subscription only
                    physical:
                      type: boolean
                      description: Whether the variant is a physical product
                    country_of_origin_id:
                      type: integer
                      description: ID of the country where the product originates
                    unit_of_size:
                      type: string
                      description: Unit of measurement for dimensions (e.g., cm, in)
                    height:
                      type: number
                      format: float
                      description: Product height
                    width:
                      type: number
                      format: float
                      description: Product width
                    length:
                      type: number
                      format: float
                      description: Product length
                    unit_of_weight:
                      type: string
                      description: Unit of measurement for weight (e.g., lb, kg)
                    weight:
                      type: string
                      description: Product weight
                    hs_code:
                      type: string
                      description: Harmonized System code for international trade
                    images_attributes:
                      type: array
                      description: Image attachments for the variant
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                            description: Image ID (for updates)
                          position:
                            type: integer
                            description: Image position/order
                          image_url:
                            type: string
                            description: Image URL
                          _destroy:
                            type: boolean
                            description: Mark for deletion
                        required:
                          - position
                          - image_url
                    inventory_levels_attributes:
                      type: array
                      description: Inventory levels for different warehouses
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                            description: Inventory level ID (for updates)
                          warehouse_id:
                            type: integer
                            description: Warehouse ID
                          available:
                            type: integer
                            description: Available quantity
                          committed:
                            type: integer
                            description: Committed quantity
                          on_hand:
                            type: integer
                            description: On hand quantity
                          unavailable:
                            type: integer
                            description: Unavailable quantity
                          _destroy:
                            type: boolean
                            description: Mark for deletion
                        required:
                          - warehouse_id
                    variant_countries_attributes:
                      type: array
                      description: Country-specific pricing and settings
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                            description: Variant country ID (for updates)
                          active:
                            type: boolean
                            description: Whether variant is active in country
                          country_id:
                            type: integer
                            description: Country ID
                          price:
                            type: number
                            format: decimal
                            description: Base price
                          wholesale:
                            type: number
                            format: decimal
                            description: Wholesale price
                          compare_price:
                            type: number
                            format: decimal
                            description: Compare at price
                          cv:
                            type: integer
                            description: Commission value
                          qv:
                            type: integer
                            description: Qualification value
                          pc_cv:
                            type: integer
                            description: Personal customer CV
                          pc_qv:
                            type: integer
                            description: Personal customer QV
                          cost_of_goods_sold:
                            type: number
                            format: decimal
                            description: Cost of goods sold
                          shipping:
                            type: number
                            format: decimal
                            description: Shipping cost
                          tax:
                            type: number
                            format: decimal
                            description: Tax amount
                          _destroy:
                            type: boolean
                            description: Mark for deletion
                        required:
                          - active
                          - country_id
                          - price
                  required:
                    - variant_countries_attributes
              required:
                - variant
    parameters:
      - name: id
        in: path
        description: Variant ID
        required: true
        schema:
          type: integer
  /api/company/webhooks:
    get:
      summary: An array of webhooks
      tags:
        - Webhooks
      operationId: indexWebhooks
      security:
        - bearer_auth: []
      parameters:
        - name: query
          in: query
          schema:
            type: object
            properties:
              page:
                type: integer
                exclusiveMinimum: 0
              per_page:
                type: integer
                exclusiveMinimum: 0
                maximum: 100
              active:
                type: boolean
              resource:
                type: string
            required: []
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  webhooks:
                    type: array
                    items:
                      title: Webhook
                      type: object
                      properties:
                        id:
                          type: integer
                        company_id:
                          description: The ID of the company that the resource belongs to
                          example: 1
                          type: integer
                        droplet_installation_uuid:
                          description: >-
                            The UUID of the droplet installation if the webhook
                            was created for a droplet
                          example: dri_1phkYdRcAWwms9iGwezxBbe1oDfvKiit3
                          type:
                            - string
                            - 'null'
                        url:
                          description: The URL the webhook events are sent to
                          example: https://example.com/webhook
                          type: string
                          pattern: |-
                            \A(?x-mi:
                                    ([a-zA-Z][\-+.a-zA-Z\d]*):                           (?# 1: scheme)
                                    (?:
                                       ((?:[\-_.!~*'()a-zA-Z\d;?:@&=+$,]|%[a-fA-F\d]{2})(?:[\-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]|%[a-fA-F\d]{2})*)                    (?# 2: opaque)
                                    |
                                       (?:(?:
                                         \/\/(?:
                                             (?:(?:((?:[\-_.!~*'()a-zA-Z\d;:&=+$,]|%[a-fA-F\d]{2})*)@)?        (?# 3: userinfo)
                                               (?:((?:(?:[a-zA-Z0-9\-.]|%\h\h)+|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|\[(?:(?:[a-fA-F\d]{1,4}:)*(?:[a-fA-F\d]{1,4}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})|(?:(?:[a-fA-F\d]{1,4}:)*[a-fA-F\d]{1,4})?::(?:(?:[a-fA-F\d]{1,4}:)*(?:[a-fA-F\d]{1,4}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}))?)\]))(?::(\d*))?))? (?# 4: host, 5: port)
                                           |
                                             ((?:[\-_.!~*'()a-zA-Z\d$,;:@&=+]|%[a-fA-F\d]{2})+)                 (?# 6: registry)
                                           )
                                         |
                                         (?!\/\/))                           (?# XXX: '\/\/' is the mark for hostport)
                                         (\/(?:[\-_.!~*'()a-zA-Z\d:@&=+$,]|%[a-fA-F\d]{2})*(?:;(?:[\-_.!~*'()a-zA-Z\d:@&=+$,]|%[a-fA-F\d]{2})*)*(?:\/(?:[\-_.!~*'()a-zA-Z\d:@&=+$,]|%[a-fA-F\d]{2})*(?:;(?:[\-_.!~*'()a-zA-Z\d:@&=+$,]|%[a-fA-F\d]{2})*)*)*)?                    (?# 7: path)
                                       )(?:\?((?:[\-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]|%[a-fA-F\d]{2})*))?                 (?# 8: query)
                                    )
                                    (?:\#((?:[\-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]|%[a-fA-F\d]{2})*))?                  (?# 9: fragment)
                                  )\z
                        active:
                          description: Whether the webhook is currently active
                          example: true
                          type:
                            - boolean
                            - 'null'
                          default: true
                        resource:
                          description: The resource that the webhook is for
                          example: droplet
                          type: string
                        event:
                          description: The event that triggers the webhook
                          example: installed
                          type: string
                        event_identifier:
                          description: The identifier for the event
                          example: droplet_installed
                          type:
                            - string
                            - 'null'
                        http_method:
                          description: The HTTP method used to send the webhook event
                          example: post
                          type: string
                          enum:
                            - post
                            - put
                            - get
                        auth_token:
                          description: The authentication token used verify webhook events
                          example: abc123
                          type:
                            - string
                            - 'null'
                        created_at:
                          description: The date and time the webhook was created
                          example: '2021-01-01T00:00:00Z'
                          type: string
                          format: date-time
                        updated_at:
                          description: The date and time the webhook was last updated
                          example: '2021-01-01T00:00:00Z'
                          type: string
                          format: date-time
                      required:
                        - id
                        - company_id
                        - url
                        - resource
                        - event
                        - http_method
                        - created_at
                        - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            example: 1
                          total_pages:
                            type: integer
                            example: 10
                          total_count:
                            type: integer
                            example: 100
                          per_page:
                            type: integer
                            example: 10
                required:
                  - webhooks
                  - meta
    post:
      summary: Create a webhook
      tags:
        - Webhooks
      operationId: createWebhook
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '201':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  webhook:
                    title: Webhook
                    type: object
                    properties:
                      id:
                        type: integer
                      company_id:
                        description: The ID of the company that the resource belongs to
                        example: 1
                        type: integer
                      droplet_installation_uuid:
                        description: >-
                          The UUID of the droplet installation if the webhook
                          was created for a droplet
                        example: dri_1phkYdRcAWwms9iGwezxBbe1oDfvKiit3
                        type:
                          - string
                          - 'null'
                      url:
                        description: The URL the webhook events are sent to
                        example: https://example.com/webhook
                        type: string
                        pattern: |-
                          \A(?x-mi:
                                  ([a-zA-Z][\-+.a-zA-Z\d]*):                           (?# 1: scheme)
                                  (?:
                                     ((?:[\-_.!~*'()a-zA-Z\d;?:@&=+$,]|%[a-fA-F\d]{2})(?:[\-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]|%[a-fA-F\d]{2})*)                    (?# 2: opaque)
                                  |
                                     (?:(?:
                                       \/\/(?:
                                           (?:(?:((?:[\-_.!~*'()a-zA-Z\d;:&=+$,]|%[a-fA-F\d]{2})*)@)?        (?# 3: userinfo)
                                             (?:((?:(?:[a-zA-Z0-9\-.]|%\h\h)+|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|\[(?:(?:[a-fA-F\d]{1,4}:)*(?:[a-fA-F\d]{1,4}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})|(?:(?:[a-fA-F\d]{1,4}:)*[a-fA-F\d]{1,4})?::(?:(?:[a-fA-F\d]{1,4}:)*(?:[a-fA-F\d]{1,4}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}))?)\]))(?::(\d*))?))? (?# 4: host, 5: port)
                                         |
                                           ((?:[\-_.!~*'()a-zA-Z\d$,;:@&=+]|%[a-fA-F\d]{2})+)                 (?# 6: registry)
                                         )
                                       |
                                       (?!\/\/))                           (?# XXX: '\/\/' is the mark for hostport)
                                       (\/(?:[\-_.!~*'()a-zA-Z\d:@&=+$,]|%[a-fA-F\d]{2})*(?:;(?:[\-_.!~*'()a-zA-Z\d:@&=+$,]|%[a-fA-F\d]{2})*)*(?:\/(?:[\-_.!~*'()a-zA-Z\d:@&=+$,]|%[a-fA-F\d]{2})*(?:;(?:[\-_.!~*'()a-zA-Z\d:@&=+$,]|%[a-fA-F\d]{2})*)*)*)?                    (?# 7: path)
                                     )(?:\?((?:[\-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]|%[a-fA-F\d]{2})*))?                 (?# 8: query)
                                  )
                                  (?:\#((?:[\-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]|%[a-fA-F\d]{2})*))?                  (?# 9: fragment)
                                )\z
                      active:
                        description: Whether the webhook is currently active
                        example: true
                        type:
                          - boolean
                          - 'null'
                        default: true
                      resource:
                        description: The resource that the webhook is for
                        example: droplet
                        type: string
                      event:
                        description: The event that triggers the webhook
                        example: installed
                        type: string
                      event_identifier:
                        description: The identifier for the event
                        example: droplet_installed
                        type:
                          - string
                          - 'null'
                      http_method:
                        description: The HTTP method used to send the webhook event
                        example: post
                        type: string
                        enum:
                          - post
                          - put
                          - get
                      auth_token:
                        description: The authentication token used verify webhook events
                        example: abc123
                        type:
                          - string
                          - 'null'
                      created_at:
                        description: The date and time the webhook was created
                        example: '2021-01-01T00:00:00Z'
                        type: string
                        format: date-time
                      updated_at:
                        description: The date and time the webhook was last updated
                        example: '2021-01-01T00:00:00Z'
                        type: string
                        format: date-time
                    required:
                      - id
                      - company_id
                      - url
                      - resource
                      - event
                      - http_method
                      - created_at
                      - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - webhook
                  - meta
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                webhook:
                  type: object
                  properties:
                    resource:
                      type: string
                    event:
                      type: string
                    url:
                      type: string
                    active:
                      type: boolean
                      not:
                        type: 'null'
                    auth_token:
                      type: string
                      minLength: 1
                    http_method:
                      type: string
                      minLength: 1
                  required:
                    - resource
                    - event
                    - url
              required:
                - webhook
  /api/company/webhooks/{id}:
    get:
      summary: Show a webhook
      tags:
        - Webhooks
      operationId: showWebhook
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  webhook:
                    title: Webhook
                    type: object
                    properties:
                      id:
                        type: integer
                      company_id:
                        description: The ID of the company that the resource belongs to
                        example: 1
                        type: integer
                      droplet_installation_uuid:
                        description: >-
                          The UUID of the droplet installation if the webhook
                          was created for a droplet
                        example: dri_1phkYdRcAWwms9iGwezxBbe1oDfvKiit3
                        type:
                          - string
                          - 'null'
                      url:
                        description: The URL the webhook events are sent to
                        example: https://example.com/webhook
                        type: string
                        pattern: |-
                          \A(?x-mi:
                                  ([a-zA-Z][\-+.a-zA-Z\d]*):                           (?# 1: scheme)
                                  (?:
                                     ((?:[\-_.!~*'()a-zA-Z\d;?:@&=+$,]|%[a-fA-F\d]{2})(?:[\-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]|%[a-fA-F\d]{2})*)                    (?# 2: opaque)
                                  |
                                     (?:(?:
                                       \/\/(?:
                                           (?:(?:((?:[\-_.!~*'()a-zA-Z\d;:&=+$,]|%[a-fA-F\d]{2})*)@)?        (?# 3: userinfo)
                                             (?:((?:(?:[a-zA-Z0-9\-.]|%\h\h)+|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|\[(?:(?:[a-fA-F\d]{1,4}:)*(?:[a-fA-F\d]{1,4}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})|(?:(?:[a-fA-F\d]{1,4}:)*[a-fA-F\d]{1,4})?::(?:(?:[a-fA-F\d]{1,4}:)*(?:[a-fA-F\d]{1,4}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}))?)\]))(?::(\d*))?))? (?# 4: host, 5: port)
                                         |
                                           ((?:[\-_.!~*'()a-zA-Z\d$,;:@&=+]|%[a-fA-F\d]{2})+)                 (?# 6: registry)
                                         )
                                       |
                                       (?!\/\/))                           (?# XXX: '\/\/' is the mark for hostport)
                                       (\/(?:[\-_.!~*'()a-zA-Z\d:@&=+$,]|%[a-fA-F\d]{2})*(?:;(?:[\-_.!~*'()a-zA-Z\d:@&=+$,]|%[a-fA-F\d]{2})*)*(?:\/(?:[\-_.!~*'()a-zA-Z\d:@&=+$,]|%[a-fA-F\d]{2})*(?:;(?:[\-_.!~*'()a-zA-Z\d:@&=+$,]|%[a-fA-F\d]{2})*)*)*)?                    (?# 7: path)
                                     )(?:\?((?:[\-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]|%[a-fA-F\d]{2})*))?                 (?# 8: query)
                                  )
                                  (?:\#((?:[\-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]|%[a-fA-F\d]{2})*))?                  (?# 9: fragment)
                                )\z
                      active:
                        description: Whether the webhook is currently active
                        example: true
                        type:
                          - boolean
                          - 'null'
                        default: true
                      resource:
                        description: The resource that the webhook is for
                        example: droplet
                        type: string
                      event:
                        description: The event that triggers the webhook
                        example: installed
                        type: string
                      event_identifier:
                        description: The identifier for the event
                        example: droplet_installed
                        type:
                          - string
                          - 'null'
                      http_method:
                        description: The HTTP method used to send the webhook event
                        example: post
                        type: string
                        enum:
                          - post
                          - put
                          - get
                      auth_token:
                        description: The authentication token used verify webhook events
                        example: abc123
                        type:
                          - string
                          - 'null'
                      created_at:
                        description: The date and time the webhook was created
                        example: '2021-01-01T00:00:00Z'
                        type: string
                        format: date-time
                      updated_at:
                        description: The date and time the webhook was last updated
                        example: '2021-01-01T00:00:00Z'
                        type: string
                        format: date-time
                    required:
                      - id
                      - company_id
                      - url
                      - resource
                      - event
                      - http_method
                      - created_at
                      - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - webhook
                  - meta
        '404':
          description: not found
    put:
      summary: Update a webhook
      tags:
        - Webhooks
      operationId: updateWebhook
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  webhook:
                    title: Webhook
                    type: object
                    properties:
                      id:
                        type: integer
                      company_id:
                        description: The ID of the company that the resource belongs to
                        example: 1
                        type: integer
                      droplet_installation_uuid:
                        description: >-
                          The UUID of the droplet installation if the webhook
                          was created for a droplet
                        example: dri_1phkYdRcAWwms9iGwezxBbe1oDfvKiit3
                        type:
                          - string
                          - 'null'
                      url:
                        description: The URL the webhook events are sent to
                        example: https://example.com/webhook
                        type: string
                        pattern: |-
                          \A(?x-mi:
                                  ([a-zA-Z][\-+.a-zA-Z\d]*):                           (?# 1: scheme)
                                  (?:
                                     ((?:[\-_.!~*'()a-zA-Z\d;?:@&=+$,]|%[a-fA-F\d]{2})(?:[\-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]|%[a-fA-F\d]{2})*)                    (?# 2: opaque)
                                  |
                                     (?:(?:
                                       \/\/(?:
                                           (?:(?:((?:[\-_.!~*'()a-zA-Z\d;:&=+$,]|%[a-fA-F\d]{2})*)@)?        (?# 3: userinfo)
                                             (?:((?:(?:[a-zA-Z0-9\-.]|%\h\h)+|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|\[(?:(?:[a-fA-F\d]{1,4}:)*(?:[a-fA-F\d]{1,4}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})|(?:(?:[a-fA-F\d]{1,4}:)*[a-fA-F\d]{1,4})?::(?:(?:[a-fA-F\d]{1,4}:)*(?:[a-fA-F\d]{1,4}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}))?)\]))(?::(\d*))?))? (?# 4: host, 5: port)
                                         |
                                           ((?:[\-_.!~*'()a-zA-Z\d$,;:@&=+]|%[a-fA-F\d]{2})+)                 (?# 6: registry)
                                         )
                                       |
                                       (?!\/\/))                           (?# XXX: '\/\/' is the mark for hostport)
                                       (\/(?:[\-_.!~*'()a-zA-Z\d:@&=+$,]|%[a-fA-F\d]{2})*(?:;(?:[\-_.!~*'()a-zA-Z\d:@&=+$,]|%[a-fA-F\d]{2})*)*(?:\/(?:[\-_.!~*'()a-zA-Z\d:@&=+$,]|%[a-fA-F\d]{2})*(?:;(?:[\-_.!~*'()a-zA-Z\d:@&=+$,]|%[a-fA-F\d]{2})*)*)*)?                    (?# 7: path)
                                     )(?:\?((?:[\-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]|%[a-fA-F\d]{2})*))?                 (?# 8: query)
                                  )
                                  (?:\#((?:[\-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]]|%[a-fA-F\d]{2})*))?                  (?# 9: fragment)
                                )\z
                      active:
                        description: Whether the webhook is currently active
                        example: true
                        type:
                          - boolean
                          - 'null'
                        default: true
                      resource:
                        description: The resource that the webhook is for
                        example: droplet
                        type: string
                      event:
                        description: The event that triggers the webhook
                        example: installed
                        type: string
                      event_identifier:
                        description: The identifier for the event
                        example: droplet_installed
                        type:
                          - string
                          - 'null'
                      http_method:
                        description: The HTTP method used to send the webhook event
                        example: post
                        type: string
                        enum:
                          - post
                          - put
                          - get
                      auth_token:
                        description: The authentication token used verify webhook events
                        example: abc123
                        type:
                          - string
                          - 'null'
                      created_at:
                        description: The date and time the webhook was created
                        example: '2021-01-01T00:00:00Z'
                        type: string
                        format: date-time
                      updated_at:
                        description: The date and time the webhook was last updated
                        example: '2021-01-01T00:00:00Z'
                        type: string
                        format: date-time
                    required:
                      - id
                      - company_id
                      - url
                      - resource
                      - event
                      - http_method
                      - created_at
                      - updated_at
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - webhook
                  - meta
        '404':
          description: not found
        '422':
          description: unprocessable entity
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                webhook:
                  type: object
                  properties:
                    url:
                      type: string
                      minLength: 1
                    active:
                      type: boolean
                      not:
                        type: 'null'
                    auth_token:
                      type: string
                      minLength: 1
                    http_method:
                      type: string
                      enum:
                        - post
                        - put
                        - get
                  required: []
              required:
                - id
                - webhook
    delete:
      summary: Delete a webhook
      tags:
        - Webhooks
      operationId: destroyWebhook
      security:
        - bearer_auth: []
      parameters:
        - name: id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  webhook:
                    title: Webhook
                    type: object
                    properties:
                      id:
                        type: integer
                    required:
                      - id
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - webhook
                  - meta
  /api/company/webhooks/bulk_delete:
    delete:
      summary: Bulk delete webhooks
      tags:
        - Webhooks
      operationId: bulkDeleteWebhooks
      security:
        - bearer_auth: []
      parameters: []
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  webhooks:
                    title: Webhook
                    type: object
                    properties:
                      webhook_ids:
                        description: The IDs of the webhooks that were deleted
                        example:
                          - 5
                          - 19
                          - 42
                          - 87
                        type: array
                      count:
                        description: The number of webhooks that were deleted
                        example: 4
                        type: integer
                    required:
                      - webhook_ids
                      - count
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
                required:
                  - webhooks
                  - meta
        '422':
          description: unprocessable entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                    example: status code based error message
                  errors:
                    type: object
                    example:
                      key_name:
                        - error message of the key
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: 123e4567-e89b-12d3-a456-426614174000
                      timestamp:
                        type: string
                        example: '2021-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                webhook_ids:
                  type: array
                  items:
                    type: integer
              required:
                - webhook_ids
