> ## 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 Details

> Retrieve detailed information about a cart. Requests are async by default, or use mode=sync to wait up to 30 seconds for completion.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/henry-sdk/openapi.documented.yml post /cart/{cartId}/details
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/{cartId}/details:
    post:
      tags:
        - Cart
      summary: Cart Details
      description: >-
        Retrieve detailed information about a cart. Requests are async by
        default, or use mode=sync to wait up to 30 seconds for completion.
      operationId: cartDetails
      parameters:
        - in: path
          name: cartId
          schema:
            type: string
            description: Unique identifier for the cart
            example: crt_sa2aEsCz9PRM
          required: true
          description: Unique identifier for the cart
      requestBody:
        content:
          application/json:
            example:
              buyer:
                shippingAddress:
                  line1: 123 Main St
                  line2: Apt 4B
                  city: Anytown
                  province: CA
                  postalCode: '12345'
                  countryCode: US
              coupons:
                - SUMMER21
                - FREESHIP
              mode: async
            schema:
              $ref: '#/components/schemas/cartDetailsInput'
      responses:
        '201':
          description: >-
            Cart detail jobs queued successfully, use refIds to check status and
            retrieve results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/cartDetailsResponse'
        '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 response = await
            client.cart.checkout.details('crt_sa2aEsCz9PRM', {
              buyer: {
                shippingAddress: {
                  line1: '123 Main St',
                  line2: 'Apt 4B',
                  city: 'Anytown',
                  province: 'CA',
                  postalCode: '12345',
                  countryCode: 'US',
                },
              },
              coupons: ['SUMMER21', 'FREESHIP'],
              mode: 'async',
            });


            console.log(response.data);
components:
  schemas:
    cartDetailsInput:
      type: object
      properties:
        mode:
          description: >-
            Response mode. Use sync to wait up to 30 seconds for the backing
            worker flow to complete.
          example: async
          type: string
          enum:
            - async
            - sync
        overrideProducts:
          $ref: '#/components/schemas/overrideProducts'
        buyer:
          type: object
          properties:
            shippingAddress:
              type: object
              properties:
                name:
                  type: object
                  properties:
                    firstName:
                      type: string
                    middleName:
                      type: string
                    lastName:
                      type: string
                  required:
                    - firstName
                    - lastName
                email:
                  type: string
                  format: email
                  pattern: >-
                    ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                phone:
                  type: object
                  properties:
                    countryCode:
                      type: string
                    nationalNumber:
                      type: string
                    e164:
                      type: string
                    country:
                      type: string
                  required:
                    - countryCode
                    - nationalNumber
                    - e164
                line1:
                  type: string
                line2:
                  type: string
                city:
                  type: string
                province:
                  type: string
                postalCode:
                  type: string
                countryCode:
                  type: string
              required:
                - line1
                - city
                - province
                - postalCode
                - countryCode
              description: Shipping address for the cart
          required:
            - shippingAddress
        coupons:
          description: List of coupon codes applied to the cart
          example:
            - SUMMER21
            - FREESHIP
          type: array
          items:
            type: string
        metadata:
          description: Additional metadata for the request
          type: object
          properties:
            botAuth:
              description: Bot authentication credentials
              type: object
              properties:
                forterToken:
                  description: Forter token for bot authentication
                  type: string
            userData:
              description: User identity and device information
              type: object
              properties:
                ipAddress:
                  description: IP address of the user
                  type: string
                userAgent:
                  description: User agent string of the user's browser or client
                  type: string
      required:
        - buyer
    cartDetailsResponse:
      type: object
      properties:
        success:
          type: boolean
        status:
          type: string
        message:
          type: string
        data:
          type: object
          properties:
            jobs:
              type: array
              items:
                $ref: '#/components/schemas/cartDetailsStatusResponse'
              description: >-
                List of jobs created to fetch checkout details for each cart
                item
            metadata:
              type: object
              propertyNames:
                type: string
              additionalProperties: {}
          required:
            - jobs
          additionalProperties: false
      required:
        - success
        - status
        - message
        - data
      additionalProperties: false
    overrideProducts:
      type: object
      propertyNames:
        type: string
        format: uri
      additionalProperties:
        $ref: '#/components/schemas/productOverride'
      description: >-
        Per-product overrides keyed by product URL. Items with quantity null or
        0 are excluded.
      example:
        https://www.nike.com/u/custom-nike-ja-3-by-you-10002205:
          quantity: 2
    cartDetailsStatusResponse:
      type: object
      properties:
        refId:
          type: string
          pattern: ^[a-zA-Z]{3}-ref_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}$
        status:
          type: string
          enum:
            - pending
            - processing
            - complete
            - failed
        result:
          type: object
          properties:
            data:
              type: object
              properties:
                shippingOptions:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      cost:
                        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
                      timeEstimate:
                        type: string
                      minDate:
                        type: string
                      maxDate:
                        type: string
                    required:
                      - id
                      - name
                      - cost
                    additionalProperties: false
                costs:
                  type: object
                  properties:
                    subtotal:
                      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
                    tax:
                      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
                    shipping:
                      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
                    discount:
                      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
                    total:
                      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:
                    - subtotal
                    - total
                  additionalProperties: false
                coupons:
                  type: array
                  items:
                    type: object
                    properties:
                      code:
                        type: string
                      available:
                        type: boolean
                      savedAmount:
                        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:
                      - code
                      - available
                    additionalProperties: false
              required:
                - shippingOptions
                - costs
              additionalProperties: false
            items:
              type: array
              items:
                type: object
                properties:
                  shippingOptions:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        cost:
                          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
                        timeEstimate:
                          type: string
                        minDate:
                          type: string
                        maxDate:
                          type: string
                      required:
                        - id
                        - name
                        - cost
                      additionalProperties: false
                  costs:
                    type: object
                    properties:
                      subtotal:
                        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
                      tax:
                        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
                      shipping:
                        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
                      discount:
                        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
                      total:
                        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:
                      - subtotal
                      - total
                    additionalProperties: false
                  coupons:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        available:
                          type: boolean
                        savedAmount:
                          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:
                        - code
                        - available
                      additionalProperties: false
                required:
                  - shippingOptions
                  - costs
                additionalProperties: false
          required:
            - items
          additionalProperties: false
        error:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
      required:
        - refId
        - status
      additionalProperties: false
    productOverride:
      type: object
      properties:
        quantity:
          description: >-
            Override quantity for this product. null or 0 excludes the item from
            the operation.
          example: 2
          anyOf:
            - type: integer
              minimum: 0
              maximum: 9007199254740991
            - type: 'null'
        selectedShipping:
          description: >-
            Shipping option to apply for this product at purchase time.
            Overwrites the cart item's stored selectedShipping for the resulting
            order.
          type: object
          properties:
            id:
              description: >-
                Merchant-specific shipping option id, typically returned by
                /cart/{cartId}/details
              example: SHIP_EXPRESS
              type: string
            value:
              description: Common value of the shipping option
              example: express
              type: string
      description: Per-product override applied at details / purchase time
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````