v1

latestOpenAPI 3.0.02026-07-2475182625.5 KB
Session

Update session item

Updates an existing product item in the session cart. Typically used to modify quantities or apply custom pricing. Requires an authenticated request to modify pricing.

put/v2/checkouts/{checkoutPath}/sessions/{sessionId}/cart/items/{productPath}

Path parameters

checkoutPathstring required

The unique identifier for the checkout instance, in the format store-id/checkout-id (e.g., fastspring/main).

Note: Target a specific checkout path to route the session to a single buyer experience and ensure accurate pricing. Stores frequently run multiple checkout variations simultaneously.

Example:fastspring/main
sessionIdstring required

The unique identifier of the order session.

Example:OS123456789012345ABC
productPathstring required

The unique identifier of the product to update.

Note: You can update multiple products simultaneously by listing them in the path as a comma-separated string (e.g., gold-tier,silver-tier).

Example:gold-tier,silver-tier

Request body

productPathstring required

The unique identifier of the catalog product to add.

quantityinteger

The total volume of units to purchase. Defaults to 1 if omitted.

quantityBehaviorstring

Indicates whether the buyer is allowed to modify the item quantity during checkout. Requires an authenticated request.

quantityDefaultinteger

The default quantity presented at checkout. Requires an authenticated request.

attributesobject

A key-value map of custom metadata tied specifically to this order item. Requires an authenticated request.

Example request

