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

# Cart List

> List carts with optional filtering by cart ID or tags.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/henry-sdk/openapi.documented.yml get /cart
openapi: 3.1.0
info:
  title: Henry Labs API
  version: 1.5.0
  description: Playground for Henry Labs API endpoints
  contact:
    name: Henry Labs API Support
    email: support@henrylabs.ai
servers:
  - url: https://api.henrylabs.ai/v1
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Product
    description: Product search, details, and data enrichment
  - name: Cart
    description: Universal user shopping cart management
  - name: Orders
    description: Order management post purchase
  - name: Merchants
    description: Merchant information and status
  - name: Card
    description: Card tokenization and management
paths:
  /cart:
    get:
      tags:
        - Cart
      summary: Cart List
      description: List carts with optional filtering by cart ID or tags.
      operationId: cartList
      parameters:
        - in: query
          name: cartId
          schema:
            description: Filter by a specific cart ID
            example: crt_sa2aEsCz9PRM
            type: string
          description: Filter by a specific cart ID
        - in: query
          name: tags
          schema:
            description: Filter carts by key-value tags
            example:
              userId: BennyJ
            type: object
            propertyNames:
              type: string
            additionalProperties:
              type: string
          description: Filter carts by key-value tags
        - in: query
          name: cursor
          schema:
            description: Cursor returned from the previous response
            example: '2023-01-01T00:00:00Z'
            type: string
          description: Cursor returned from the previous response
        - in: query
          name: limit
          schema:
            default: 20
            description: Limit the number of results
            example: 20
            type: number
            minimum: 1
            maximum: 100
          description: Limit the number of results
      responses:
        '200':
          description: Carts fetched successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/cartListResponse'
        '400':
          description: Bad request - Invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  status:
                    type: string
                  message:
                    type: string
                required:
                  - success
                  - status
                  - message
                additionalProperties: false
        '401':
          description: Unauthorized - Invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  status:
                    type: string
                  message:
                    type: string
                required:
                  - success
                  - status
                  - message
                additionalProperties: false
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import HenrySDK from '@henrylabs/sdk';

            const client = new HenrySDK({
              apiKey: process.env['HENRY_SDK_API_KEY'], // This is the default and can be omitted
            });

            const carts = await client.cart.list();

            console.log(carts.data);
