---
schema_version: "1"
id: 9dd72eae2f79f8da62f228c26abd553ff68f7e69387ffc2cebb711664e6553fd
title: beforePOST_v2 replaces the dw.ocapi.shop.basket.beforePOST Hook
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/commerce/264-0-0/rn_b2c_22_10_basket_beforepost_mc.md
canonical_url: https://help.salesforce.com/s/articleView?id=commerce.rn_b2c_22_10_basket_beforepost_mc.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 1fd76acda54406dd22f7aced8377ed30bfcd39c2902c5405687c919c2aab5a27
description: With the OCAPI 22.10 release, dw.ocapi.shop.basket.beforePOST_v2 replaces the nonfunctional dw.ocapi.shop.basket.beforePOST hook.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# beforePOST\_v2 replaces the dw.ocapi.shop.basket.beforePOST Hook

With the OCAPI 22.10 release, `dw.ocapi.shop.basket.beforePOST_v2` replaces the nonfunctional `dw.ocapi.shop.basket.beforePOST` hook.

Why: The original hook had these issues:

- Using an incorrect input type (created basket, which isn’t available before the basket creation instead of the basket request document).
- Using an incorrect execution order (hook was executed after the creation of the basket, which is too late for a before hook to function).

Use the new beforePOST customization hook, as using the original hook is highly discouraged.