openapi: 3.1.0
info:
  title: Fluid SDK API Documentation
  description: OpenAPI documentation for Fluid's SDK API
  contact:
    email: support@fluid.app
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: 0.0.6
security: []
servers:
  - url: https://api.fluid.app
    description: Production API server
  - url: https://api.fluid.test
    description: Local development server
components:
  schemas:
    ApiResponse:
      type: object
      properties:
        status:
          type: number
          example: 201
        metadata:
          $ref: '#/components/schemas/ResponseMetadata'
      required:
        - status
        - metadata
    ApiErrorResponse:
      type: object
      properties:
        status:
          type: number
          example: 201
        errors:
          $ref: '#/components/schemas/ResponseErrors'
          nullable: true
        metadata:
          $ref: '#/components/schemas/ResponseMetadata'
      required:
        - status
        - errors
        - metadata
    Affiliate:
      type: object
      properties:
        name:
          type:
            - string
            - 'null'
          example: Sales Rep
        email:
          type:
            - string
            - 'null'
          format: email
          example: salesrep@example.com
        image_url:
          type:
            - string
            - 'null'
          format: uri
          example: https://example.com/salesrep.jpg
        username:
          type:
            - string
            - 'null'
          example: salesrep
        share_guid:
          type:
            - string
            - 'null'
          example: abc123
        external_id:
          type:
            - string
            - 'null'
          example: U-1234567890
        fluid_rep_id:
          type:
            - number
            - 'null'
          example: 123456
    Attribution:
      anyOf:
        - $ref: '#/components/schemas/AttributionEmail'
        - $ref: '#/components/schemas/AttributionUsername'
        - $ref: '#/components/schemas/AttributionSharedGuid'
        - $ref: '#/components/schemas/AttributionFluidRepId'
        - $ref: '#/components/schemas/AttributionExternalId'
    AttributionEmail:
      type: object
      properties:
        email:
          type: string
          format: email
          example: salesrep@example.com
      required:
        - email
    AttributionUsername:
      type: object
      properties:
        username:
          type: string
          example: salesrep
      required:
        - username
    AttributionSharedGuid:
      type: object
      properties:
        share_guid:
          type: string
          example: abc123
      required:
        - share_guid
    AttributionFluidRepId:
      type: object
      properties:
        fluid_rep_id:
          type: number
          example: 123456
      required:
        - fluid_rep_id
    AttributionExternalId:
      type: object
      properties:
        external_id:
          type: string
          example: U-1234567890
      required:
        - external_id
    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
    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
        immutable_items:
          type: boolean
          example: false
          description: Determines if a cart is immutable or not.
        digital_only:
          type: boolean
          example: false
          description: Determines if a cart contains only digital products.
        payment_method_auto_assignable:
          type: boolean
          example: true
          description: Determines if a payment method can be auto-assigned to the cart.
        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'
        attribution:
          type:
            - object
            - 'null'
        agreements:
          type: array
          items:
            type:
              - object
            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: 123
        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
        items:
          type: array
          items:
            $ref: '#/components/schemas/CartItem'
        ship_to:
          $ref: '#/components/schemas/Address'
          nullable: true
        bill_to:
          $ref: '#/components/schemas/Address'
          nullable: 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:
                      - CreditCard
                  name:
                    type: string
                    example: CreditCard Payment Account
                  test:
                    type: boolean
                    example: true
                    description: >-
                      Determines if a payment method is test instance or not. By
                      default, set to `true`
                  supported_brands:
                    type: array
                    items:
                      type: string
                    example:
                      - visa
                      - master
                      - american_express
                      - discover
                required:
                  - id
                  - type
                  - name
                  - test
                  - supported_brands
        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:
          $ref: '#/components/schemas/EnrollmentPack'
        recurring:
          oneOf:
            - type: array
              items:
                type:
                  - object
                  - 'null'
                properties:
                  subtotal:
                    type:
                      - number
                      - string
                    example: 10
                  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'
          default:
            - subtotal: 10
              subtotal_in_currency: $10.0
              interval: 1
              interval_unit: month
              subtotal_for_display: $10.00 every 1 month
              start_date: '2025-05-27'
    CartItem:
      type: object
      properties:
        id:
          type: integer
          example: 101
        title:
          type:
            - string
            - 'null'
          example: Surcharge
        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
        enrollment_pack_id:
          type:
            - integer
            - 'null'
          example: 123
        discount_amount:
          type: string
          example: '10'
        discount_amount_in_currency:
          type: string
          example: $10.00
        product_title:
          type: string
          example: Sample Product
        quantity:
          type: integer
          example: 3
        subscription:
          type: boolean
          example: true
        enrollment:
          type: boolean
          example: false
        allow_subscription:
          type: boolean
          example: true
        subscription_plan_id:
          type:
            - integer
            - 'null'
          example: 1
        subscription_plans:
          oneOf:
            - type: array
              items:
                type:
                  - object
                  - 'null'
                properties:
                  id:
                    type: integer
                    example: 1
                  name:
                    type: string
                    example: Subscription Plan 1
                  billing_interval:
                    type: integer
                    example: 1
                  billing_interval_unit:
                    type: string
                    example: month
                  company_default:
                    type: boolean
                    example: true
                  shipping_interval:
                    type: integer
                    example: 1
                  shipping_interval_unit:
                    type: string
                    example: month
                  trial_period:
                    type:
                      - integer
                      - 'null'
                    example: 1
                  trial_period_unit:
                    type:
                      - string
                      - 'null'
                    example: month
                  split_volume:
                    type: boolean
                    example: true
                  products_count:
                    type:
                      - integer
                      - 'null'
                    example: 10
                  subscribers_count:
                    type:
                      - integer
                      - 'null'
                    example: 10
                  price:
                    type: string
                    example: '10.5'
                  price_in_currency:
                    type: string
                    example: $10.50
                  max_quantity:
                    type:
                      - integer
                      - 'null'
                    example: 10
                  subscribe_and_save:
                    type: string
                    example: '2.99'
                  subscribe_and_save_in_currency:
                    type: string
                    example: $2.99
                  subscribe_and_save_for_display:
                    type: string
                    example: Subscribe and save $2.99
                  subscription_start:
                    type: string
                    example: '2025-02-12'
        subscription_only:
          type: boolean
          example: true
        subscription_interval:
          type:
            - integer
            - 'null'
          example: 1
        subscription_interval_unit:
          type:
            - string
            - 'null'
          example: month
        subscription_price:
          type: string
          example: '10.5'
        subscription_price_in_currency:
          type: string
          example: $10.50
        subscription_start:
          type:
            - string
            - 'null'
          example: '2025-02-12'
        subscribe_and_save:
          type:
            - 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
        display_to_customer:
          type:
            - boolean
            - 'null'
          example: false
        product:
          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
        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:
                  name:
                    type: string
                    example: Size
                  value:
                    type: string
                    example: Large
                required:
                  - name
                  - value
        errors:
          type:
            - array
            - 'null'
          example: >-
            This product is not available for this country. Please change your
            country
    EnrollmentPack:
      type:
        - object
        - 'null'
      properties:
        enrollment_pack_id:
          type: integer
          example: 1
        additional_volume:
          type:
            - integer
            - 'null'
          example: 10
        description:
          type:
            - object
            - 'null'
          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:
                      type:
                        - object
                        - 'null'
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: Subscription Plan 1
                        billing_interval:
                          type: integer
                          example: 1
                        billing_interval_unit:
                          type: string
                          example: month
                        company_default:
                          type: boolean
                          example: true
                        shipping_interval:
                          type: integer
                          example: 1
                        shipping_interval_unit:
                          type: string
                          example: month
                        trial_period:
                          type:
                            - integer
                            - 'null'
                          example: 1
                        trial_period_unit:
                          type:
                            - string
                            - 'null'
                          example: month
                        split_volume:
                          type: boolean
                          example: true
                        products_count:
                          type:
                            - integer
                            - 'null'
                          example: 10
                        subscribers_count:
                          type:
                            - integer
                            - 'null'
                          example: 10
                        price:
                          type: string
                          example: '10.5'
                        price_in_currency:
                          type: string
                          example: $10.50
                        max_quantity:
                          type:
                            - integer
                            - 'null'
                          example: 10
                        subscribe_and_save:
                          type: string
                          example: '2.99'
                        subscribe_and_save_in_currency:
                          type: string
                          example: $2.99
                        subscribe_and_save_for_display:
                          type: string
                          example: Subscribe and save $2.99
                        subscription_start:
                          type: string
                          example: '2025-02-12'
              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: Surcharge
              display_to_customer:
                type:
                  - boolean
                  - 'null'
                example: false
              errors:
                type:
                  - array
                  - 'null'
                example: >-
                  This product is not available for this country. Please change
                  your country
        price:
          type: string
          example: '11.13'
        price_in_currency:
          type: string
          example: $11.13
        subscription_price:
          type: string
          example: '2000.0'
        subscription_price_in_currency:
          type: string
          example: $2,000.00
        title:
          type: string
          example: enroll product
        token:
          type: string
          example: NxL22AqLRRisfyF9LqxxWRak
    CartMetadata:
      type: object
      properties:
        request_id:
          type: string
          example: 123e4567-e89b-12d3-a456-426614174000
        timestamp:
          type: string
          example: '2021-01-01T00:00:00Z'
    CartShopMetadata:
      type: object
      properties:
        request_id:
          type: string
          example: 123e4567-e89b-12d3-a456-426614174000
        shop_url:
          type: string
          example: https://myco.fluid.app
        timestamp:
          type: string
          example: '2021-01-01T00:00:00Z'
    CartCheckoutMetadata:
      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
    CheckoutOrder:
      type: object
      properties:
        id:
          type: integer
        first_name:
          type:
            - string
            - 'null'
        last_name:
          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
            - 'null'
        note:
          type:
            - string
            - 'null'
        recurring:
          oneOf:
            - type: array
              items:
                properties:
                  subtotal:
                    type:
                      - number
                      - string
                    example: 10
                  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'
          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'
          example: https://myco.fluid.app/pages/order-confirmation?token={order_token}
        currency_code:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
        metadata:
          type:
            - object
            - 'null'
        external_id:
          type:
            - string
            - 'null'
    Fingerprint:
      type: object
      properties:
        user_agent:
          type: string
          example: >-
            Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36
            (KHTML, like Gecko) Chrome/88.0.4324.192 Safari/537.36
        language:
          type: string
          example: en-US
        platform:
          type: string
          example: MacIntel
        hardware_concurrency:
          type:
            - number
            - string
          example: 8
        color_depth:
          type:
            - number
            - string
          example: 24
        screen_resolution:
          type: string
          example: 1920x1080
        time_zone:
          type: string
          example: Europe/London
        session_storage:
          type: boolean
          example: true
        local_storage:
          type: boolean
          example: true
        indexed_db:
          type: boolean
          example: true
        do_not_track:
          type: boolean
          example: false
        cookies_enabled:
          type: boolean
          example: true
        canvas:
          type: string
          example: 0
        webgl:
          type: object
          properties:
            vendor:
              type: string
              example: Google Inc.
            renderer:
              type: string
              example: ANGLE (Intel(R) UHD Graphics 630 Direct3D11 vs_5_0 ps_5_0)
            version:
              type: string
              example: WebGL 1.0
        installed_fonts:
          type: array
          items:
            type: string
            example: Helvetica
        plugins:
          type: string
          example: Chrome PDF Plugin
        touch_support:
          type: object
          properties:
            max_touch_points:
              type:
                - number
                - string
              example: 10
            touch_event:
              type: boolean
              example: true
            touch_points:
              type:
                - number
                - string
              example: 10
    ContactEmail:
      type: object
      properties:
        name:
          type: string
          example: John Doe
        email:
          type: string
          format: email
          example: john@example.com
        phone:
          type: string
          format: phone
          example: +1 (800) 555-1234
      required:
        - name
        - email
    ContactPhone:
      type: object
      properties:
        name:
          type: string
          example: John Doe
        email:
          type: string
          format: email
          example: john@example.com
        phone:
          type: string
          format: phone
          example: +1 (800) 555-1234
      required:
        - name
        - phone
    Contact:
      anyOf:
        - $ref: '#/components/schemas/ContactEmail'
        - $ref: '#/components/schemas/ContactPhone'
    Lead:
      type: object
      properties:
        message:
          type: string
          example: How are you?
        contact:
          $ref: '#/components/schemas/Contact'
      required:
        - message
        - contact
    Page:
      type: object
      properties:
        url:
          type: string
          format: uri
          example: https://www.example.com/page
        title:
          type: string
          example: Example Page
        description:
          type: string
          example: This is an example page
        image:
          type: string
          format: uri
          example: https://www.example.com/page.jpg
      required:
        - url
    PageSettings:
      type: object
      properties:
        shop:
          $ref: '#/components/schemas/PageShopSettings'
        cart:
          $ref: '#/components/schemas/PageCartSettings'
          nullable: true
        affiliate:
          $ref: '#/components/schemas/Affiliate'
          nullable: true
        attribution:
          $ref: '#/components/schemas/Attribution'
          nullable: true
    PageShopSettings:
      type: object
      properties:
        name:
          type: string
          example: My Shop
        primary_color:
          type:
            - string
            - 'null'
          example: '#000000'
        secondary_color:
          type:
            - string
            - 'null'
          example: '#FFFFFF'
        logo_url:
          type:
            - string
            - 'null'
          format: uri
          example: https://www.example.com/logo.png
        icon_url:
          type:
            - string
            - 'null'
          format: uri
          example: https://www.example.com/icon.png
        countries:
          type:
            - array
            - 'null'
          items:
            type:
              - string
            example: US
        languages:
          type:
            - array
            - 'null'
          items:
            type:
              - string
            example: en
    PageCartSettings:
      type: object
      properties:
        token:
          type:
            - string
            - 'null'
          example: wDMAF8CKHyYpQn3RfUdtA3N28
    PageSettingsResponse:
      type: object
      properties:
        status:
          type: number
          example: 201
        settings:
          $ref: '#/components/schemas/PageSettings'
        metadata:
          $ref: '#/components/schemas/ResponseMetadata'
    RequestMetadata:
      type: object
      properties:
        fluid_shop:
          type: string
          example: myshop
        fluid_session:
          type: string
          format: /\Afs_[0-9A-Za-z&&[^0OIl]]{22}\z/
          example: fs_szwdDuRbqEe7AV7sXk7vVq
        fluid_locale:
          type: string
          format: /\A[a-z]{2}_[A-Z]{2}\z/
          example: en_US
        fluid_journey:
          type: string
        attribution:
          $ref: '#/components/schemas/Attribution'
      required:
        - fluid_shop
        - fluid_session
    RequestMetadataOptional:
      type: object
      properties:
        fluid_shop:
          type: string
          example: myshop
        fluid_session:
          type: string
          format: /\Afs_[0-9A-Za-z&&[^0OIl]]{22}\z/
          example: fs_szwdDuRbqEe7AV7sXk7vVq
        fluid_locale:
          type: string
          example: en_US
        attribution:
          $ref: '#/components/schemas/Attribution'
    ResponseErrors:
      type:
        - array
        - 'null'
      items:
        type: object
        properties:
          message:
            type: string
            example: Invalid input data
        required:
          - message
    ResponseMetadata:
      type: object
      properties:
        fluid_shop:
          type: string
        fluid_session:
          type: string
        fluid_locale:
          type:
            - string
            - 'null'
          format: /\A[a-z]{2}_[A-Z]{2}\z/
          example: en_US
        request_uuid:
          type: string
          format: uuid
        timestamp:
          type: string
      required:
        - fluid_shop
        - fluid_session
        - request_uuid
        - timestamp