{
  "productPath": "gold-tier",
  "quantity": 1,
  "quantityBehavior": "ALLOW",
  "quantityDefault": 1,
  "descriptions": {
    "display": {
      "ar": "Arabic",
      "cs": "Czech",
      "da": "Danish",
      "de": "German",
      "es": "Spanish",
      "en": "English",
      "fi": "Finnish",
      "fr": "French",
      "hr": "Croatian",
      "it": "Italian",
      "iw": "Hebrew",
      "ja": "Japanese",
      "ko": "Korean",
      "nl": "Dutch",
      "no": "Norwegian",
      "pl": "Polish",
      "pt": "Portuguese",
      "ru": "Russian",
      "sk": "Slovak",
      "sv": "Swedish",
      "tr": "Turkish",
      "zh": "Chinese"
    },
    "instructions": {
      "ar": "Arabic",
      "cs": "Czech",
      "da": "Danish",
      "de": "German",
      "es": "Spanish",
      "en": "English",
      "fi": "Finnish",
      "fr": "French",
      "hr": "Croatian",
      "it": "Italian",
      "iw": "Hebrew",
      "ja": "Japanese",
      "ko": "Korean",
      "nl": "Dutch",
      "no": "Norwegian",
      "pl": "Polish",
      "pt": "Portuguese",
      "ru": "Russian",
      "sk": "Slovak",
      "sv": "Swedish",
      "tr": "Turkish",
      "zh": "Chinese"
    },
    "summary": {
      "ar": "Arabic",
      "cs": "Czech",
      "da": "Danish",
      "de": "German",
      "es": "Spanish",
      "en": "English",
      "fi": "Finnish",
      "fr": "French",
      "hr": "Croatian",
      "it": "Italian",
      "iw": "Hebrew",
      "ja": "Japanese",
      "ko": "Korean",
      "nl": "Dutch",
      "no": "Norwegian",
      "pl": "Polish",
      "pt": "Portuguese",
      "ru": "Russian",
      "sk": "Slovak",
      "sv": "Swedish",
      "tr": "Turkish",
      "zh": "Chinese"
    },
    "imageUrl": "https://cdn.onfastspring.com/themes/images/default-store-logo.png"
  },
  "customPrice": {
    "unitPrice": {
      "AED": 10,
      "ARS": 10,
      "AUD": 10,
      "BRL": 10,
      "CAD": 10,
      "CHF": 10,
      "CLP": 10,
      "CNY": 10,
      "COP": 10,
      "CZK": 10,
      "DKK": 10,
      "EUR": 10,
      "GBP": 10,
      "HKD": 10,
      "HUF": 10,
      "IDR": 10,
      "INR": 10,
      "JPY": 10,
      "KRW": 10,
      "MXN": 10,
      "MYR": 10,
      "NOK": 10,
      "NZD": 10,
      "PEN": 10,
      "PHP": 10,
      "PLN": 10,
      "RUB": 10,
      "SAR": 10,
      "SEK": 10,
      "SGD": 10,
      "THB": 10,
      "TRY": 10,
      "TWD": 10,
      "USD": 10,
      "VND": 10,
      "ZAR": 10
    },
    "discounts": [
      {
        "minQuantity": 2,
        "amountDiscount": {
          "AED": 10,
          "ARS": 10,
          "AUD": 10,
          "BRL": 10,
          "CAD": 10,
          "CHF": 10,
          "CLP": 10,
          "CNY": 10,
          "COP": 10,
          "CZK": 10,
          "DKK": 10,
          "EUR": 10,
          "GBP": 10,
          "HKD": 10,
          "HUF": 10,
          "IDR": 10,
          "INR": 10,
          "JPY": 10,
          "KRW": 10,
          "MXN": 10,
          "MYR": 10,
          "NOK": 10,
          "NZD": 10,
          "PEN": 10,
          "PHP": 10,
          "PLN": 10,
          "RUB": 10,
          "SAR": 10,
          "SEK": 10,
          "SGD": 10,
          "THB": 10,
          "TRY": 10,
          "TWD": 10,
          "USD": 10,
          "VND": 10,
          "ZAR": 10
        },
        "percentDiscount": 10
      }
    ],
    "discountDuration": 3,
    "setupFee": {
      "AED": 10,
      "ARS": 10,
      "AUD": 10,
      "BRL": 10,
      "CAD": 10,
      "CHF": 10,
      "CLP": 10,
      "CNY": 10,
      "COP": 10,
      "CZK": 10,
      "DKK": 10,
      "EUR": 10,
      "GBP": 10,
      "HKD": 10,
      "HUF": 10,
      "IDR": 10,
      "INR": 10,
      "JPY": 10,
      "KRW": 10,
      "MXN": 10,
      "MYR": 10,
      "NOK": 10,
      "NZD": 10,
      "PEN": 10,
      "PHP": 10,
      "PLN": 10,
      "RUB": 10,
      "SAR": 10,
      "SEK": 10,
      "SGD": 10,
      "THB": 10,
      "TRY": 10,
      "TWD": 10,
      "USD": 10,
      "VND": 10,
      "ZAR": 10
    },
    "edsFee": {
      "AED": 10,
      "ARS": 10,
      "AUD": 10,
      "BRL": 10,
      "CAD": 10,
      "CHF": 10,
      "CLP": 10,
      "CNY": 10,
      "COP": 10,
      "CZK": 10,
      "DKK": 10,
      "EUR": 10,
      "GBP": 10,
      "HKD": 10,
      "HUF": 10,
      "IDR": 10,
      "INR": 10,
      "JPY": 10,
      "KRW": 10,
      "MXN": 10,
      "MYR": 10,
      "NOK": 10,
      "NZD": 10,
      "PEN": 10,
      "PHP": 10,
      "PLN": 10,
      "RUB": 10,
      "SAR": 10,
      "SEK": 10,
      "SGD": 10,
      "THB": 10,
      "TRY": 10,
      "TWD": 10,
      "USD": 10,
      "VND": 10,
      "ZAR": 10
    },
    "shippingFee": {
      "AED": 10,
      "ARS": 10,
      "AUD": 10,
      "BRL": 10,
      "CAD": 10,
      "CHF": 10,
      "CLP": 10,
      "CNY": 10,
      "COP": 10,
      "CZK": 10,
      "DKK": 10,
      "EUR": 10,
      "GBP": 10,
      "HKD": 10,
      "HUF": 10,
      "IDR": 10,
      "INR": 10,
      "JPY": 10,
      "KRW": 10,
      "MXN": 10,
      "MYR": 10,
      "NOK": 10,
      "NZD": 10,
      "PEN": 10,
      "PHP": 10,
      "PLN": 10,
      "RUB": 10,
      "SAR": 10,
      "SEK": 10,
      "SGD": 10,
      "THB": 10,
      "TRY": 10,
      "TWD": 10,
      "USD": 10,
      "VND": 10,
      "ZAR": 10
    }
  },
  "attributes": {
    "licenseKey": "ABC-123"
  },
  "subscriptionOverrides": {
    "billingFrequency": {
      "intervalUnit": "MONTH",
      "intervalLength": 1,
      "intervalCount": 1
    },
    "trialDays": 14
  }
}

Response

Successfully updated the item in the session.

