Enable Temporary Baskets for Immediate Order Requests in OCAPI

OCAPI 23.4 includes support for temporary baskets. Temporary baskets allow for immediate order requests in B2C Commerce. For example, a shopper uses a Buy Now option to purchase an item. The temporary basket, which has a limited lifetime of 15 minutes, is populated with all the data required to ready the basket for checkout without affecting the regular shopper basket.

How: Pass a query parameter temporary into POST baskets to create a temporary basket. With OCAPI 24.1 the basket document attribute is temporary_baskets indicates a basket is temporary.

The temporary basket differs from a shopper basket in the following ways:

  • Basket lifetime is limited compared to shopper baskets

    A temporary lifetime of 15 minutes is used for basket retention

  • Limit is separate from shopper and agent basket limits. The shopper can have up to 4 temporary baskets
  • Available to all shoppers including guests (unlike agent baskets)