components:
  schemas:
    cartListResponse:
      type: object
      properties:
        success:
          type: boolean
        status:
          type: string
        message:
          type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/cartCreateResponseData'
      required:
        - success
        - status
        - message
        - data
      additionalProperties: false
    cartCreateResponseData:
      type: object
      properties:
        cartId:
          type: string
          description: ID for the created cart
        checkoutUrl:
          type: string
          format: uri
          description: URL for the buyer to make their purchase
        data:
          $ref: '#/components/schemas/cartCreateInputOutput'
        metadata:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
      required:
        - cartId
        - checkoutUrl
        - data
      additionalProperties: false
    cartCreateInputOutput:
      type: object
      properties:
        items:
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/cartItemInputOutput'
          description: Items to include in the cart
        settings:
          $ref: '#/components/schemas/cartSettingsOutput'
        tags:
          description: Key-value tags to associate with the cart
          examples:
            - region: us-ny
            - user: hen-123
          type: object
          propertyNames:
            type: string
          additionalProperties:
            type: string
      required:
        - items
      additionalProperties: false
    cartItemInputOutput:
      type: object
      properties:
        link:
          type: string
          format: uri
          description: Direct product URL
          example: https://www.nike.com/u/custom-nike-ja-3-by-you-10002205
        affiliateProductLink:
          description: >-
            Optional affiliate or redirect URL used for fulfillment. If omitted,
            link is used.
          example: >-
            https://partner.example.com/click?url=https%3A%2F%2Fwww.nike.com%2Fu%2Fcustom-nike-ja-3-by-you-10002205
          type: string
          format: uri
        quantity:
          description: Quantity of this item
          example: 1
          default: 1
          type: integer
          exclusiveMinimum: 0
          maximum: 9007199254740991
        selectedOptions:
          description: >-
            An ordered array of option values to select for the product. Will be
            selected in the order listed.
          example:
            - regular
            - black
            - 10-w
          type: array
          items:
            type: string
        selectedShipping:
          description: Shipping option selected for this cart item
          example:
            value: standard
          type: object
          properties:
            id:
              description: Merchant-specific internal ID for the shipping option
              example: SHIP_EXPRESS
              type: string
            value:
              description: Common value of the shipping option
              example: express
              type: string
          additionalProperties: false
        coupons:
          description: List of coupon codes applied to this cart item
          example:
            - SUMMER26
            - SAVE10
          type: array
          items:
            type: string
        metadata:
          description: Misc metadata associated with this cart item
          example:
            creatorSource: Frank Herbert
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
      required:
        - link
      additionalProperties: false
    cartSettingsOutput:
      type: object
      properties:
        options:
          type: object
          properties:
            allowPartialPurchase:
              description: Whether the buyer can remove items from the cart during checkout
              type: boolean
            collectBuyerEmail:
              description: Controls email collection at checkout
              example: required
              type: string
              enum:
                - 'off'
                - required
                - optional
            collectBuyerAddress:
              description: Controls address collection at checkout
              example: optional
              type: string
              enum:
                - 'off'
                - required
                - optional
            collectBuyerPhone:
              description: Controls phone collection at checkout
              example: 'off'
              type: string
              enum:
                - 'off'
                - required
                - optional
          additionalProperties: false
        serviceFeeFixed:
          type: object
          properties:
            value:
              type: number
              minimum: 0
              description: Fixed service fee amount
              example: 1.99
            currency:
              default: USD
              description: ISO-4217 currency code
              example: USD
              type: string
              enum:
                - USD
                - EUR
                - AUD
                - SGD
                - TWD
                - GBP
                - CAD
                - MXN
                - NPR
                - INR
                - DKK
                - NOK
                - SEK
                - CHF
                - PLN
                - CZK
                - JPY
                - NZD
                - HKD
          required:
            - value
            - currency
          additionalProperties: false
        serviceFeePercent:
          description: Service fee percentage (0–100)
          example: 10
          type: number
          minimum: 0
          maximum: 100
        events:
          $ref: '#/components/schemas/cartTriggerEventsOutput'
      additionalProperties: false
    cartTriggerEventsOutput:
      description: List of events to trigger during checkout
      type: array
      items:
        $ref: '#/components/schemas/TriggerEventOutput'
    TriggerEventOutput:
      type: object
      properties:
        type:
          type: string
          enum:
            - order
            - order.item
            - order.item.pending
            - order.item.processing
            - order.item.complete
            - order.item.failed
            - order.purchase
            - order.purchase.pending
            - order.purchase.processing
            - order.purchase.complete
            - order.purchase.cancelled
            - order.purchase.failed
            - order.purchase.full
            - order.purchase.full.pending
            - order.purchase.full.processing
            - order.purchase.full.complete
            - order.purchase.full.cancelled
            - order.purchase.full.failed
            - order.purchase.partial
            - order.purchase.partial.pending
            - order.purchase.partial.processing
            - order.purchase.partial.complete
            - order.purchase.partial.cancelled
            - order.purchase.partial.failed
            - order.update
            - order.update.3ds-required
            - order.update.adding-to-cart
            - order.update.filling-address-details
            - order.update.filling-card-details
            - order.update.submitting-order
            - order.update.changing-quantity
            - order.update.applying-coupon
            - order.update.selecting-shipping
            - order.update.selecting-options
            - order.update.product-search
            - points
            - points.give
            - points.remove
            - tier
            - tier.give
            - tier.remove
        conditional:
          $ref: '#/components/schemas/TriggerConditionalOutput'
        data:
          type: array
          items:
            $ref: '#/components/schemas/TriggerOutput'
      required:
        - type
        - data
      additionalProperties: false
    TriggerConditionalOutput:
      oneOf:
        - $ref: '#/components/schemas/TriggerConditionalTierOutput'
        - $ref: '#/components/schemas/TriggerConditionalPointsOutput'
      type: object
      discriminator:
        propertyName: type
        mapping:
          tier:
            $ref: '#/components/schemas/TriggerConditionalTierOutput'
          points:
            $ref: '#/components/schemas/TriggerConditionalPointsOutput'
    TriggerOutput:
      oneOf:
        - $ref: '#/components/schemas/TriggerGivePointsFixedOutput'
        - $ref: '#/components/schemas/TriggerGivePointsPerSpentOutput'
        - $ref: '#/components/schemas/TriggerRemovePointsFixedOutput'
        - $ref: '#/components/schemas/TriggerRemovePointsPerSpentOutput'
        - $ref: '#/components/schemas/TriggerGiveTierOutput'
        - $ref: '#/components/schemas/TriggerRemoveTierOutput'
        - $ref: '#/components/schemas/TriggerSendWebhookOutput'
        - $ref: '#/components/schemas/TriggerSendEmailOutput'
      type: object
      discriminator:
        propertyName: type
        mapping:
          give_points_fixed:
            $ref: '#/components/schemas/TriggerGivePointsFixedOutput'
          give_points_per_spent:
            $ref: '#/components/schemas/TriggerGivePointsPerSpentOutput'
          remove_points_fixed:
            $ref: '#/components/schemas/TriggerRemovePointsFixedOutput'
          remove_points_per_spent:
            $ref: '#/components/schemas/TriggerRemovePointsPerSpentOutput'
          give_tier:
            $ref: '#/components/schemas/TriggerGiveTierOutput'
          remove_tier:
            $ref: '#/components/schemas/TriggerRemoveTierOutput'
          send_webhook:
            $ref: '#/components/schemas/TriggerSendWebhookOutput'
          send_email:
            $ref: '#/components/schemas/TriggerSendEmailOutput'
    TriggerConditionalTierOutput:
      type: object
      properties:
        type:
          type: string
          const: tier
        operator:
          type: string
          enum:
            - equals
            - not_equals
        value:
          type: string
      required:
        - type
        - operator
        - value
      additionalProperties: false
    TriggerConditionalPointsOutput:
      type: object
      properties:
        type:
          type: string
          const: points
        operator:
          type: string
          enum:
            - equals
            - not_equals
            - greater_than
            - less_than
            - greater_than_or_equal
            - less_than_or_equal
        value:
          type: number
      required:
        - type
        - operator
        - value
      additionalProperties: false
    TriggerGivePointsFixedOutput:
      type: object
      properties:
        type:
          type: string
          const: give_points_fixed
        points:
          type: number
      required:
        - type
        - points
      additionalProperties: false
    TriggerGivePointsPerSpentOutput:
      type: object
      properties:
        type:
          type: string
          const: give_points_per_spent
        points:
          type: number
        perAmount:
          type: object
          properties:
            value:
              type: number
            currency:
              type: string
              enum:
                - USD
                - EUR
                - AUD
                - SGD
                - TWD
                - GBP
                - CAD
                - MXN
                - NPR
                - INR
                - DKK
                - NOK
                - SEK
                - CHF
                - PLN
                - CZK
                - JPY
                - NZD
                - HKD
          required:
            - value
            - currency
          additionalProperties: false
      required:
        - type
        - points
        - perAmount
      additionalProperties: false
    TriggerRemovePointsFixedOutput:
      type: object
      properties:
        type:
          type: string
          const: remove_points_fixed
        points:
          type: number
      required:
        - type
        - points
      additionalProperties: false
    TriggerRemovePointsPerSpentOutput:
      type: object
      properties:
        type:
          type: string
          const: remove_points_per_spent
        points:
          type: number
        perAmount:
          type: object
          properties:
            value:
              type: number
            currency:
              type: string
              enum:
                - USD
                - EUR
                - AUD
                - SGD
                - TWD
                - GBP
                - CAD
                - MXN
                - NPR
                - INR
                - DKK
                - NOK
                - SEK
                - CHF
                - PLN
                - CZK
                - JPY
                - NZD
                - HKD
          required:
            - value
            - currency
          additionalProperties: false
      required:
        - type
        - points
        - perAmount
      additionalProperties: false
    TriggerGiveTierOutput:
      type: object
      properties:
        type:
          type: string
          const: give_tier
        tierUUID:
          type: string
      required:
        - type
        - tierUUID
      additionalProperties: false
    TriggerRemoveTierOutput:
      type: object
      properties:
        type:
          type: string
          const: remove_tier
      required:
        - type
      additionalProperties: false
    TriggerSendWebhookOutput:
      type: object
      properties:
        type:
          type: string
          const: send_webhook
        webhookUUID:
          type: string
      required:
        - type
        - webhookUUID
      additionalProperties: false
    TriggerSendEmailOutput:
      type: object
      properties:
        type:
          type: string
          const: send_email
      required:
        - type
      additionalProperties: false
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````