productPathstring

The unique identifier of the selected product.

quantityinteger

The total volume of units configured for purchase.

quantityBehaviorstring

Indicates whether the buyer is allowed to modify the item quantity during checkout.

quantityDefaultinteger

The original default quantity associated with the item before any modifications.

virtualProductboolean

Indicates true if the item was dynamically constructed in the request and does not map to a saved catalog product.

productType'ONE_TIME' | 'SUBSCRIPTION_PLAN'

Categorizes the product as either a one-time purchase or a recurring charge.

removableboolean

Indicates true if the interface should allow the buyer to remove the item from the cart.

bundleboolean

Indicates true if the item serves as a parent bundle containing sub-products.

productFormat'DIGITAL' | 'PHYSICAL'

Categorizes the fulfillment logic format of the product.

attributesobject

A key-value map of custom metadata associated with the line item.

Example response

{
  "productPath": "gold-tier",
  "quantity": 2,
  "quantityBehavior": "ALLOW",
  "quantityDefault": 1,
  "price": {
    "unitNetPrice": 90,
    "unitNetPriceDisplay": "$90.00",
    "unitListPrice": 100,
    "unitListPriceDisplay": "$100.00",
    "unitDiscount": 10,
    "unitDiscountDisplay": "$10.00",
    "extendedTotalDiscount": 20,
    "extendedTotalDiscountDisplay": "$20.00",
    "extendedNetTotal": 180,
    "extendedNetTotalDisplay": "$180.00",
    "extendedListTotal": 200,
    "extendedListTotalDisplay": "$200.00",
    "taxIncluded": "TAXES_INCLUDED_IN_PRICE",
    "unitTaxAmount": 10,
    "unitTaxAmountDisplay": "$10.00",
    "extendedTaxTotal": 20,
    "extendedTaxTotalDisplay": "$20.00",
    "taxPercent": 10,
    "productDiscountDuration": 100,
    "couponDiscountDuration": 100
  },
  "productType": "ONE_TIME",
  "removable": true,
  "descriptions": {
    "display": {
      "ar": "Arabic",
      "cs": "Czech",
      "da": "Danish",
      "de": "German",
      "es": "Spanish",
      "en": "English",
      "fi": "Finnish",
      "fr": "French",
      "hr": "Croatian",
      "it": "Italian",
      "iw": "Hebrew",
      "ja": "Japanese",
      "ko": "Korean",
      "nl": "Dutch",
      "no": "Norwegian",
      "pl": "Polish",
      "pt": "Portuguese",
      "ru": "Russian",
      "sk": "Slovak",
      "sv": "Swedish",
      "tr": "Turkish",
      "zh": "Chinese"
    },
    "instructions": {
      "ar": "Arabic",
      "cs": "Czech",
      "da": "Danish",
      "de": "German",
      "es": "Spanish",
      "en": "English",
      "fi": "Finnish",
      "fr": "French",
      "hr": "Croatian",
      "it": "Italian",
      "iw": "Hebrew",
      "ja": "Japanese",
      "ko": "Korean",
      "nl": "Dutch",
      "no": "Norwegian",
      "pl": "Polish",
      "pt": "Portuguese",
      "ru": "Russian",
      "sk": "Slovak",
      "sv": "Swedish",
      "tr": "Turkish",
      "zh": "Chinese"
    },
    "summary": {
      "ar": "Arabic",
      "cs": "Czech",
      "da": "Danish",
      "de": "German",
      "es": "Spanish",
      "en": "English",
      "fi": "Finnish",
      "fr": "French",
      "hr": "Croatian",
      "it": "Italian",
      "iw": "Hebrew",
      "ja": "Japanese",
      "ko": "Korean",
      "nl": "Dutch",
      "no": "Norwegian",
      "pl": "Polish",
      "pt": "Portuguese",
      "ru": "Russian",
      "sk": "Slovak",
      "sv": "Swedish",
      "tr": "Turkish",
      "zh": "Chinese"
    },
    "imageUrl": "https://cdn.onfastspring.com/themes/images/default-store-logo.png"
  },
  "productFormat": "DIGITAL",
  "attributes": {
    "licenseKey": "ABC-123"
  },
  "subscription": {
    "billingFrequency": {
      "intervalUnit": "MONTH",
      "intervalLength": 1,
      "intervalCount": 1
    },
    "trialDays": 14
  }
}