paths:
  /api/public/v2025-06/orders/{token}:
    get:
      summary: Retrieves an order
      tags:
        - Orders
      operationId: getOrder
      parameters:
        - name: token
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: order found
          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
                      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
                      token:
                        type: string
                        example: fo_abcdefgh1234
                      transaction_fee:
                        type: string
                        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
                      refundable_amount:
                        type:
                          - number
                          - string
                        format: float
                        example: 10.5
                      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
                      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
                              card_brand:
                                type: string
                                example: Visa
                              last_four:
                                type: string
                                example: '1234'
                              logo_url:
                                type: string
                                example: >-
                                  https://assets.fluid.app/images/payment_icons/visa.svg
                      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: order not found
  /api/public/v2025-06/affiliates/lookup:
    post:
      summary: Retrieve affiliate information
      operationId: affiliate-lookup
      tags:
        - affiliate
      parameters: []
      responses:
        '201':
          description: affiliate found
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                    example: 201
                  affiliate:
                    $ref: '#/components/schemas/Affiliate'
                  metadata:
                    $ref: '#/components/schemas/ResponseMetadata'
                required:
                  - status
                  - affiliate
                  - metadata
        '404':
          description: affiliate not found
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/ApiErrorResponse'
                example:
                  status: 404
                  errors:
                    - message: Affiliate not found
                  metadata:
                    fluid_shop: myshop
                    fluid_session: fs_szwdDuRbqEe7AV7sXk7vVq
                    request_uuid: 123e4567-e89b-12d3-a456-426614174000
                    timestamp: '2025-01-01T00:00:00Z'
        '422':
          description: invalid request
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/ApiErrorResponse'
                example:
                  status: 422
                  errors:
                    - message: Unexpected error
                  metadata:
                    fluid_shop: myshop
                    fluid_session: fs_szwdDuRbqEe7AV7sXk7vVq
                    request_uuid: 123e4567-e89b-12d3-a456-426614174000
                    timestamp: '2025-01-01T00:00:00Z'
        '500':
          description: internal server error
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/ApiErrorResponse'
                example:
                  status: 500
                  errors:
                    - message: Unexpected error
                  metadata:
                    fluid_shop: myshop
                    fluid_session: fs_szwdDuRbqEe7AV7sXk7vVq
                    request_uuid: 123e4567-e89b-12d3-a456-426614174000
                    timestamp: '2025-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                metadata:
                  type: object
                  properties:
                    fluid_shop:
                      type: string
                      example: myshop
                    fluid_session:
                      type: string
                      format: /\Afs_[0-9A-Za-z&&[^0OIl]]{22}\z/
                      example: fs_szwdDuRbqEe7AV7sXk7vVq
                    fluid_locale:
                      type: string
                      format: /\A[a-z]{2}_[A-Z]{2}\z/
                      example: en_US
                    fluid_journey:
                      type: string
                    attribution:
                      $ref: '#/components/schemas/Attribution'
                  required:
                    - fluid_shop
                    - fluid_session
                    - attribution
              required:
                - metadata
  /api/public/v2025-06/commerce/carts/{cart_token}/address:
    post:
      summary: Updates cart address
      tags:
        - carts
      operationId: cart_address-update
      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:
                    $ref: '#/components/schemas/Cart'
                  meta:
                    $ref: '#/components/schemas/CartCheckoutMetadata'
        '410':
          description: Cart is processed and cannot be modified
        '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
                metadata:
                  $ref: '#/components/schemas/RequestMetadataOptional'
  /api/public/v2025-06/commerce/carts/{cart_token}/checkout:
    post:
      summary: Completes cart checkout
      tags:
        - carts
      operationId: cart-checkout
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: checkout completed
          content:
            application/json:
              schema:
                type: object
                properties:
                  order:
                    $ref: '#/components/schemas/CheckoutOrder'
                  meta:
                    $ref: '#/components/schemas/CartShopMetadata'
        '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:
                    $ref: '#/components/schemas/CartMetadata'
        '422':
          description: checkout declined
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_message:
                    type: string
                  errors:
                    type: object
                    properties:
                      payment:
                        type: array
                        items:
                          type: string
                          example: >-
                            Payment declined: Unable to process the authorize
                            transaction.
                  meta:
                    $ref: '#/components/schemas/CartMetadata'
  /api/public/v2025-06/commerce/carts/{cart_token}/update_country:
    patch:
      summary: Updates the country of a cart, also updates the currency code
      tags:
        - carts
      operationId: cart-country-update
      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:
                    $ref: '#/components/schemas/Cart'
                  meta:
                    $ref: '#/components/schemas/CartMetadata'
        '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:
                    $ref: '#/components/schemas/CartMetadata'
        '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
                metadata:
                  $ref: '#/components/schemas/RequestMetadataOptional'
        description: ISO country code to update the cart to
  /api/public/v2025-06/commerce/carts/{cart_token}/discount:
    post:
      summary: Applies a discount to the cart
      tags:
        - carts
      operationId: cart-discount-apply
      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:
                    $ref: '#/components/schemas/CartMetadata'
        '410':
          description: Cart is processed and cannot be modified
        '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:
                    $ref: '#/components/schemas/CartMetadata'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                discount_code:
                  type: string
                metadata:
                  $ref: '#/components/schemas/RequestMetadataOptional'
  /api/public/v2025-06/commerce/carts/{cart_token}/enroll:
    get:
      summary: Retrieves enroll for cart
      tags:
        - carts
      operationId: cart-enroll
      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
        - name: fluid_shop
          in: query
          description: The domain of your Fluid shop (excluding the scheme)
          example: myco.fluid.app
          schema:
            type: string
        - name: fluid_session
          in: query
          description: Session token
          example: fs_szwdDuRbqEe7AV7sXk7vVq
          schema:
            type: string
      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:
                                - number
                                - string
                              example: 1
                            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":""}
                            position:
                              type: integer
                              example: 0
                  meta:
                    $ref: '#/components/schemas/CartMetadata'
        '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:
                    $ref: '#/components/schemas/CartMetadata'
  /api/public/v2025-06/commerce/carts/{cart_token}/enrollment:
    post:
      summary: Add enrollment to existing cart
      tags:
        - carts
      operationId: cart_enrollment-create
      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:
                    $ref: '#/components/schemas/Cart'
                  meta:
                    $ref: '#/components/schemas/CartMetadata'
        '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:
                    $ref: '#/components/schemas/CartMetadata'
        '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:
                    $ref: '#/components/schemas/CartMetadata'
        '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:
                    $ref: '#/components/schemas/CartMetadata'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                enrollment_pack_id:
                  type: integer
                metadata:
                  $ref: '#/components/schemas/RequestMetadataOptional'
              required:
                - enrollment_pack_id
  /api/public/v2025-06/commerce/carts/{cart_token}/cart_info:
    get:
      summary: Retrieves cart company information
      tags:
        - carts
      operationId: cart_info-get
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
        - name: fluid_shop
          in: query
          description: The domain of your Fluid shop (excluding the scheme)
          example: myco.fluid.app
          schema:
            type: string
        - name: fluid_session
          in: query
          description: Session token
          example: fs_szwdDuRbqEe7AV7sXk7vVq
          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/public/v2025-06/commerce/carts/{cart_token}/items:
    post:
      summary: Adds items to cart
      tags:
        - carts
      operationId: cart_items-add
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: items added to cart
          content:
            application/json:
              schema:
                type: object
                properties:
                  cart:
                    $ref: '#/components/schemas/Cart'
                  meta:
                    $ref: '#/components/schemas/CartCheckoutMetadata'
        '400':
          description: no cart items specified
        '410':
          description: Cart is processed and cannot be modified
        '422':
          description: product not available in country
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - items
              properties:
                items:
                  type: array
                  items:
                    type: object
                    required:
                      - variant_id
                      - quantity
                    properties:
                      variant_id:
                        type: integer
                      quantity:
                        type: integer
                metadata:
                  $ref: '#/components/schemas/RequestMetadataOptional'
  /api/public/v2025-06/commerce/carts/{cart_token}/items/{item_id}:
    delete:
      summary: Removes item from cart
      tags:
        - carts
      operationId: cart_item-remove
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
        - name: item_id
          in: path
          required: true
          schema:
            type: string
        - name: fluid_shop
          in: query
          description: The domain of your Fluid shop (excluding the scheme)
          example: myco.fluid.app
          schema:
            type: string
        - name: fluid_session
          in: query
          description: Session token
          example: fs_szwdDuRbqEe7AV7sXk7vVq
          schema:
            type: string
      responses:
        '200':
          description: cart item removed from cart
          content:
            application/json:
              schema:
                type: object
                properties:
                  cart:
                    $ref: '#/components/schemas/Cart'
                  meta:
                    $ref: '#/components/schemas/CartCheckoutMetadata'
        '404':
          description: cart item id not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Cart item not found
        '410':
          description: Cart is processed and cannot be modified
  /api/public/v2025-06/commerce/carts/{cart_token}/items/{item_id}/subscribe:
    post:
      summary: Adds subscribe:true to cart item
      tags:
        - carts
      operationId: cart_item-subscribe
      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:
                    $ref: '#/components/schemas/Cart'
                  meta:
                    $ref: '#/components/schemas/CartCheckoutMetadata'
        '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:
                    $ref: '#/components/schemas/CartMetadata'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                metadata:
                  $ref: '#/components/schemas/RequestMetadataOptional'
    delete:
      summary: Updates subscribe:false to cart item
      tags:
        - carts
      operationId: cart_item-unsubscribe
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
        - name: item_id
          in: path
          required: true
          schema:
            type: string
        - name: fluid_shop
          in: query
          description: The domain of your Fluid shop (excluding the scheme)
          example: myco.fluid.app
          schema:
            type: string
        - name: fluid_session
          in: query
          description: Session token
          example: fs_szwdDuRbqEe7AV7sXk7vVq
          schema:
            type: string
      responses:
        '200':
          description: subscription false updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  cart:
                    $ref: '#/components/schemas/Cart'
                  meta:
                    $ref: '#/components/schemas/CartCheckoutMetadata'
        '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:
                    $ref: '#/components/schemas/CartMetadata'
  /api/public/v2025-06/commerce/carts/{cart_token}/change_language:
    patch:
      summary: Updates the language of a cart
      tags:
        - carts
      operationId: cart_language-update
      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:
                    $ref: '#/components/schemas/Cart'
                  meta:
                    $ref: '#/components/schemas/CartCheckoutMetadata'
        '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
                metadata:
                  $ref: '#/components/schemas/RequestMetadataOptional'
              required:
                - language_iso
        required: true
        description: >-
          List of valid iso are at
          `/api/public/v2025-06/commerce/carts/{cart_token}/cart_info`
  /api/public/v2025-06/commerce/carts/{cart_token}/logout:
    delete:
      summary: Removes rep_buyer and customer for the cart
      tags:
        - carts
      operationId: cart-logout
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
        - name: fluid_shop
          in: query
          description: The domain of your Fluid shop (excluding the scheme)
          example: myco.fluid.app
          schema:
            type: string
        - name: fluid_session
          in: query
          description: Session token
          example: fs_szwdDuRbqEe7AV7sXk7vVq
          schema:
            type: string
      responses:
        '200':
          description: Logout successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  cart:
                    $ref: '#/components/schemas/Cart'
                  meta:
                    $ref: '#/components/schemas/CartCheckoutMetadata'
        '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:
                    $ref: '#/components/schemas/CartMetadata'
        '410':
          description: Cart is processed and cannot be modified
  /api/public/v2025-06/commerce/carts/{cart_token}/magic_link:
    post:
      summary: Create magic link for cart
      tags:
        - carts
      operationId: cart_magic_link-create
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
        - name: fluid_shop
          in: query
          description: The domain of your Fluid shop (excluding the scheme)
          example: myco.fluid.app
          schema:
            type: string
        - name: fluid_session
          in: query
          description: Session token
          example: fs_szwdDuRbqEe7AV7sXk7vVq
          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
                fluid_shop:
                  type: string
              required:
                - email
                - fluid_shop
  /api/public/v2025-06/commerce/carts/{cart_token}/confirm_magic_link:
    post:
      summary: Confirm magic link for cart
      tags:
        - carts
      operationId: cart_magic_link-confirm
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
        - name: fluid_shop
          in: query
          description: The domain of your Fluid shop (excluding the scheme)
          example: myco.fluid.app
          schema:
            type: string
        - name: fluid_session
          in: query
          description: Session token
          example: fs_szwdDuRbqEe7AV7sXk7vVq
          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:
                    $ref: '#/components/schemas/CartMetadata'
        '410':
          description: Cart is processed and cannot be modified
      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/public/v2025-06/commerce/carts/{cart_token}/payment_methods/{type}:
    post:
      summary: Sets cart payment method
      tags:
        - carts
      operationId: cart_payment_method-update
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
        - name: type
          in: path
          description: Type of payment method
          required: true
          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:
                    $ref: '#/components/schemas/CartMetadata'
        '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)
                metadata:
                  $ref: '#/components/schemas/RequestMetadataOptional'
  /api/public/v2025-06/commerce/carts/{cart_token}/shipping_method:
    post:
      summary: Sets cart shipping method
      tags:
        - carts
      operationId: cart_shipping_method-update
      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:
                    $ref: '#/components/schemas/Cart'
                  meta:
                    $ref: '#/components/schemas/CartCheckoutMetadata'
        '410':
          description: Cart is processed and cannot be modified
      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
                metadata:
                  $ref: '#/components/schemas/RequestMetadataOptional'
  /api/public/v2025-06/commerce/carts:
    post:
      summary: Creates a cart
      tags:
        - carts
      description: Create a cart. Items, attribution and enrollment_pack_id are optional.
      operationId: cart-create
      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:
                    $ref: '#/components/schemas/Cart'
                  meta:
                    $ref: '#/components/schemas/CartCheckoutMetadata'
        '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:
                    $ref: '#/components/schemas/CartMetadata'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                country_code:
                  type: string
                  description: ISO 2-letter country code
                  example: US
                fluid_shop:
                  type: string
                  description: The domain of your Fluid shop (excluding the scheme)
                  example: myco.fluid.app
                fluid_session:
                  type: string
                  description: Session token
                  example: fs_szwdDuRbqEe7AV7sXk7vVq
                visitor_token:
                  type: string
                  description: Visitor token
                  example: vt_2a3v3f9s8xRCN
                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
                attribution:
                  $ref: '#/components/schemas/Attribution'
                  default:
                    share_guid: james-bond007
                  required: false
              required:
                - country_code
                - fluid_shop
        description: Cart params
  /api/public/v2025-06/commerce/carts/{cart_token}:
    get:
      summary: Retrieves a cart
      tags:
        - carts
      operationId: cart-get
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
        - name: fluid_shop
          in: query
          description: The domain of your Fluid shop (excluding the scheme)
          example: myco.fluid.app
          schema:
            type: string
        - name: fluid_session
          in: query
          description: Session token
          example: fs_szwdDuRbqEe7AV7sXk7vVq
          schema:
            type: string
      responses:
        '200':
          description: cart found
          content:
            application/json:
              schema:
                type: object
                properties:
                  cart:
                    $ref: '#/components/schemas/Cart'
                  meta:
                    $ref: '#/components/schemas/CartCheckoutMetadata'
        '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:
                    $ref: '#/components/schemas/CartMetadata'
        '410':
          description: Cart is processed and cannot be modified
    patch:
      summary: Updates a cart
      tags:
        - carts
      operationId: cart-update
      parameters:
        - name: cart_token
          in: path
          required: true
          schema:
            type: string
        - name: fluid_shop
          in: query
          description: The domain of your Fluid shop (excluding the scheme)
          example: myco.fluid.app
          schema:
            type: string
        - name: fluid_session
          in: query
          description: Session token
          example: fs_szwdDuRbqEe7AV7sXk7vVq
          schema:
            type: string
      responses:
        '200':
          description: cart updated with phone number validation
          content:
            application/json:
              schema:
                type: object
                properties:
                  cart:
                    $ref: '#/components/schemas/Cart'
                  meta:
                    $ref: '#/components/schemas/CartCheckoutMetadata'
        '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:
                    $ref: '#/components/schemas/CartMetadata'
        '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/public/v2025-06/events/checkout/started:
    post:
      summary: Record a checkout starting
      operationId: checkout-started
      tags:
        - checkout
      parameters: []
      responses:
        '201':
          description: checkout started
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/ApiResponse'
                example:
                  status: 201
                  metadata:
                    fluid_shop: myshop
                    fluid_session: fs_szwdDuRbqEe7AV7sXk7vVq
                    request_uuid: 123e4567-e89b-12d3-a456-426614174000
                    timestamp: '2025-01-01T00:00:00Z'
        '404':
          description: unknown shop
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/ApiErrorResponse'
                example:
                  status: 404
                  errors:
                    - message: Company not found
                  metadata:
                    fluid_shop: myshop
                    fluid_session: fs_szwdDuRbqEe7AV7sXk7vVq
                    request_uuid: 123e4567-e89b-12d3-a456-426614174000
                    timestamp: '2025-01-01T00:00:00Z'
        '422':
          description: invalid request
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/ApiErrorResponse'
                example:
                  status: 422
                  errors:
                    - message: Unexpected error
                  metadata:
                    fluid_shop: myshop
                    fluid_session: fs_szwdDuRbqEe7AV7sXk7vVq
                    request_uuid: 123e4567-e89b-12d3-a456-426614174000
                    timestamp: '2025-01-01T00:00:00Z'
        '500':
          description: internal server error
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/ApiErrorResponse'
                example:
                  status: 500
                  errors:
                    - message: Unexpected error
                  metadata:
                    fluid_shop: myshop
                    fluid_session: fs_szwdDuRbqEe7AV7sXk7vVq
                    request_uuid: 123e4567-e89b-12d3-a456-426614174000
                    timestamp: '2025-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                cart_token:
                  type: string
                metadata:
                  $ref: '#/components/schemas/RequestMetadata'
              required:
                - cart_token
                - metadata
  /api/public/v2025-06/events/leads/capture:
    post:
      summary: Save a new lead capture
      operationId: lead-capture
      tags:
        - events
        - lead
      parameters: []
      responses:
        '201':
          description: lead captured
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/ApiResponse'
                example:
                  status: 201
                  metadata:
                    fluid_shop: myshop
                    fluid_session: fs_szwdDuRbqEe7AV7sXk7vVq
                    request_uuid: 123e4567-e89b-12d3-a456-426614174000
                    timestamp: '2025-01-01T00:00:00Z'
        '404':
          description: unknown shop
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/ApiErrorResponse'
                example:
                  status: 404
                  errors:
                    - message: Company not found
                  metadata:
                    fluid_shop: myshop
                    fluid_session: fs_szwdDuRbqEe7AV7sXk7vVq
                    request_uuid: 123e4567-e89b-12d3-a456-426614174000
                    timestamp: '2025-01-01T00:00:00Z'
        '422':
          description: invalid request
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/ApiErrorResponse'
                example:
                  status: 422
                  errors:
                    - message: Unexpected error
                  metadata:
                    fluid_shop: myshop
                    fluid_session: fs_szwdDuRbqEe7AV7sXk7vVq
                    request_uuid: 123e4567-e89b-12d3-a456-426614174000
                    timestamp: '2025-01-01T00:00:00Z'
        '500':
          description: internal server error
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/ApiErrorResponse'
                example:
                  status: 500
                  errors:
                    - message: Unexpected error
                  metadata:
                    fluid_shop: myshop
                    fluid_session: fs_szwdDuRbqEe7AV7sXk7vVq
                    request_uuid: 123e4567-e89b-12d3-a456-426614174000
                    timestamp: '2025-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                lead:
                  $ref: '#/components/schemas/Lead'
                page:
                  $ref: '#/components/schemas/Page'
                metadata:
                  $ref: '#/components/schemas/RequestMetadata'
              required:
                - lead
                - metadata
  /api/public/v2025-06/events/pages/visit:
    post:
      summary: Save a new page visit
      operationId: page-visit
      tags:
        - events
        - page
      parameters: []
      responses:
        '201':
          description: page visited
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/ApiResponse'
                example:
                  status: 201
                  metadata:
                    fluid_shop: myshop
                    fluid_session: fs_szwdDuRbqEe7AV7sXk7vVq
                    request_uuid: 123e4567-e89b-12d3-a456-426614174000
                    timestamp: '2025-01-01T00:00:00Z'
        '404':
          description: unknown shop
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/ApiErrorResponse'
                example:
                  status: 404
                  errors:
                    - message: Company not found
                  metadata:
                    fluid_shop: myshop
                    fluid_session: fs_szwdDuRbqEe7AV7sXk7vVq
                    request_uuid: 123e4567-e89b-12d3-a456-426614174000
                    timestamp: '2025-01-01T00:00:00Z'
        '422':
          description: invalid request
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/ApiErrorResponse'
                example:
                  status: 422
                  errors:
                    - message: Unexpected error
                  metadata:
                    fluid_shop: myshop
                    fluid_session: fs_szwdDuRbqEe7AV7sXk7vVq
                    request_uuid: 123e4567-e89b-12d3-a456-426614174000
                    timestamp: '2025-01-01T00:00:00Z'
        '500':
          description: internal server error
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/ApiErrorResponse'
                example:
                  status: 500
                  errors:
                    - message: Unexpected error
                  metadata:
                    fluid_shop: myshop
                    fluid_session: fs_szwdDuRbqEe7AV7sXk7vVq
                    request_uuid: 123e4567-e89b-12d3-a456-426614174000
                    timestamp: '2025-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                page:
                  $ref: '#/components/schemas/Page'
                metadata:
                  $ref: '#/components/schemas/RequestMetadata'
              required:
                - page
                - metadata
  /api/public/v2025-06/browser/fingerprint:
    post:
      summary: Start a new fingerprint
      operationId: fingerprint-create
      tags:
        - fingerprint
      parameters: []
      responses:
        '201':
          description: fingerprint created
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/ApiResponse'
                example:
                  status: 201
                  metadata:
                    fluid_shop: myshop
                    fluid_session: fs_szwdDuRbqEe7AV7sXk7vVq
                    request_uuid: 123e4567-e89b-12d3-a456-426614174000
                    timestamp: '2025-01-01T00:00:00Z'
        '404':
          description: unknown shop
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/ApiErrorResponse'
                example:
                  status: 404
                  errors:
                    - message: Company not found
                  metadata:
                    fluid_shop: myshop
                    fluid_session: fs_szwdDuRbqEe7AV7sXk7vVq
                    request_uuid: 123e4567-e89b-12d3-a456-426614174000
                    timestamp: '2025-01-01T00:00:00Z'
        '422':
          description: invalid request
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/ApiErrorResponse'
                example:
                  status: 422
                  errors:
                    - message: Unexpected error
                  metadata:
                    fluid_shop: myshop
                    fluid_session: fs_szwdDuRbqEe7AV7sXk7vVq
                    request_uuid: 123e4567-e89b-12d3-a456-426614174000
                    timestamp: '2025-01-01T00:00:00Z'
        '500':
          description: internal server error
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/ApiErrorResponse'
                example:
                  status: 500
                  errors:
                    - message: Unexpected error
                  metadata:
                    fluid_shop: myshop
                    fluid_session: fs_szwdDuRbqEe7AV7sXk7vVq
                    request_uuid: 123e4567-e89b-12d3-a456-426614174000
                    timestamp: '2025-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                fingerprint:
                  $ref: '#/components/schemas/Fingerprint'
                metadata:
                  $ref: '#/components/schemas/RequestMetadata'
              required:
                - fingerprint
                - metadata
  /api/public/v2025-06/session:
    post:
      summary: Start a new session
      operationId: session-create
      tags:
        - session
      parameters: []
      responses:
        '201':
          description: session created
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 201
                  fluid_session:
                    type: string
                    example: fs_szwdDuRbqEe7AV7sXk7vVq
                required:
                  - status
                  - fluid_session
                example:
                  status: 201
                  fluid_session: fs_szwdDuRbqEe7AV7sXk7vVq
        '404':
          description: unknown shop
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 422
                  errors:
                    $ref: '#/components/schemas/ResponseErrors'
                required:
                  - status
                  - errors
                example:
                  status: 404
                  errors:
                    - message: Company not found
        '422':
          description: invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 422
                  errors:
                    $ref: '#/components/schemas/ResponseErrors'
                required:
                  - status
                  - errors
                example:
                  status: 422
                  errors:
                    - message: Unexpected error
        '500':
          description: internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 422
                  errors:
                    $ref: '#/components/schemas/ResponseErrors'
                required:
                  - status
                  - errors
                example:
                  status: 500
                  errors:
                    - message: Unexpected error
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                fluid_shop:
                  type: string
                  description: Fluid shop identifier
                  example: myshop
              required:
                - fluid_shop
  /api/public/v2025-06/settings:
    post:
      summary: Retrieve page settings
      operationId: settings-retrieve
      tags:
        - settings
      parameters: []
      responses:
        '201':
          description: page loaded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageSettingsResponse'
        '404':
          description: unknown shop
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/ApiErrorResponse'
                example:
                  status: 404
                  errors:
                    - message: Company not found
                  metadata:
                    fluid_shop: myshop
                    fluid_session: fs_szwdDuRbqEe7AV7sXk7vVq
                    request_uuid: 123e4567-e89b-12d3-a456-426614174000
                    timestamp: '2025-01-01T00:00:00Z'
        '422':
          description: invalid request
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/ApiErrorResponse'
                example:
                  status: 422
                  errors:
                    - message: Unexpected error
                  metadata:
                    fluid_shop: myshop
                    fluid_session: fs_szwdDuRbqEe7AV7sXk7vVq
                    request_uuid: 123e4567-e89b-12d3-a456-426614174000
                    timestamp: '2025-01-01T00:00:00Z'
        '500':
          description: internal server error
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/ApiErrorResponse'
                example:
                  status: 500
                  errors:
                    - message: Unexpected error
                  metadata:
                    fluid_shop: myshop
                    fluid_session: fs_szwdDuRbqEe7AV7sXk7vVq
                    request_uuid: 123e4567-e89b-12d3-a456-426614174000
                    timestamp: '2025-01-01T00:00:00Z'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                page:
                  $ref: '#/components/schemas/Page'
                metadata:
                  $ref: '#/components/schemas/RequestMetadata'
              required:
                - page
                - metadata
