# OCAPI Hooks for Shop API

The following hooks exist in OCAPI.

## Auth

Auth hooks for Shop API.

***

**dw\.ocapi.shop.auth.afterPOST**

`POST /customers/auth`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPOST</b> (customer : <i>dw.customer.Customer</i>, authRequestType : <i>dw.value.EnumValue</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the customer has been authenticated. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the authenticated customer</dd>
    <dd>authRequestType - does the request specify a guest, login or refresh authentication</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.auth.beforePOST**

`POST /customers/auth`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePOST</b> (authorizationHeader : <i>String</i>, authRequestType : <i>dw.value.EnumValue</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the customer has been authenticated. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>authorizationHeader - the authorization header. Differs depending on the type: 
      <ul>
        <li>guest - no content relevant to the authentication.</li>
        <li>credentials - Base64 encoded username and password. For example Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=. It is possible to extract the username or password: <codeblock>var credentials = authHeader.substr(6); // cut out Basic var base64decoded : String = StringUtils.decodeBase64(credentials, "UTF-8"); var userName : String = base64decoded.split(":")[0]; var password : String = base64decoded.split(":")[1];</codeblock></li>
        <li>refresh - A refresh token, for example Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXX</li>
        <li>session - no content relevant to the authentication. Authentication based on cookies.</li>
      </ul>
    </dd>
    <dd>authRequestType - does the request specify a guest, login or refresh authentication</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.auth.modifyPOSTResponse**

`POST /customers/auth`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPOSTResponse</b> (customer : <i>dw.customer.Customer</i>, customerResponse : <i>Customer</i>, authRequestType : <i>dw.value.EnumValue</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the auth customer</dd>
    <dd>customerResponse - customer response object</dd>
    <dd>authRequestType - auth request type enum</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Basket

Basket hooks for Shop API.

***

**dw\.ocapi.shop.basket.afterDELETE**

`DELETE /baskets/{basket_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterDELETE</b> (basketId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after removing a basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketId - the identifier of the removed basket</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.afterPATCH**

`PATCH /baskets/{basket_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPATCH</b> (basket : <i>dw.order.Basket</i>, basketInput : <i>Basket</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after updating of the basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket that was updated</dd>
    <dd>basketInput - the basket delta containing the desired changes</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.afterPOST**

`POST /baskets`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPOST</b> (basket : <i>dw.order.Basket</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the basket was created. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the created basket</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.agent.afterPUT**

`PUT /baskets/{basket_id}/agent`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPUT</b> (basket : <i>dw.order.Basket</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after a put of a basket as an agent basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.agent.beforePUT**

`PUT /baskets/{basket_id}/agent`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePUT</b> (basketId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketId - the basket id</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.agent.modifyPUTResponse**

`PUT /baskets/{basket_id}/agent`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPUTResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.approaching_discounts.beforeGET**

`GET /baskets/{basket_id}/approaching_discounts`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (basketId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketId - the basket id</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.approaching_discounts.modifyGETResponse**

`GET /baskets/{basket_id}/approaching_discounts`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (approachingDiscountResultResponse : <i>ApproachingDiscountResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>approachingDiscountResultResponse - approaching discount result response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.beforeDELETE**

`DELETE /baskets/{basket_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeDELETE</b> (basket : <i>dw.order.Basket</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before removing a basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket to be removed</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.beforeGET**

`GET /baskets/{basket_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (basketId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketId - the basket id</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.beforePATCH**

`PATCH /baskets/{basket_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePATCH</b> (basket : <i>dw.order.Basket</i>, basketInput : <i>Basket</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before updating of the basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket to be updated</dd>
    <dd>basketInput - the basket delta containing the desired changes</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.beforePOST_v2**

`POST /baskets`

<details>
<summary>Method details</summary>

<p>
  <b>beforePOST_v2</b> (basketRequest : <i>Basket</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketRequest - the basket request</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.billing_address.afterPUT**

`PUT /baskets/{basket_id}/billing_address`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPUT</b> (basket : <i>dw.order.Basket</i>, billingAddress : <i>OrderAddress</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after setting of the billing address to the basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the order is created</dd>
    <dd>billingAddress - the billing address that was set to the basket</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.billing_address.beforePUT**

`PUT /baskets/{basket_id}/billing_address`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePUT</b> (basket : <i>dw.order.Basket</i>, billingAddress : <i>OrderAddress</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before setting of the billing address to the basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the order is created</dd>
    <dd>billingAddress - the billing address to be set to the basket</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.billing_address.modifyPUTResponse**

`PUT /baskets/{basket_id}/billing_address`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPUTResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>, addressRequest : <i>OrderAddress</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
    <dd>addressRequest - address request object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.coupon.afterDELETE**

`DELETE /baskets/{basket_id}/coupons/{coupon_item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterDELETE</b> (basket : <i>dw.order.Basket</i>, couponItemID : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after removing a coupon from a basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket the coupon get removed from</dd>
    <dd>couponItemID - the coupon information</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.coupon.afterPOST**

`POST /baskets/{basket_id}/coupons`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPOST</b> (basket : <i>dw.order.Basket</i>, couponItem : <i>CouponItem</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after adding a coupon to a basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket the coupon get added to</dd>
    <dd>couponItem - the coupon information</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.coupon.beforeDELETE**

`DELETE /baskets/{basket_id}/coupons/{coupon_item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeDELETE</b> (basket : <i>dw.order.Basket</i>, couponItemID : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before removing a coupon from a basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket the coupon get removed from</dd>
    <dd>couponItemID - the coupon information</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.coupon.beforePOST**

`POST /baskets/{basket_id}/coupons`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePOST</b> (basket : <i>dw.order.Basket</i>, couponItem : <i>CouponItem</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before adding a coupon to a basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket the coupon get added to</dd>
    <dd>couponItem - the coupon information</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.coupon.modifyDELETEResponse**

`DELETE /baskets/{basket_id}/coupons/{coupon_item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyDELETEResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>, couponItemId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
    <dd>couponItemId - coupon item id</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.coupon.modifyPOSTResponse**

`POST /baskets/{basket_id}/coupons`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPOSTResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>, couponRequest : <i>CouponItem</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
    <dd>couponRequest - coupon request object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.customer.afterPUT**

`PUT /baskets/{basket_id}/customer`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPUT</b> (basket : <i>dw.order.Basket</i>, customerInfo : <i>CustomerInfo</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after setting of customer information for the basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the order is created</dd>
    <dd>customerInfo - the customer information that were set to the basket</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.customer.beforePUT**

`PUT /baskets/{basket_id}/customer`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePUT</b> (basket : <i>dw.order.Basket</i>, customerInfo : <i>CustomerInfo</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before setting of customer information for the basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the order is created</dd>
    <dd>customerInfo - the customer information to be set to the basket</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.customer.modifyPUTResponse**

`PUT /baskets/{basket_id}/customer`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPUTResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>, customerRequest : <i>CustomerInfo</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
    <dd>customerRequest - customer request object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.gift_certificate_item.afterDELETE**

`DELETE /baskets/{basket_id}/gift_certificate_items/{gift_certificate_item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterDELETE</b> (basket : <i>dw.order.Basket</i>, giftCertificateItemId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after deleting a gift certificate item from a basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the order is created</dd>
    <dd>giftCertificateItemId - the id of the deleted gift certificate item</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.gift_certificate_item.afterPATCH**

`PATCH /baskets/{basket_id}/gift_certificate_items/{gift_certificate_item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPATCH</b> (basket : <i>dw.order.Basket</i>, giftCertificateItemId : <i>String</i>, item : <i>GiftCertificateItem</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after updating a gift certificate item of a basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the order is created</dd>
    <dd>giftCertificateItemId - the id of the updated gift certificate item</dd>
    <dd>item - the new gift certificate item data</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.gift_certificate_item.afterPOST**

`POST /baskets/{basket_id}/gift_certificate_items`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPOST</b> (basket : <i>dw.order.Basket</i>, item : <i>GiftCertificateItem</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after adding a gift certificate item to a basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the order is created</dd>
    <dd>item - the gift certificate item to add</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.gift_certificate_item.beforeDELETE**

`DELETE /baskets/{basket_id}/gift_certificate_items/{gift_certificate_item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeDELETE</b> (basket : <i>dw.order.Basket</i>, giftCertificateItemId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before deleting a gift certificate item from a basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the order is created</dd>
    <dd>giftCertificateItemId - the id of the gift certificate item to be deleted</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.gift_certificate_item.beforePATCH**

`PATCH /baskets/{basket_id}/gift_certificate_items/{gift_certificate_item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePATCH</b> (basket : <i>dw.order.Basket</i>, giftCertificateItemId : <i>String</i>, item : <i>GiftCertificateItem</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before updating a gift certificate item of a basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the order is created</dd>
    <dd>giftCertificateItemId - the id of the gift certificate item to be updated</dd>
    <dd>item - the new gift certificate item data</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.gift_certificate_item.beforePOST**

`POST /baskets/{basket_id}/gift_certificate_items`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePOST</b> (basket : <i>dw.order.Basket</i>, item : <i>GiftCertificateItem</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before adding a gift certificate item to a basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the order is created</dd>
    <dd>item - the gift certificate item to add</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.gift_certificate_item.modifyDELETEResponse**

`DELETE /baskets/{basket_id}/gift_certificate_items/{gift_certificate_item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyDELETEResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>, giftCertificateItemId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
    <dd>giftCertificateItemId - the id of the deleted gift certificate item</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.gift_certificate_item.modifyPATCHResponse**

`PATCH /baskets/{basket_id}/gift_certificate_items/{gift_certificate_item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPATCHResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>, giftCertificateItemId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
    <dd>giftCertificateItemId - the id of the updated gift certificate item</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.gift_certificate_item.modifyPOSTResponse**

`POST /baskets/{basket_id}/gift_certificate_items`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPOSTResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>, certificateItemRequest : <i>GiftCertificateItem</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
    <dd>certificateItemRequest - certificateItem request object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.item.afterDELETE**

`DELETE /baskets/{basket_id}/items/{item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterDELETE</b> (basket : <i>dw.order.Basket</i>, productItemId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after a basket item is removed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the order is created</dd>
    <dd>productItemId - the id of the removed product item</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.item.afterPATCH**

`PATCH /baskets/{basket_id}/items/{item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPATCH</b> (basket : <i>dw.order.Basket</i>, item : <i>ProductItem</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after updating of the basket's item. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the order is created</dd>
    <dd>item - the product item delta containing the desired changes to the product item</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.item.beforeDELETE**

`DELETE /baskets/{basket_id}/items/{item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeDELETE</b> (basket : <i>dw.order.Basket</i>, productItemId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before a basket item is removed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the order is created</dd>
    <dd>productItemId - the id of the product item to be removed</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.item.beforePATCH**

`PATCH /baskets/{basket_id}/items/{item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePATCH</b> (basket : <i>dw.order.Basket</i>, item : <i>ProductItem</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before updating of the basket's item. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the order is created</dd>
    <dd>item - the product item delta containing the desired changes to the product item</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.item.modifyDELETEResponse**

`DELETE /baskets/{basket_id}/items/{item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyDELETEResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>, productItemId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
    <dd>productItemId - productItemId request object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.item.modifyPATCHResponse**

`PATCH /baskets/{basket_id}/items/{item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPATCHResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>, productItemId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
    <dd>productItemId - productItemId request object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.items.afterPATCH**

`PATCH /baskets/{basket_id}/items`

<details>
<summary>Method details</summary>
<p>
<b>afterPATCH</b> (basket: <i>Basket</i>, items: <i>ProductItem[]</i>) : <i>dw.system.Status</i>
</p>
<p>
The function is called by extension point  {@value #extensionPointAfterPatch}  after the patch basket items.
</p>

<div>
<dl>
<dt><b>Parameters:</b></dt>
<dd>basket - the target basket</dd>
<dd>items - productItems array of product items</dd>
</dl>
<dl>
<dt><b>Returns:</b></dt>
<dd>a non-null Status ends the hook execution</dd>
</dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.items.afterPOST**

`POST /baskets/{basket_id}/items`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPOST</b> (basket : <i>dw.order.Basket</i>, items : <i>ProductItem</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>items - productItems array of product items</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.items.beforePATCH**

`PATCH /baskets/{basket_id}/items`

<details>
<summary>Method details</summary>
<p>
<b>beforePATCH</b> (basket: <i>Basket</i>, items: <i>ProductItem[]</i>) : <i>dw.system.Status</i>
</p>
<p>
The function is called by extension point  {@value #extensionPointBeforePatch}  before the patch basket items.
</p>

<div>
<dl>
<dt><b>Parameters:</b></dt>
<dd>basket - the target basket</dd>
<dd>items - productItems array of product items</dd>
</dl>
<dl>
<dt><b>Returns:</b></dt>
<dd>a non-null Status ends the hook execution</dd>
</dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.items.beforePOST**

`POST /baskets/{basket_id}/items`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePOST</b> (basket : <i>dw.order.Basket</i>, items : <i>ProductItem</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>items - productItems array of product items</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.items.modifyPATCHResponse**

`PATCH /baskets/{basket_id}/items`

<details>
<summary>Method details</summary>
<p>
<b>modifyPATCHResponse</b> (basket: <i>Basket</i>, productItems: <i>ProductItem[]</i>, basketResponse: <i>Basket</i>) : <i>dw.system.Status</i>
</p>
<p>
The function is called to modify the response by extension point  {@value #extensionPointModifyPATCHResponse} 
 after the patch basket items.
</p>

<div>
<dl>
<dt><b>Parameters:</b></dt>
<dd>basket - the target basket</dd>
<dd>productItems - productItems array of product items</dd>
<dd>basketResponse - basket response object</dd>
</dl>
<dl>
<dt><b>Returns:</b></dt>
<dd>a non-null Status ends the hook execution</dd>
</dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.items.modifyPOSTResponse**

`POST /baskets/{basket_id}/items`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPOSTResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>, productItems : <i>ProductItem</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
    <dd>productItems - productItems array of product items</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.modifyGETResponse**

`GET /baskets/{basket_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.modifyPATCHResponse**

`PATCH /baskets/{basket_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPATCHResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.modifyPOSTResponse**

`POST /baskets`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPOSTResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the created basket</dd>
    <dd>basketResponse - basket response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.note.afterDELETE**

`DELETE /baskets/{basket_id}/notes/{note_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterDELETE</b> (basket : <i>dw.order.Basket</i>, note : <i>dw.object.Note</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after a note is deleted. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket</dd>
    <dd>note - the note to be removed</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.note.afterPOST**

`POST /baskets/{basket_id}/notes`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPOST</b> (basketId : <i>String</i>, note : <i>Note</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after a note is added. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket</dd>
    <dd>note - the note to be added</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.note.beforeDELETE**

`DELETE /baskets/{basket_id}/notes/{note_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeDELETE</b> (basket : <i>dw.order.Basket</i>, note : <i>dw.object.Note</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before a note is deleted. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket</dd>
    <dd>note - the note to be removed</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.note.beforePOST**

`POST /baskets/{basket_id}/notes`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePOST</b> (basketId : <i>String</i>, note : <i>Note</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before a note is added. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketId - the basket</dd>
    <dd>note - the note to be added</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.note.modifyDELETEResponse**

`DELETE /baskets/{basket_id}/notes/{note_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyDELETEResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>, noteId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
    <dd>noteId - deleted note id</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.note.modifyPOSTResponse**

`POST /baskets/{basket_id}/notes`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPOSTResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>, noteRequest : <i>Note</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
    <dd>noteRequest - note request object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.notes.beforeGET**

`GET /baskets/{basket_id}/notes`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (basketId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketId - the basket id the notes result retrieved for.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.notes.modifyGETResponse_v2**

`GET /baskets/{basket_id}/notes`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse_v2</b> (basket : <i>dw.order.Basket</i>, notesResponse : <i>NotesResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket the notes result retrieved for.</dd>
    <dd>notesResponse - notes response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.payment_instrument.afterDELETE**

`DELETE /baskets/{basket_id}/payment_instruments/{payment_instrument_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterDELETE</b> (basket : <i>dw.order.Basket</i>) : <i>dw.system.Status</i> 
</p>
<p>
  It is called after the <i>order payment instrument</i> is removed from the basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket the payment instrument was removed from</dd>
    <dd>paymentInstrument - the payment instrument to be deleted</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.payment_instrument.afterPATCH**

`PATCH /baskets/{basket_id}/payment_instruments/{payment_instrument_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPATCH</b> (basket : <i>dw.order.Basket</i>, paymentInstrument : <i>dw.order.OrderPaymentInstrument</i>, paymentInstrumentRequest : <i>BasketPaymentInstrumentRequest</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after updating a payment instrument of a basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the order is created</dd>
    <dd>paymentInstrument - the updated payment instrument</dd>
    <dd>paymentInstrumentRequest - the new payment instrument data</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.payment_instrument.afterPOST**

`POST /baskets/{basket_id}/payment_instruments`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPOST</b> (basket : <i>dw.order.Basket</i>, paymentInstrument : <i>BasketPaymentInstrumentRequest</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after payment instrument adding to a basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the order is created</dd>
    <dd>paymentInstrument - the payment instrument added to the basket</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.payment_instrument.beforeDELETE**

`DELETE /baskets/{basket_id}/payment_instruments/{payment_instrument_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeDELETE</b> (basket : <i>dw.order.Basket</i>, delete : <i>dw.order.OrderPaymentInstrument</i>) : <i>dw.system.Status</i> 
</p>
<p>
  It is called before the <i>order payment instrument</i> is removed from the basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket to remove the payment instrument from</dd>
    <dd>delete - the order payment instrument document.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.payment_instrument.beforePATCH**

`PATCH /baskets/{basket_id}/payment_instruments/{payment_instrument_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePATCH</b> (basket : <i>dw.order.Basket</i>, paymentInstrument : <i>dw.order.OrderPaymentInstrument</i>, newPaymentInstrument : <i>BasketPaymentInstrumentRequest</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before updating a payment instrument of a basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the order is created</dd>
    <dd>paymentInstrument - the payment instrument to be updated</dd>
    <dd>newPaymentInstrument - the new payment instrument data</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.payment_instrument.beforePOST**

`POST /baskets/{basket_id}/payment_instruments`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePOST</b> (basket : <i>dw.order.Basket</i>, paymentInstrument : <i>BasketPaymentInstrumentRequest</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before payment instrument adding to a basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the order is created</dd>
    <dd>paymentInstrument - the payment instrument to be added to the basket</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.payment_instrument.modifyDELETEResponse**

`DELETE /baskets/{basket_id}/payment_instruments/{payment_instrument_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyDELETEResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>, paymentInstrumentId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
    <dd>paymentInstrumentRequest - payment instrument id</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.payment_instrument.modifyPATCHResponse**

`PATCH /baskets/{basket_id}/payment_instruments/{payment_instrument_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPATCHResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>, paymentInstrumentId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
    <dd>paymentInstrumentRequest - payment instrument id</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.payment_instrument.modifyPOSTResponse**

`POST /baskets/{basket_id}/payment_instruments`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPOSTResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>, paymentInstrumentRequest : <i>BasketPaymentInstrumentRequest</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
    <dd>paymentInstrumentRequest - payment instrument request object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.payment_methods.afterGET**

`GET /baskets/{basket_id}/payment_methods`

<details>  
<summary>Method details</summary>

<p>
  <b>afterGET</b> (basket : <i>dw.order.Basket</i>, paymentMethods : <i>PaymentMethodResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Called before returning the list of available payment methods to the customer. Allowing modifications of the result. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket</dd>
    <dd>paymentMethods - the available payment methods</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.payment_methods.beforeGET**

`GET /baskets/{basket_id}/payment_methods`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (basketId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketId - the basket id</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.payment_methods.modifyGETResponse_v2**

`GET /baskets/{basket_id}/payment_methods`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse_v2</b> (basket : <i>dw.order.Basket</i>, paymentMethodResultResponse : <i>PaymentMethodResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket the payment method result retrieved for.</dd>
    <dd>paymentMethodResultResponse - paymentMethodResult response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.price_adjustment.afterDELETE**

`DELETE /baskets/{basket_id}/price_adjustments/{price_adjustment_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterDELETE</b> (basket : <i>dw.order.Basket</i>, priceAdjustmentId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after a custom price adjustment was removed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket</dd>
    <dd>priceAdjustmentId - the id of the deleted price adjustment</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.price_adjustment.afterPATCH**

`PATCH /baskets/{basket_id}/price_adjustments/{price_adjustment_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPATCH</b> (basket : <i>dw.order.Basket</i>, priceAdjustmentId : <i>String</i>, priceAdjustmentWO : <i>PriceAdjustment</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after a custom price adjustment was updated. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket</dd>
    <dd>priceAdjustmentId - the id of the updated price adjustment</dd>
    <dd>priceAdjustmentWO - the new price adjustment data</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.price_adjustment.afterPOST**

`POST /baskets/{basket_id}/price_adjustments`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPOST</b> (basket : <i>dw.order.Basket</i>, request : <i>PriceAdjustmentRequest</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after a custom price adjustment was added. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket</dd>
    <dd>request - The request for the price adjustment</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.price_adjustment.beforeDELETE**

`DELETE /baskets/{basket_id}/price_adjustments/{price_adjustment_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeDELETE</b> (basket : <i>dw.order.Basket</i>, priceAdjustmentId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before a custom price adjustment is removed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket</dd>
    <dd>priceAdjustmentId - the id of the price adjustment to be deleted</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.price_adjustment.beforePATCH**

`PATCH /baskets/{basket_id}/price_adjustments/{price_adjustment_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePATCH</b> (basket : <i>dw.order.Basket</i>, priceAdjustmentId : <i>String</i>, priceAdjustmentWO : <i>PriceAdjustment</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before a custom price adjustment is updated. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket</dd>
    <dd>priceAdjustmentId - the id of the price adjustment to be updated</dd>
    <dd>priceAdjustmentWO - the new price adjustment data</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.price_adjustment.beforePOST**

`POST /baskets/{basket_id}/price_adjustments`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePOST</b> (basket : <i>dw.order.Basket</i>, request : <i>PriceAdjustmentRequest</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before a custom price adjustment is added. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket</dd>
    <dd>request - The request for the price adjustment</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.price_adjustment.modifyDELETEResponse**

`DELETE /baskets/{basket_id}/price_adjustments/{price_adjustment_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyDELETEResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>, priceAdjustmentId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
    <dd>priceAdjustmentId - price adjustment id</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.price_adjustment.modifyPATCHResponse**

`PATCH /baskets/{basket_id}/price_adjustments/{price_adjustment_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPATCHResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>, priceAdjustmentId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
    <dd>priceAdjustmentId - price adjustment id</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.price_adjustment.modifyPOSTResponse**

`POST /baskets/{basket_id}/price_adjustments`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPOSTResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>, priceAdjustmentRequest : <i>PriceAdjustmentRequest</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
    <dd>priceAdjustmentRequest - price adjustment request object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.reference.afterPOST**

`POST /baskets/reference`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPOST</b> (sourceBasket : <i>dw.order.Basket</i>, basket : <i>dw.order.Basket</i>, request : <i>BasketReference</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>sourceBasket - the basket to copy the data from</dd>
    <dd>basket - the created basket</dd>
    <dd>basketReferenceRequest - the basket reference input document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.reference.beforePOST**

`POST /baskets/reference`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePOST</b> (sourceBasket : <i>dw.order.Basket</i>, request : <i>BasketReference</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>sourceBasket - the basket to copy the data from</dd>
    <dd>basketReferenceRequest - the basket reference input document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.reference.modifyPOSTResponse**

`POST /baskets/reference`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPOSTResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>, basketReferenceRequest : <i>BasketReference</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the created basket</dd>
    <dd>basketResponse - the basket response object</dd>
    <dd>basketReferenceRequest - the basket reference input document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.shipment.afterDELETE**

`DELETE /baskets/{basket_id}/shipments/{shipment_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterDELETE</b> (basket : <i>dw.order.Basket</i>, shipmentId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Called after the basket's shipment was removed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket that was updated</dd>
    <dd>shipmentId - the id of the deleted shipment</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.shipment.afterPATCH**

`PATCH /baskets/{basket_id}/shipments/{shipment_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPATCH</b> (basket : <i>dw.order.Basket</i>, shipment : <i>dw.order.Shipment</i>, shipmentInfo : <i>Shipment</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after patching of a shipment for a basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the shipment was changed</dd>
    <dd>shipment - the shipment that has been updated</dd>
    <dd>shipmentInfo - the shipment information for the shipment update</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.shipment.afterPOST**

`POST /baskets/{basket_id}/shipments`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPOST</b> (basket : <i>dw.order.Basket</i>, shipment : <i>Shipment</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the creation of a shipment for a basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the shipment was created</dd>
    <dd>shipment - the shipment information for the shipment creation</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.shipment.beforeDELETE**

`DELETE /baskets/{basket_id}/shipments/{shipment_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeDELETE</b> (basket : <i>dw.order.Basket</i>, shipment : <i>dw.order.Shipment</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Called before the basket's shipment is removed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket to be updated</dd>
    <dd>shipment - the shipment to be deleted</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.shipment.beforePATCH**

`PATCH /baskets/{basket_id}/shipments/{shipment_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePATCH</b> (basket : <i>dw.order.Basket</i>, shipment : <i>dw.order.Shipment</i>, shipmentInfo : <i>Shipment</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before changing of a shipment for a basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the shipment will be updated</dd>
    <dd>shipment - the current shipment to be updated</dd>
    <dd>shipmentInfo - the shipment information for the shipment update (update data)</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.shipment.beforePOST**

`POST /baskets/{basket_id}/shipments`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePOST</b> (basket : <i>dw.order.Basket</i>, shipment : <i>Shipment</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the creation of a shipment for a basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the shipment will be created</dd>
    <dd>shipment - the shipment information for the shipment creation</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.shipment.modifyDELETEResponse**

`DELETE /baskets/{basket_id}/shipments/{shipment_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyDELETEResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>, shipmentId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
    <dd>shipmentId - shipment id</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.shipment.modifyPATCHResponse**

`PATCH /baskets/{basket_id}/shipments/{shipment_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPATCHResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>, shipmentId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
    <dd>shipmentId - shipment id</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.shipment.modifyPOSTResponse**

`POST /baskets/{basket_id}/shipments`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPOSTResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>, shipmentRequest : <i>Shipment</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
    <dd>shipmentRequest - shipment request object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.shipment.shipping_address.afterPUT**

`PUT /baskets/{basket_id}/shipments/{shipment_id}/shipping_address`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPUT</b> (basket : <i>dw.order.Basket</i>, shipment : <i>dw.order.Shipment</i>, shippingAddress : <i>OrderAddress</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after setting of the shipping address to a certain shipment of the basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the order is created</dd>
    <dd>shipment - the shipment information for the shipment creation</dd>
    <dd>shippingAddress - the shipping address that was set to the shipment</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.shipment.shipping_address.beforePUT**

`PUT /baskets/{basket_id}/shipments/{shipment_id}/shipping_address`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePUT</b> (basket : <i>dw.order.Basket</i>, shipment : <i>dw.order.Shipment</i>, shippingAddress : <i>OrderAddress</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before setting of the shipping address to a certain shipment of the basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the order is created</dd>
    <dd>shipment - the shipment information for the shipment creation</dd>
    <dd>shippingAddress - the shipping address to be set to the shipment</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.shipment.shipping_address.modifyPUTResponse**

`PUT /baskets/{basket_id}/shipments/{shipment_id}/shipping_address`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPUTResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>, orderAddressRequest : <i>OrderAddress</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
    <dd>orderAddressRequest - order address request object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.shipment.shipping_method.afterPUT**

`PUT /baskets/{basket_id}/shipments/{shipment_id}/shipping_method`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPUT</b> (basket : <i>dw.order.Basket</i>, shipment : <i>dw.order.Shipment</i>, shippingMethod : <i>ShippingMethod</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after setting of the shipping method to a certain shipment of the basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the order is created</dd>
    <dd>shipment - the shipment information for the shipment creation</dd>
    <dd>shippingMethod - the shipping method that was set to the shipment</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.shipment.shipping_method.beforePUT**

`PUT /baskets/{basket_id}/shipments/{shipment_id}/shipping_method`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePUT</b> (basket : <i>dw.order.Basket</i>, shipment : <i>dw.order.Shipment</i>, shippingMethod : <i>ShippingMethod</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before setting of the shipping method to a certain shipment of the basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the order is created</dd>
    <dd>shipment - the shipment information for the shipment creation</dd>
    <dd>shippingMethod - the shipping method to be set to the shipment</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.shipment.shipping_method.modifyPUTResponse**

`PUT /baskets/{basket_id}/shipments/{shipment_id}/shipping_method`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPUTResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>, shippingMethodRequest : <i>ShippingMethod</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
    <dd>shippingMethodRequest - shipping method request object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.shipments.shipping_methods.beforeGET**

`GET /baskets/{basket_id}/shipments/{shipment_id}/shipping_methods`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (basketId : <i>String</i>, shipmentId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketId - the target basket id</dd>
    <dd>shipmentId - the shipment id</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.shipments.shipping_methods.modifyGETResponse_v2**

`GET /baskets/{basket_id}/shipments/{shipment_id}/shipping_methods`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse_v2</b> (shipment : <i>dw.order.Shipment</i>, shippingMethodResult : <i>ShippingMethodResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>shipment - the shipment the shipping methods result retrieved for.</dd>
    <dd>shippingMethodResult - shipping method result object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.storefront.afterPUT**

`PUT /baskets/{basket_id}/storefront`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPUT</b> (basket : <i>dw.order.Basket</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after a put of a basket as storefront basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.storefront.beforePUT**

`PUT /baskets/{basket_id}/storefront`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePUT</b> (basketId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.storefront.modifyPUTResponse**

`PUT /baskets/{basket_id}/storefront`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPUTResponse</b> (basket : <i>dw.order.Basket</i>, basketResponse : <i>Basket</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the target basket</dd>
    <dd>basketResponse - basket response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.validateBasket**

`DELETE /baskets/{basket_id}/coupons/{coupon_item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>validateBasket</b> (basketResponse : <i>Basket</i>, duringSubmit : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows the addition of custom flashes or removal of internal flashes. The presence of a flash indicates that the basket cannot yet be submitted. Parameter <code>duringSubmit</code> indicates the current call is during the basket submit process. Default implementation returns ERROR if duringSubmit and any flash exists.
</p>
<p>
  Example showing addition, listing, and removal of flashes: 
</p>
<div>

```javascript
exports.validateBasket = function(basketResponse, duringSubmit) {
  basketResponse.addFlash({
    type: "MyType",
    message: "My message",
    path: "my_path",
    details: {
      "k1": "v1",
      "k2": "v2"
    }
  });
  var flashToRemove;
  for each(f in basketResponse.flashes) {
    if (f.type == "SomeOtherType") {
      flashToRemove = f;
    }
  }
  if (flashToRemove != null) {
    basketResponse.removeFlash(flashToRemove);
  }
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketResponse - the basket response to be validated, before any OCAPI property selection is applied</dd>
    <dd>duringSubmit - should the basket be checked for submit</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.validateBasket**

`DELETE /baskets/{basket_id}/items/{item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>validateBasket</b> (basketResponse : <i>Basket</i>, duringSubmit : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows the addition of custom flashes or removal of internal flashes. The presence of a flash indicates that the basket cannot yet be submitted. Parameter <code>duringSubmit</code> indicates the current call is during the basket submit process. Default implementation returns ERROR if duringSubmit and any flash exists.
</p>
<p>
  Example showing addition, listing, and removal of flashes: 
</p>
<div>

```javascript
exports.validateBasket = function(basketResponse, duringSubmit) {
  basketResponse.addFlash({
    type: "MyType",
    message: "My message",
    path: "my_path",
    details: {
      "k1": "v1",
      "k2": "v2"
    }
  });
  var flashToRemove;
  for each(f in basketResponse.flashes) {
    if (f.type == "SomeOtherType") {
      flashToRemove = f;
    }
  }
  if (flashToRemove != null) {
    basketResponse.removeFlash(flashToRemove);
  }
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketResponse - the basket response to be validated, before any OCAPI property selection is applied</dd>
    <dd>duringSubmit - should the basket be checked for submit</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.validateBasket**

`DELETE /baskets/{basket_id}/notes/{note_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>validateBasket</b> (basketResponse : <i>Basket</i>, duringSubmit : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows the addition of custom flashes or removal of internal flashes. The presence of a flash indicates that the basket cannot yet be submitted. Parameter <code>duringSubmit</code> indicates the current call is during the basket submit process. Default implementation returns ERROR if duringSubmit and any flash exists.
</p>
<p>
  Example showing addition, listing, and removal of flashes: 
</p>
<div>

```javascript
exports.validateBasket = function(basketResponse, duringSubmit) {
  basketResponse.addFlash({
    type: "MyType",
    message: "My message",
    path: "my_path",
    details: {
      "k1": "v1",
      "k2": "v2"
    }
  });
  var flashToRemove;
  for each(f in basketResponse.flashes) {
    if (f.type == "SomeOtherType") {
      flashToRemove = f;
    }
  }
  if (flashToRemove != null) {
    basketResponse.removeFlash(flashToRemove);
  }
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketResponse - the basket response to be validated, before any OCAPI property selection is applied</dd>
    <dd>duringSubmit - should the basket be checked for submit</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.validateBasket**

`DELETE /baskets/{basket_id}/payment_instruments/{payment_instrument_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>validateBasket</b> (basketResponse : <i>Basket</i>, duringSubmit : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows the addition of custom flashes or removal of internal flashes. The presence of a flash indicates that the basket cannot yet be submitted. Parameter <code>duringSubmit</code> indicates the current call is during the basket submit process. Default implementation returns ERROR if duringSubmit and any flash exists.
</p>
<p>
  Example showing addition, listing, and removal of flashes: 
</p>
<div>

```javascript
exports.validateBasket = function(basketResponse, duringSubmit) {
  basketResponse.addFlash({
    type: "MyType",
    message: "My message",
    path: "my_path",
    details: {
      "k1": "v1",
      "k2": "v2"
    }
  });
  var flashToRemove;
  for each(f in basketResponse.flashes) {
    if (f.type == "SomeOtherType") {
      flashToRemove = f;
    }
  }
  if (flashToRemove != null) {
    basketResponse.removeFlash(flashToRemove);
  }
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketResponse - the basket response to be validated, before any OCAPI property selection is applied</dd>
    <dd>duringSubmit - should the basket be checked for submit</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.validateBasket**

`DELETE /baskets/{basket_id}/price_adjustments/{price_adjustment_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>validateBasket</b> (basketResponse : <i>Basket</i>, duringSubmit : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows the addition of custom flashes or removal of internal flashes. The presence of a flash indicates that the basket cannot yet be submitted. Parameter <code>duringSubmit</code> indicates the current call is during the basket submit process. Default implementation returns ERROR if duringSubmit and any flash exists.
</p>
<p>
  Example showing addition, listing, and removal of flashes: 
</p>
<div>

```javascript
exports.validateBasket = function(basketResponse, duringSubmit) {
  basketResponse.addFlash({
    type: "MyType",
    message: "My message",
    path: "my_path",
    details: {
      "k1": "v1",
      "k2": "v2"
    }
  });
  var flashToRemove;
  for each(f in basketResponse.flashes) {
    if (f.type == "SomeOtherType") {
      flashToRemove = f;
    }
  }
  if (flashToRemove != null) {
    basketResponse.removeFlash(flashToRemove);
  }
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketResponse - the basket response to be validated, before any OCAPI property selection is applied</dd>
    <dd>duringSubmit - should the basket be checked for submit</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.validateBasket**

`DELETE /baskets/{basket_id}/shipments/{shipment_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>validateBasket</b> (basketResponse : <i>Basket</i>, duringSubmit : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows the addition of custom flashes or removal of internal flashes. The presence of a flash indicates that the basket cannot yet be submitted. Parameter <code>duringSubmit</code> indicates the current call is during the basket submit process. Default implementation returns ERROR if duringSubmit and any flash exists.
</p>
<p>
  Example showing addition, listing, and removal of flashes: 
</p>
<div>

```javascript
exports.validateBasket = function(basketResponse, duringSubmit) {
  basketResponse.addFlash({
    type: "MyType",
    message: "My message",
    path: "my_path",
    details: {
      "k1": "v1",
      "k2": "v2"
    }
  });
  var flashToRemove;
  for each(f in basketResponse.flashes) {
    if (f.type == "SomeOtherType") {
      flashToRemove = f;
    }
  }
  if (flashToRemove != null) {
    basketResponse.removeFlash(flashToRemove);
  }
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketResponse - the basket response to be validated, before any OCAPI property selection is applied</dd>
    <dd>duringSubmit - should the basket be checked for submit</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.validateBasket**

`GET /baskets/{basket_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>validateBasket</b> (basketResponse : <i>Basket</i>, duringSubmit : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows the addition of custom flashes or removal of internal flashes. The presence of a flash indicates that the basket cannot yet be submitted. Parameter <code>duringSubmit</code> indicates the current call is during the basket submit process. Default implementation returns ERROR if duringSubmit and any flash exists.
</p>
<p>
  Example showing addition, listing, and removal of flashes: 
</p>
<div>

```javascript
exports.validateBasket = function(basketResponse, duringSubmit) {
  basketResponse.addFlash({
    type: "MyType",
    message: "My message",
    path: "my_path",
    details: {
      "k1": "v1",
      "k2": "v2"
    }
  });
  var flashToRemove;
  for each(f in basketResponse.flashes) {
    if (f.type == "SomeOtherType") {
      flashToRemove = f;
    }
  }
  if (flashToRemove != null) {
    basketResponse.removeFlash(flashToRemove);
  }
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketResponse - the basket response to be validated, before any OCAPI property selection is applied</dd>
    <dd>duringSubmit - should the basket be checked for submit</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.validateBasket**

`PATCH /baskets/{basket_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>validateBasket</b> (basketResponse : <i>Basket</i>, duringSubmit : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows the addition of custom flashes or removal of internal flashes. The presence of a flash indicates that the basket cannot yet be submitted. Parameter <code>duringSubmit</code> indicates the current call is during the basket submit process. Default implementation returns ERROR if duringSubmit and any flash exists.
</p>
<p>
  Example showing addition, listing, and removal of flashes: 
</p>
<div>

```javascript
exports.validateBasket = function(basketResponse, duringSubmit) {
  basketResponse.addFlash({
    type: "MyType",
    message: "My message",
    path: "my_path",
    details: {
      "k1": "v1",
      "k2": "v2"
    }
  });
  var flashToRemove;
  for each(f in basketResponse.flashes) {
    if (f.type == "SomeOtherType") {
      flashToRemove = f;
    }
  }
  if (flashToRemove != null) {
    basketResponse.removeFlash(flashToRemove);
  }
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketResponse - the basket response to be validated, before any OCAPI property selection is applied</dd>
    <dd>duringSubmit - should the basket be checked for submit</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.validateBasket**

`PATCH /baskets/{basket_id}/items/{item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>validateBasket</b> (basketResponse : <i>Basket</i>, duringSubmit : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows the addition of custom flashes or removal of internal flashes. The presence of a flash indicates that the basket cannot yet be submitted. Parameter <code>duringSubmit</code> indicates the current call is during the basket submit process. Default implementation returns ERROR if duringSubmit and any flash exists.
</p>
<p>
  Example showing addition, listing, and removal of flashes: 
</p>
<div>

```javascript
exports.validateBasket = function(basketResponse, duringSubmit) {
  basketResponse.addFlash({
    type: "MyType",
    message: "My message",
    path: "my_path",
    details: {
      "k1": "v1",
      "k2": "v2"
    }
  });
  var flashToRemove;
  for each(f in basketResponse.flashes) {
    if (f.type == "SomeOtherType") {
      flashToRemove = f;
    }
  }
  if (flashToRemove != null) {
    basketResponse.removeFlash(flashToRemove);
  }
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketResponse - the basket response to be validated, before any OCAPI property selection is applied</dd>
    <dd>duringSubmit - should the basket be checked for submit</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.validateBasket**

`PATCH /baskets/{basket_id}/payment_instruments/{payment_instrument_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>validateBasket</b> (basketResponse : <i>Basket</i>, duringSubmit : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows the addition of custom flashes or removal of internal flashes. The presence of a flash indicates that the basket cannot yet be submitted. Parameter <code>duringSubmit</code> indicates the current call is during the basket submit process. Default implementation returns ERROR if duringSubmit and any flash exists.
</p>
<p>
  Example showing addition, listing, and removal of flashes: 
</p>
<div>

```javascript
exports.validateBasket = function(basketResponse, duringSubmit) {
  basketResponse.addFlash({
    type: "MyType",
    message: "My message",
    path: "my_path",
    details: {
      "k1": "v1",
      "k2": "v2"
    }
  });
  var flashToRemove;
  for each(f in basketResponse.flashes) {
    if (f.type == "SomeOtherType") {
      flashToRemove = f;
    }
  }
  if (flashToRemove != null) {
    basketResponse.removeFlash(flashToRemove);
  }
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketResponse - the basket response to be validated, before any OCAPI property selection is applied</dd>
    <dd>duringSubmit - should the basket be checked for submit</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.validateBasket**

`PATCH /baskets/{basket_id}/shipments/{shipment_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>validateBasket</b> (basketResponse : <i>Basket</i>, duringSubmit : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows the addition of custom flashes or removal of internal flashes. The presence of a flash indicates that the basket cannot yet be submitted. Parameter <code>duringSubmit</code> indicates the current call is during the basket submit process. Default implementation returns ERROR if duringSubmit and any flash exists.
</p>
<p>
  Example showing addition, listing, and removal of flashes: 
</p>
<div>

```javascript
exports.validateBasket = function(basketResponse, duringSubmit) {
  basketResponse.addFlash({
    type: "MyType",
    message: "My message",
    path: "my_path",
    details: {
      "k1": "v1",
      "k2": "v2"
    }
  });
  var flashToRemove;
  for each(f in basketResponse.flashes) {
    if (f.type == "SomeOtherType") {
      flashToRemove = f;
    }
  }
  if (flashToRemove != null) {
    basketResponse.removeFlash(flashToRemove);
  }
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketResponse - the basket response to be validated, before any OCAPI property selection is applied</dd>
    <dd>duringSubmit - should the basket be checked for submit</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.validateBasket**

`POST /baskets`

<details>  
<summary>Method details</summary>

<p>
  <b>validateBasket</b> (basketResponse : <i>Basket</i>, duringSubmit : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows the addition of custom flashes or removal of internal flashes. The presence of a flash indicates that the basket cannot yet be submitted. Parameter <code>duringSubmit</code> indicates the current call is during the basket submit process. Default implementation returns ERROR if duringSubmit and any flash exists.
</p>
<p>
  Example showing addition, listing, and removal of flashes: 
</p>
<div>

```javascript
exports.validateBasket = function(basketResponse, duringSubmit) {
  basketResponse.addFlash({
    type: "MyType",
    message: "My message",
    path: "my_path",
    details: {
      "k1": "v1",
      "k2": "v2"
    }
  });
  var flashToRemove;
  for each(f in basketResponse.flashes) {
    if (f.type == "SomeOtherType") {
      flashToRemove = f;
    }
  }
  if (flashToRemove != null) {
    basketResponse.removeFlash(flashToRemove);
  }
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketResponse - the basket response to be validated, before any OCAPI property selection is applied</dd>
    <dd>duringSubmit - should the basket be checked for submit</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.validateBasket**

`POST /baskets/{basket_id}/coupons`

<details>  
<summary>Method details</summary>

<p>
  <b>validateBasket</b> (basketResponse : <i>Basket</i>, duringSubmit : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows the addition of custom flashes or removal of internal flashes. The presence of a flash indicates that the basket cannot yet be submitted. Parameter <code>duringSubmit</code> indicates the current call is during the basket submit process. Default implementation returns ERROR if duringSubmit and any flash exists.
</p>
<p>
  Example showing addition, listing, and removal of flashes: 
</p>
<div>

```javascript
exports.validateBasket = function(basketResponse, duringSubmit) {
  basketResponse.addFlash({
    type: "MyType",
    message: "My message",
    path: "my_path",
    details: {
      "k1": "v1",
      "k2": "v2"
    }
  });
  var flashToRemove;
  for each(f in basketResponse.flashes) {
    if (f.type == "SomeOtherType") {
      flashToRemove = f;
    }
  }
  if (flashToRemove != null) {
    basketResponse.removeFlash(flashToRemove);
  }
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketResponse - the basket response to be validated, before any OCAPI property selection is applied</dd>
    <dd>duringSubmit - should the basket be checked for submit</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.validateBasket**

`POST /baskets/{basket_id}/gift_certificate_items`

<details>  
<summary>Method details</summary>

<p>
  <b>validateBasket</b> (basketResponse : <i>Basket</i>, duringSubmit : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows the addition of custom flashes or removal of internal flashes. The presence of a flash indicates that the basket cannot yet be submitted. Parameter <code>duringSubmit</code> indicates the current call is during the basket submit process. Default implementation returns ERROR if duringSubmit and any flash exists.
</p>
<p>
  Example showing addition, listing, and removal of flashes: 
</p>
<div>

```javascript
exports.validateBasket = function(basketResponse, duringSubmit) {
  basketResponse.addFlash({
    type: "MyType",
    message: "My message",
    path: "my_path",
    details: {
      "k1": "v1",
      "k2": "v2"
    }
  });
  var flashToRemove;
  for each(f in basketResponse.flashes) {
    if (f.type == "SomeOtherType") {
      flashToRemove = f;
    }
  }
  if (flashToRemove != null) {
    basketResponse.removeFlash(flashToRemove);
  }
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketResponse - the basket response to be validated, before any OCAPI property selection is applied</dd>
    <dd>duringSubmit - should the basket be checked for submit</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.validateBasket**

`PATCH /baskets/{basket_id}/items`

<details>  
<summary>Method details</summary>

<p>
  <b>validateBasket</b> (basketResponse : <i>Basket</i>, duringSubmit : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows the addition of custom flashes or removal of internal flashes. The presence of a flash indicates that the basket cannot yet be submitted. Parameter <code>duringSubmit</code> indicates the current call is during the basket submit process. Default implementation returns ERROR if duringSubmit and any flash exists.
</p>
<p>
  Example showing addition, listing, and removal of flashes: 
</p>
<div>

```javascript
exports.validateBasket = function(basketResponse, duringSubmit) {
  basketResponse.addFlash({
    type: "MyType",
    message: "My message",
    path: "my_path",
    details: {
      "k1": "v1",
      "k2": "v2"
    }
  });
  var flashToRemove;
  for each(f in basketResponse.flashes) {
    if (f.type == "SomeOtherType") {
      flashToRemove = f;
    }
  }
  if (flashToRemove != null) {
    basketResponse.removeFlash(flashToRemove);
  }
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketResponse - the basket response to be validated, before any OCAPI property selection is applied</dd>
    <dd>duringSubmit - should the basket be checked for submit</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.validateBasket**

`POST /baskets/{basket_id}/items`

<details>  
<summary>Method details</summary>

<p>
  <b>validateBasket</b> (basketResponse : <i>Basket</i>, duringSubmit : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows the addition of custom flashes or removal of internal flashes. The presence of a flash indicates that the basket cannot yet be submitted. Parameter <code>duringSubmit</code> indicates the current call is during the basket submit process. Default implementation returns ERROR if duringSubmit and any flash exists.
</p>
<p>
  Example showing addition, listing, and removal of flashes: 
</p>
<div>

```javascript
exports.validateBasket = function(basketResponse, duringSubmit) {
  basketResponse.addFlash({
    type: "MyType",
    message: "My message",
    path: "my_path",
    details: {
      "k1": "v1",
      "k2": "v2"
    }
  });
  var flashToRemove;
  for each(f in basketResponse.flashes) {
    if (f.type == "SomeOtherType") {
      flashToRemove = f;
    }
  }
  if (flashToRemove != null) {
    basketResponse.removeFlash(flashToRemove);
  }
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketResponse - the basket response to be validated, before any OCAPI property selection is applied</dd>
    <dd>duringSubmit - should the basket be checked for submit</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.validateBasket**

`POST /baskets/{basket_id}/notes`

<details>  
<summary>Method details</summary>

<p>
  <b>validateBasket</b> (basketResponse : <i>Basket</i>, duringSubmit : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows the addition of custom flashes or removal of internal flashes. The presence of a flash indicates that the basket cannot yet be submitted. Parameter <code>duringSubmit</code> indicates the current call is during the basket submit process. Default implementation returns ERROR if duringSubmit and any flash exists.
</p>
<p>
  Example showing addition, listing, and removal of flashes: 
</p>
<div>

```javascript
exports.validateBasket = function(basketResponse, duringSubmit) {
  basketResponse.addFlash({
    type: "MyType",
    message: "My message",
    path: "my_path",
    details: {
      "k1": "v1",
      "k2": "v2"
    }
  });
  var flashToRemove;
  for each(f in basketResponse.flashes) {
    if (f.type == "SomeOtherType") {
      flashToRemove = f;
    }
  }
  if (flashToRemove != null) {
    basketResponse.removeFlash(flashToRemove);
  }
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketResponse - the basket response to be validated, before any OCAPI property selection is applied</dd>
    <dd>duringSubmit - should the basket be checked for submit</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.validateBasket**

`POST /baskets/{basket_id}/payment_instruments`

<details>  
<summary>Method details</summary>

<p>
  <b>validateBasket</b> (basketResponse : <i>Basket</i>, duringSubmit : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows the addition of custom flashes or removal of internal flashes. The presence of a flash indicates that the basket cannot yet be submitted. Parameter <code>duringSubmit</code> indicates the current call is during the basket submit process. Default implementation returns ERROR if duringSubmit and any flash exists.
</p>
<p>
  Example showing addition, listing, and removal of flashes: 
</p>
<div>

```javascript
exports.validateBasket = function(basketResponse, duringSubmit) {
  basketResponse.addFlash({
    type: "MyType",
    message: "My message",
    path: "my_path",
    details: {
      "k1": "v1",
      "k2": "v2"
    }
  });
  var flashToRemove;
  for each(f in basketResponse.flashes) {
    if (f.type == "SomeOtherType") {
      flashToRemove = f;
    }
  }
  if (flashToRemove != null) {
    basketResponse.removeFlash(flashToRemove);
  }
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketResponse - the basket response to be validated, before any OCAPI property selection is applied</dd>
    <dd>duringSubmit - should the basket be checked for submit</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.validateBasket**

`POST /baskets/{basket_id}/price_adjustments`

<details>  
<summary>Method details</summary>

<p>
  <b>validateBasket</b> (basketResponse : <i>Basket</i>, duringSubmit : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows the addition of custom flashes or removal of internal flashes. The presence of a flash indicates that the basket cannot yet be submitted. Parameter <code>duringSubmit</code> indicates the current call is during the basket submit process. Default implementation returns ERROR if duringSubmit and any flash exists.
</p>
<p>
  Example showing addition, listing, and removal of flashes: 
</p>
<div>

```javascript
exports.validateBasket = function(basketResponse, duringSubmit) {
  basketResponse.addFlash({
    type: "MyType",
    message: "My message",
    path: "my_path",
    details: {
      "k1": "v1",
      "k2": "v2"
    }
  });
  var flashToRemove;
  for each(f in basketResponse.flashes) {
    if (f.type == "SomeOtherType") {
      flashToRemove = f;
    }
  }
  if (flashToRemove != null) {
    basketResponse.removeFlash(flashToRemove);
  }
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketResponse - the basket response to be validated, before any OCAPI property selection is applied</dd>
    <dd>duringSubmit - should the basket be checked for submit</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.validateBasket**

`POST /baskets/{basket_id}/shipments`

<details>  
<summary>Method details</summary>

<p>
  <b>validateBasket</b> (basketResponse : <i>Basket</i>, duringSubmit : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows the addition of custom flashes or removal of internal flashes. The presence of a flash indicates that the basket cannot yet be submitted. Parameter <code>duringSubmit</code> indicates the current call is during the basket submit process. Default implementation returns ERROR if duringSubmit and any flash exists.
</p>
<p>
  Example showing addition, listing, and removal of flashes: 
</p>
<div>

```javascript
exports.validateBasket = function(basketResponse, duringSubmit) {
  basketResponse.addFlash({
    type: "MyType",
    message: "My message",
    path: "my_path",
    details: {
      "k1": "v1",
      "k2": "v2"
    }
  });
  var flashToRemove;
  for each(f in basketResponse.flashes) {
    if (f.type == "SomeOtherType") {
      flashToRemove = f;
    }
  }
  if (flashToRemove != null) {
    basketResponse.removeFlash(flashToRemove);
  }
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketResponse - the basket response to be validated, before any OCAPI property selection is applied</dd>
    <dd>duringSubmit - should the basket be checked for submit</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.validateBasket**

`POST /orders`

<details>  
<summary>Method details</summary>

<p>
  <b>validateBasket</b> (basketResponse : <i>Basket</i>, duringSubmit : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows the addition of custom flashes or removal of internal flashes. The presence of a flash indicates that the basket cannot yet be submitted. Parameter <code>duringSubmit</code> indicates the current call is during the basket submit process. Default implementation returns ERROR if duringSubmit and any flash exists.
</p>
<p>
  Example showing addition, listing, and removal of flashes: 
</p>
<div>

```javascript
exports.validateBasket = function(basketResponse, duringSubmit) {
  basketResponse.addFlash({
    type: "MyType",
    message: "My message",
    path: "my_path",
    details: {
      "k1": "v1",
      "k2": "v2"
    }
  });
  var flashToRemove;
  for each(f in basketResponse.flashes) {
    if (f.type == "SomeOtherType") {
      flashToRemove = f;
    }
  }
  if (flashToRemove != null) {
    basketResponse.removeFlash(flashToRemove);
  }
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketResponse - the basket response to be validated, before any OCAPI property selection is applied</dd>
    <dd>duringSubmit - should the basket be checked for submit</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.validateBasket**

`PUT /baskets/{basket_id}/billing_address`

<details>  
<summary>Method details</summary>

<p>
  <b>validateBasket</b> (basketResponse : <i>Basket</i>, duringSubmit : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows the addition of custom flashes or removal of internal flashes. The presence of a flash indicates that the basket cannot yet be submitted. Parameter <code>duringSubmit</code> indicates the current call is during the basket submit process. Default implementation returns ERROR if duringSubmit and any flash exists.
</p>
<p>
  Example showing addition, listing, and removal of flashes: 
</p>
<div>

```javascript
exports.validateBasket = function(basketResponse, duringSubmit) {
  basketResponse.addFlash({
    type: "MyType",
    message: "My message",
    path: "my_path",
    details: {
      "k1": "v1",
      "k2": "v2"
    }
  });
  var flashToRemove;
  for each(f in basketResponse.flashes) {
    if (f.type == "SomeOtherType") {
      flashToRemove = f;
    }
  }
  if (flashToRemove != null) {
    basketResponse.removeFlash(flashToRemove);
  }
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketResponse - the basket response to be validated, before any OCAPI property selection is applied</dd>
    <dd>duringSubmit - should the basket be checked for submit</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.validateBasket**

`PUT /baskets/{basket_id}/customer`

<details>  
<summary>Method details</summary>

<p>
  <b>validateBasket</b> (basketResponse : <i>Basket</i>, duringSubmit : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows the addition of custom flashes or removal of internal flashes. The presence of a flash indicates that the basket cannot yet be submitted. Parameter <code>duringSubmit</code> indicates the current call is during the basket submit process. Default implementation returns ERROR if duringSubmit and any flash exists.
</p>
<p>
  Example showing addition, listing, and removal of flashes: 
</p>
<div>

```javascript
exports.validateBasket = function(basketResponse, duringSubmit) {
  basketResponse.addFlash({
    type: "MyType",
    message: "My message",
    path: "my_path",
    details: {
      "k1": "v1",
      "k2": "v2"
    }
  });
  var flashToRemove;
  for each(f in basketResponse.flashes) {
    if (f.type == "SomeOtherType") {
      flashToRemove = f;
    }
  }
  if (flashToRemove != null) {
    basketResponse.removeFlash(flashToRemove);
  }
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketResponse - the basket response to be validated, before any OCAPI property selection is applied</dd>
    <dd>duringSubmit - should the basket be checked for submit</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.validateBasket**

`PUT /baskets/{basket_id}/shipments/{shipment_id}/shipping_address`

<details>  
<summary>Method details</summary>

<p>
  <b>validateBasket</b> (basketResponse : <i>Basket</i>, duringSubmit : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows the addition of custom flashes or removal of internal flashes. The presence of a flash indicates that the basket cannot yet be submitted. Parameter <code>duringSubmit</code> indicates the current call is during the basket submit process. Default implementation returns ERROR if duringSubmit and any flash exists.
</p>
<p>
  Example showing addition, listing, and removal of flashes: 
</p>
<div>

```javascript
exports.validateBasket = function(basketResponse, duringSubmit) {
  basketResponse.addFlash({
    type: "MyType",
    message: "My message",
    path: "my_path",
    details: {
      "k1": "v1",
      "k2": "v2"
    }
  });
  var flashToRemove;
  for each(f in basketResponse.flashes) {
    if (f.type == "SomeOtherType") {
      flashToRemove = f;
    }
  }
  if (flashToRemove != null) {
    basketResponse.removeFlash(flashToRemove);
  }
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketResponse - the basket response to be validated, before any OCAPI property selection is applied</dd>
    <dd>duringSubmit - should the basket be checked for submit</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.basket.validateBasket**

`PUT /baskets/{basket_id}/shipments/{shipment_id}/shipping_method`

<details>  
<summary>Method details</summary>

<p>
  <b>validateBasket</b> (basketResponse : <i>Basket</i>, duringSubmit : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows the addition of custom flashes or removal of internal flashes. The presence of a flash indicates that the basket cannot yet be submitted. Parameter <code>duringSubmit</code> indicates the current call is during the basket submit process. Default implementation returns ERROR if duringSubmit and any flash exists.
</p>
<p>
  Example showing addition, listing, and removal of flashes: 
</p>
<div>

```javascript
exports.validateBasket = function(basketResponse, duringSubmit) {
  basketResponse.addFlash({
    type: "MyType",
    message: "My message",
    path: "my_path",
    details: {
      "k1": "v1",
      "k2": "v2"
    }
  });
  var flashToRemove;
  for each(f in basketResponse.flashes) {
    if (f.type == "SomeOtherType") {
      flashToRemove = f;
    }
  }
  if (flashToRemove != null) {
    basketResponse.removeFlash(flashToRemove);
  }
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basketResponse - the basket response to be validated, before any OCAPI property selection is applied</dd>
    <dd>duringSubmit - should the basket be checked for submit</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Category

Category hooks for Shop API.

***

**dw\.ocapi.shop.category.beforeGET**

`GET /categories/({id},...,{id})`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (categoryId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>categoryId - the id of the category</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.category.beforeGET**

`GET /categories/{id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (categoryId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>categoryId - the id of the category</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.category.modifyGETResponse**

`GET /categories/({id},...,{id})`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (scriptCategory : <i>dw.catalog.Category</i>, doc : <i>Category</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>scriptCategory - an instance of dw.catalog.Category</dd>
    <dd>doc - the document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.category.modifyGETResponse**

`GET /categories/{id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (scriptCategory : <i>dw.catalog.Category</i>, doc : <i>Category</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>scriptCategory - an instance of dw.catalog.Category</dd>
    <dd>doc - the document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Content

Content hooks for Shop API.

***

**dw\.ocapi.shop.content.beforeGET**

`GET /content/({id},...,{id})`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (contentId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>contentId - the id of the content assert</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.content.beforeGET**

`GET /content/{id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (contentId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>contentId - the id of the content assert</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.content.modifyGETResponse**

`GET /content/({id},...,{id})`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (scriptContent : <i>dw.content.Content</i>, doc : <i>Content</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>scriptContent - an instance of dw.content.Content</dd>
    <dd>doc - the document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.content.modifyGETResponse**

`GET /content/{id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (scriptContent : <i>dw.content.Content</i>, doc : <i>Content</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>scriptContent - an instance of dw.content.Content</dd>
    <dd>doc - the document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Content Search

Content search hooks for Shop API.

***

**dw\.ocapi.shop.content_search.beforeGET**

`GET /content_search`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> () : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.content_search.modifyGETResponse**

`GET /content_search`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (doc : <i>ContentSearchResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>doc - the document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Custom Object

Custom object hooks for Shop API.

***

**dw\.ocapi.shop.custom_object.beforeGET**

`GET /custom_objects/{object_type}/{key}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (objectType : <i>String</i>, key : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>objectType - the ID of the object type</dd>
    <dd>key - the key attribute value of the custom object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.custom_object.modifyGETResponse**

`GET /custom_objects/{object_type}/{key}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (scriptCustomObject : <i>dw.object.CustomObject</i>, doc : <i>CustomObject</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>scriptCustomObject - an instance of dw.object.CustomObject</dd>
    <dd>doc - the document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Customer

Customer hooks for Shop API.

***

**dw\.ocapi.shop.customer.afterPATCH**

`PATCH /customers/{customer_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPATCH</b> (customer : <i>dw.customer.Customer</i>, customerInput : <i>Customer</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after a customer was updated. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer to be updated</dd>
    <dd>customerInput - the input customer containing the patch changes</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.afterPOST**

`POST /customers`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPOST</b> (customer : <i>dw.customer.Customer</i>, registration : <i>CustomerRegistration</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after a new customer registration. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the registered customer</dd>
    <dd>registration - the customer registration information</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.auth.afterPOST**

`POST /customers/{customer_id}/auth`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPOST</b> (customer : <i>dw.customer.Customer</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the customer has been authenticated. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer that is authenticated</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.auth.beforePOST**

`POST /customers/{customer_id}/auth`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePOST</b> (customer : <i>dw.customer.Customer</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the customer has been authenticated. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer that is authenticated</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.auth.modifyPOSTResponse**

`POST /customers/{customer_id}/auth`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPOSTResponse</b> (customer : <i>dw.customer.Customer</i>, customerResponse : <i>Customer</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - target customer</dd>
    <dd>customerResponse - customer response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.baskets.beforeGET**

`GET /customers/{customer_id}/baskets`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (customerId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customerId - the customer id the baskets result retrieved for.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.baskets.modifyGETResponse_v2**

`GET /customers/{customer_id}/baskets`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse_v2</b> (customer : <i>dw.customer.Customer</i>, customerBasketsResultResponse : <i>BasketsResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer the baskets result retrieved for.</dd>
    <dd>customerBasketsResultResponse - customer basket result response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.beforeGET**

`GET /customers/{customer_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (customerId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customerId - The customer id</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.beforePATCH**

`PATCH /customers/{customer_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePATCH</b> (customer : <i>dw.customer.Customer</i>, customerInput : <i>Customer</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before a customer is updated. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer to be updated</dd>
    <dd>customerInput - the input customer containing the patch changes</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.beforePOST**

`POST /customers`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePOST</b> (registration : <i>CustomerRegistration</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before a new customer registration. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>registration - the customer registration information</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.modifyGETResponse**

`GET /customers/{customer_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (customer : <i>dw.customer.Customer</i>, customerResponse : <i>Customer</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - target customer</dd>
    <dd>customerResponse - customer response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.modifyPATCHResponse**

`PATCH /customers/{customer_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPATCHResponse</b> (customer : <i>dw.customer.Customer</i>, customerResponse : <i>Customer</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - target customer</dd>
    <dd>customerResponse - customer response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.modifyPOSTResponse**

`POST /customers`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPOSTResponse</b> (customer : <i>dw.customer.Customer</i>, customerResponse : <i>Customer</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - created customer</dd>
    <dd>customerResponse - customer response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.orders.beforeGET**

`GET /customers/{customer_id}/orders`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (customerId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customerId - the customer id the orders are retrieved for.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.orders.modifyGETResponse_v2**

`GET /customers/{customer_id}/orders`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse_v2</b> (customer : <i>dw.customer.Customer</i>, customerOrderResultResponse : <i>CustomerOrderResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer the orders are retrieved for.</dd>
    <dd>customerOrderResultResponse - customer order result response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.password_reset.afterPOST**

`POST /customers/{customer_id}/password_reset`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPOST</b> (customer : <i>dw.customer.Customer</i>, resetToken : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows resetting a customer password. See the example below sending an email with a password reset link.
</p>

<div>

```javascript
var variables: Map = new dw.util.HashMap();
variables.put("Customer", customer);
variables.put("ResetPasswordToken", token);
var template: Template = new dw.util.Template("mail/resetpasswordemail.isml");
var content: MimeEncodedText = template.render(variables);
var mail: Mail = new Mail()
  .setSubject("Password Reset")
  .setContent(content)
  .setFrom("noreply@salesforce.com")
  .addTo(customer.profile.email);
mail.send();
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer for whom to reset the password</dd>
    <dd>resetToken - the token generated by the system to be used for the reset</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.password_reset.beforePOST**

`POST /customers/{customer_id}/password_reset`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePOST</b> (customer : <i>dw.customer.Customer</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer for whom to reset the password</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.payment_instrument.afterDELETE**

`DELETE /customers/{customer_id}/payment_instruments/{payment_instrument_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterDELETE</b> (customer : <i>dw.customer.Customer</i>, paymentInstrumentId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after removing a payment instrument of a customer. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer for whom to delete the payment instrument</dd>
    <dd>paymentInstrumentId - the id of the payment instrument that was deleted</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.payment_instrument.afterPOST**

`POST /customers/{customer_id}/payment_instruments`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPOST</b> (customer : <i>dw.customer.Customer</i>, paymentInstrument : <i>CustomerPaymentInstrumentRequest</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after a payment instrument was added to a customer. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer for whom to add the payment instrument</dd>
    <dd>paymentInstrument - the payment instrument that was added</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.payment_instrument.beforeDELETE**

`DELETE /customers/{customer_id}/payment_instruments/{payment_instrument_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeDELETE</b> (customer : <i>dw.customer.Customer</i>, paymentInstrumentId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before removing a payment instrument of a customer. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer for whom to delete the payment instrument</dd>
    <dd>paymentInstrumentId - the id of the payment instrument to be deleted</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.payment_instrument.beforeGET**

`GET /customers/{customer_id}/payment_instruments/{payment_instrument_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (customerId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customerId - target customer id</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.payment_instrument.beforePOST**

`POST /customers/{customer_id}/payment_instruments`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePOST</b> (customer : <i>dw.customer.Customer</i>, paymentInstrument : <i>CustomerPaymentInstrumentRequest</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before a payment instrument is added to a customer. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer for whom to add the payment instrument</dd>
    <dd>paymentInstrument - the payment instrument to be added</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.payment_instrument.modifyGETResponse**

`GET /customers/{customer_id}/payment_instruments/{payment_instrument_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (customer : <i>dw.customer.Customer</i>, customerPaymentInstrument : <i>dw.customer.CustomerPaymentInstrument</i>, customerPaymentInstrumentResponse : <i>CustomerPaymentInstrument</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - target customer</dd>
    <dd>customerPaymentInstrument - payment instrument</dd>
    <dd>customerPaymentInstrumentResponse - customer payment instrument response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.payment_instrument.modifyPOSTResponse**

`POST /customers/{customer_id}/payment_instruments`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPOSTResponse</b> (customer : <i>dw.customer.Customer</i>, customerPaymentInstrument : <i>dw.customer.CustomerPaymentInstrument</i>, customerPaymentInstrumentResponse : <i>CustomerPaymentInstrument</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>Customer - target customer</dd>
    <dd>customerPaymentInstrument - payment instrument</dd>
    <dd>customerPaymentInstrumentResponse - customer payment instrument response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.payment_instruments.beforeGET**

`GET /customers/{customer_id}/payment_instruments`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (customerId : <i>String</i>, paymentMethodId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customerId - the customer id the customer payment instruments result retrieved for.</dd>
    <dd>paymentMethodId - the id of the payment method, if null - all payment instruments are retrieved</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.payment_instruments.modifyGETResponse_v2**

`GET /customers/{customer_id}/payment_instruments`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse_v2</b> (customer : <i>dw.customer.Customer</i>, customerPaymentInstrumentResultResponse : <i>CustomerPaymentInstrumentResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer the customer payment instruments result retrieved for.</dd>
    <dd>customerPaymentInstrumentResultResponse - customer payment instrument result response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.afterDELETE**

`DELETE /customers/{customer_id}/product_lists/{list_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterDELETE</b> (customer : <i>dw.customer.Customer</i>, productListId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after a customer product list is deleted. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer</dd>
    <dd>productListId - the product list id</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.afterPATCH**

`PATCH /customers/{customer_id}/product_lists/{list_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPATCH</b> (customer : <i>dw.customer.Customer</i>, productList : <i>CustomerProductList</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after modifying a customer product list. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer</dd>
    <dd>productList - the product list</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.beforeDELETE**

`DELETE /customers/{customer_id}/product_lists/{list_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeDELETE</b> (customer : <i>dw.customer.Customer</i>, productList : <i>dw.customer.ProductList</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before a customer product list is deleted. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer</dd>
    <dd>productList - the product list</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.beforeGET**

`GET /customers/{customer_id}/product_lists/{list_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (customerId : <i>String</i>, productListId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customerId - The customer id.</dd>
    <dd>productListId - The product list id.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.beforePATCH**

`PATCH /customers/{customer_id}/product_lists/{list_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePATCH</b> (customer : <i>dw.customer.Customer</i>, productList : <i>CustomerProductList</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before modifying a customer product list. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer</dd>
    <dd>productList - the product list</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.item.afterDELETE**

`DELETE /customers/{customer_id}/product_lists/{list_id}/items/{item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterDELETE</b> (customer : <i>dw.customer.Customer</i>, productList : <i>dw.customer.ProductList</i>, itemId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after deleting an item from a customer product list. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer</dd>
    <dd>productList - the product list</dd>
    <dd>itemId - the id of the deleted item</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.item.afterPATCH**

`PATCH /customers/{customer_id}/product_lists/{list_id}/items/{item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPATCH</b> (customer : <i>dw.customer.Customer</i>, productList : <i>dw.customer.ProductList</i>, item : <i>CustomerProductListItem</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after updating an item of a customer product list. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer</dd>
    <dd>productList - the product list</dd>
    <dd>item - the updated item</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.item.beforeDELETE**

`DELETE /customers/{customer_id}/product_lists/{list_id}/items/{item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeDELETE</b> (customer : <i>dw.customer.Customer</i>, productList : <i>dw.customer.ProductList</i>, item : <i>dw.customer.ProductListItem</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before deleting an item from a customer product list. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer</dd>
    <dd>productList - the product list</dd>
    <dd>item - the product list item to delete</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.item.beforeGET**

`GET /customers/{customer_id}/product_lists/{list_id}/items/{item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (customerId : <i>String</i>, productListId : <i>String</i>, productListItemId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customerId - target customer id</dd>
    <dd>productListId - the customers product list id the product list item purchase result retrieved for.</dd>
    <dd>productListItemId - the product list id item the product list item purchase result retrieved for.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.item.beforePATCH**

`PATCH /customers/{customer_id}/product_lists/{list_id}/items/{item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePATCH</b> (customer : <i>dw.customer.Customer</i>, productList : <i>dw.customer.ProductList</i>, item : <i>CustomerProductListItem</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before updating an item of a customer product list. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer</dd>
    <dd>productList - the product list</dd>
    <dd>item - the product list item to update</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.item.modifyGETResponse**

`GET /customers/{customer_id}/product_lists/{list_id}/items/{item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (customer : <i>dw.customer.Customer</i>, productListItem : <i>dw.customer.ProductListItem</i>, customerProductListItemResponse : <i>CustomerProductListItem</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - target customer</dd>
    <dd>productListItem - target product list item</dd>
    <dd>customerProductListItemResponse - customer product list item response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.item.modifyPATCHResponse**

`PATCH /customers/{customer_id}/product_lists/{list_id}/items/{item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPATCHResponse</b> (customer : <i>dw.customer.Customer</i>, productList : <i>dw.customer.ProductList</i>, customerProductListItemResponse : <i>CustomerProductListItem</i>, customerProductListItemRequest : <i>CustomerProductListItem</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - target customer</dd>
    <dd>productList - target product list</dd>
    <dd>customerProductListItemRequest - customer product list item request object</dd>
    <dd>customerProductListItemResponse - customer product list item response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.item.modifyPOSTResponse**

`POST /customers/{customer_id}/product_lists/{list_id}/items`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPOSTResponse</b> (customer : <i>dw.customer.Customer</i>, productList : <i>dw.customer.ProductList</i>, customerProductListItemResponse : <i>CustomerProductListItem</i>, customerProductListItemRequest : <i>CustomerProductListItem</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - target customer</dd>
    <dd>productList - target product list</dd>
    <dd>customerProductListItemResponse - customer product list item response object</dd>
    <dd>customerProductListItemRequest - customer product list item request object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.item.purchase.afterPATCH**

`PATCH /customers/{customer_id}/product_lists/{list_id}/items/{item_id}/purchases/{purchase_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPATCH</b> (customer : <i>dw.customer.Customer</i>, productList : <i>dw.customer.ProductList</i>, productListItem : <i>dw.customer.ProductListItem</i>, purchase : <i>CustomerProductListItemPurchase</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after updating a purchase of a customer product list item. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer</dd>
    <dd>productList - the product list</dd>
    <dd>productListItem - the product list item</dd>
    <dd>purchase - the updated purchase</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.item.purchase.beforeGET**

`GET /customers/{customer_id}/product_lists/{list_id}/items/{item_id}/purchases/{purchase_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (customerId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customerId - target customer id</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.item.purchase.beforePATCH**

`PATCH /customers/{customer_id}/product_lists/{list_id}/items/{item_id}/purchases/{purchase_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePATCH</b> (customer : <i>dw.customer.Customer</i>, productList : <i>dw.customer.ProductList</i>, productListItem : <i>dw.customer.ProductListItem</i>, purchase : <i>CustomerProductListItemPurchase</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before updating a purchase of a customer product list item. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer</dd>
    <dd>productList - the product list</dd>
    <dd>productListItem - the product list item</dd>
    <dd>purchase - the product list item purchase to update</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.item.purchase.modifyGETResponse**

`GET /customers/{customer_id}/product_lists/{list_id}/items/{item_id}/purchases/{purchase_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (customer : <i>dw.customer.Customer</i>, productListItemPurchase : <i>dw.customer.ProductListItemPurchase</i>, customerProductListItemPurchaseResponse : <i>CustomerProductListItemPurchase</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - target customer</dd>
    <dd>productListItemPurchase - target product list item purchase</dd>
    <dd>customerProductListItemPurchaseResponse - customer product list item purchase response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.item.purchase.modifyPATCHResponse**

`PATCH /customers/{customer_id}/product_lists/{list_id}/items/{item_id}/purchases/{purchase_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPATCHResponse</b> (customer : <i>dw.customer.Customer</i>, productList : <i>dw.customer.ProductList</i>, productListItem : <i>dw.customer.ProductListItem</i>, customerProductListItemPurchaseResponse : <i>CustomerProductListItemPurchase</i>, customerProductListItemPurchaseRequest : <i>CustomerProductListItemPurchase</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - target customer</dd>
    <dd>productList - target product list</dd>
    <dd>productListItem - target product list item</dd>
    <dd>customerProductListItemPurchaseRequest - customer product list item purchase request object</dd>
    <dd>customerProductListItemPurchaseResponse - customer product list item purchase response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.item.purchases.afterPOST**

`POST /customers/{customer_id}/product_lists/{list_id}/items/{item_id}/purchases`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPOST</b> (customer : <i>dw.customer.Customer</i>, productList : <i>dw.customer.ProductList</i>, productListItem : <i>dw.customer.ProductListItem</i>, purchase : <i>CustomerProductListItemPurchase</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after adding a purchase to a customer product list item. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer</dd>
    <dd>productList - the product list</dd>
    <dd>productListItem - the product list item</dd>
    <dd>purchase - the item added to the customer product list</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.item.purchases.beforeGET**

`GET /customers/{customer_id}/product_lists/{list_id}/items/{item_id}/purchases`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (customerId : <i>String</i>, listId : <i>String</i>, itemId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customerId - the customer id the product list item purchase result retrieved for.</dd>
    <dd>listId - the customers product list id the product list item purchase result retrieved for.</dd>
    <dd>itemId - the product list id item the product list item purchase result retrieved for.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.item.purchases.beforePOST**

`POST /customers/{customer_id}/product_lists/{list_id}/items/{item_id}/purchases`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePOST</b> (customer : <i>dw.customer.Customer</i>, productList : <i>dw.customer.ProductList</i>, productListItem : <i>dw.customer.ProductListItem</i>, purchase : <i>CustomerProductListItemPurchase</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before adding a purchase to a customer product list item. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer</dd>
    <dd>productList - the product list</dd>
    <dd>productListItem - the product list item</dd>
    <dd>purchase - the purchase to add to the customer product list item</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.item.purchases.modifyGETResponse_v2**

`GET /customers/{customer_id}/product_lists/{list_id}/items/{item_id}/purchases`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse_v2</b> (customer : <i>dw.customer.Customer</i>, productList : <i>dw.customer.ProductList</i>, productListItem : <i>dw.customer.ProductListItem</i>, customerProductListItemPurchaseResultResponse : <i>CustomerProductListItemPurchaseResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer the product list item purchase result retrieved for.</dd>
    <dd>productList - the customers product list the product list item purchase result retrieved for.</dd>
    <dd>productListItem - the product list item the product list item purchase result retrieved for.</dd>
    <dd>customerProductListItemPurchaseResultResponse - customer product list item purchase result response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.item.purchases.modifyPOSTResponse**

`POST /customers/{customer_id}/product_lists/{list_id}/items/{item_id}/purchases`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPOSTResponse</b> (customer : <i>dw.customer.Customer</i>, productList : <i>dw.customer.ProductList</i>, productListItem : <i>dw.customer.ProductListItem</i>, customerProductListItemPurchaseResponse : <i>CustomerProductListItemPurchase</i>, customerProductListItemPurchaseRequest : <i>CustomerProductListItemPurchase</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - target customer</dd>
    <dd>productList - target product list</dd>
    <dd>productListItem - target product list item</dd>
    <dd>customerProductListItemPurchaseResponse - customer product list item purchase response object</dd>
    <dd>customerProductListItemPurchaseRequest - customer product list item purchase request object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.items.afterPOST**

`POST /customers/{customer_id}/product_lists/{list_id}/items`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPOST</b> (customer : <i>dw.customer.Customer</i>, productList : <i>dw.customer.ProductList</i>, item : <i>CustomerProductListItem</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after adding an item to a customer product list. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer</dd>
    <dd>productList - the product list</dd>
    <dd>item - the item added to the customer product list</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.items.beforeGET**

`GET /customers/{customer_id}/product_lists/{list_id}/items`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (customerId : <i>String</i>, productListId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customerId - the customer id the customer product list items result retrieved for.</dd>
    <dd>productListId - the product list id the customer product list items result retrieved for.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.items.beforePOST**

`POST /customers/{customer_id}/product_lists/{list_id}/items`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePOST</b> (customer : <i>dw.customer.Customer</i>, productList : <i>dw.customer.ProductList</i>, item : <i>CustomerProductListItem</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before adding an item to a customer product list. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer</dd>
    <dd>productList - the product list</dd>
    <dd>item - the item to add to the customer product list</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.items.modifyGETResponse_v2**

`GET /customers/{customer_id}/product_lists/{list_id}/items`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse_v2</b> (customer : <i>dw.customer.Customer</i>, productList : <i>dw.customer.ProductList</i>, customerProductListItemResultResponse : <i>CustomerProductListItemResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer the customer product list items result retrieved for.</dd>
    <dd>productList - the product list the customer product list items result retrieved for.</dd>
    <dd>customerProductListItemResultResponse - customer product list item result response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.modifyGETResponse**

`GET /customers/{customer_id}/product_lists/{list_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (customer : <i>dw.customer.Customer</i>, productList : <i>dw.customer.ProductList</i>, customerProductListResponse : <i>CustomerProductList</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - target customer</dd>
    <dd>productList - target product list</dd>
    <dd>customerProductListResponse - customer product list response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.modifyPATCHResponse**

`PATCH /customers/{customer_id}/product_lists/{list_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPATCHResponse</b> (customer : <i>dw.customer.Customer</i>, productList : <i>dw.customer.ProductList</i>, customerProductListResponse : <i>CustomerProductList</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - target customer</dd>
    <dd>productList - target product list</dd>
    <dd>customerProductListResponse - customer product list response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_list.modifyPOSTResponse**

`POST /customers/{customer_id}/product_lists`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPOSTResponse</b> (customer : <i>dw.customer.Customer</i>, productList : <i>dw.customer.ProductList</i>, customerProductListResponse : <i>CustomerProductList</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - target customer</dd>
    <dd>productList - product list</dd>
    <dd>customerProductListResponse - customer product list response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_lists.afterPOST**

`POST /customers/{customer_id}/product_lists`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPOST</b> (customer : <i>dw.customer.Customer</i>, productList : <i>CustomerProductList</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after creating a new product list for the specified customer. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer</dd>
    <dd>productList - the created product list</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_lists.beforeGET**

`GET /customers/{customer_id}/product_lists`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (customerId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customerId - the customer id the customer product lists result retrieved for.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_lists.beforePOST**

`POST /customers/{customer_id}/product_lists`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePOST</b> (customer : <i>dw.customer.Customer</i>, productList : <i>CustomerProductList</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before creating a new product list for the specified customer. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer</dd>
    <dd>productList - the product list to create</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.product_lists.modifyGETResponse_v3**

`GET /customers/{customer_id}/product_lists`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse_v3</b> (customer : <i>dw.customer.Customer</i>, customerProductListResultResponse : <i>CustomerProductListResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer the customer product lists result retrieved for.</dd>
    <dd>customerProductListResultResponse - customer product list pageable result response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Customers

Customers hooks for Shop API.

***

**dw\.ocapi.shop.customers.password_reset.afterPOST**

`POST /customers/password_reset`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPOST</b> (customer : <i>dw.customer.Customer</i>, resetToken : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows resetting a customer's password. See the example below sending an email with a password reset link.
</p>
<div>

```javascript
var variables: Map = new dw.util.HashMap();
variables.put("Customer", customer);
variables.put("ResetPasswordToken", token);
var template: Template = new dw.util.Template("mail/resetpasswordemail.isml");
var content: MimeEncodedText = template.render(variables);
var mail: Mail = new Mail()
  .setSubject("Password Reset")
  .setContent(content)
  .setFrom("noreply@salesforce.com")
  .addTo(customer.profile.email);
mail.send();
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer for whom to reset the password</dd>
    <dd>resetToken - the token generated by the system to be used for the reset</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customers.password_reset.beforePOST**

`POST /customers/password_reset`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePOST</b> (passwordReset : <i>PasswordReset</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Allows resetting a customer's password. The validation of the customer information provided in the the password reset document is done after this hook is called. 
</p>
<div>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Customer Address

Customer address hooks for Shop API.

***

**dw\.ocapi.shop.customer.address.afterDELETE**

`DELETE /customers/{customer_id}/addresses/{address_name}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterDELETE</b> (customer : <i>dw.customer.Customer</i>, addressName : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after removing an address of a customer. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer for whom the address was deleted</dd>
    <dd>addressName - the name of the address that was deleted</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.address.afterPATCH**

`PATCH /customers/{customer_id}/addresses/{address_name}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPATCH</b> (customer : <i>dw.customer.Customer</i>, addressName : <i>String</i>, customerAddress : <i>CustomerAddress</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after updating an address of a customer. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer for whom the address was updated</dd>
    <dd>addressName - the name of the address that was updated</dd>
    <dd>customerAddress - the customer address request data</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.address.beforeDELETE**

`DELETE /customers/{customer_id}/addresses/{address_name}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeDELETE</b> (customer : <i>dw.customer.Customer</i>, addressName : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before removing an address of a customer. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer for whom to delete the address</dd>
    <dd>addressName - the name of the address to be deleted</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.address.beforeGET**

`GET /customers/{customer_id}/addresses/{address_name}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (customerId : <i>String</i>, addressName : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - target customer</dd>
    <dd>customerAddress - target customer address</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.address.beforePATCH**

`PATCH /customers/{customer_id}/addresses/{address_name}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePATCH</b> (customer : <i>dw.customer.Customer</i>, addressName : <i>String</i>, customerAddress : <i>CustomerAddress</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before updating an address of a customer. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer for whom to update the address</dd>
    <dd>addressName - the name of the address to be updated</dd>
    <dd>customerAddress - the customer address request data</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.address.modifyGETResponse**

`GET /customers/{customer_id}/addresses/{address_name}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (customer : <i>dw.customer.Customer</i>, customerAddress : <i>dw.customer.CustomerAddress</i>, customerAddressResponse : <i>CustomerAddress</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - target customer</dd>
    <dd>customerAddress - target customer address</dd>
    <dd>customerAddressResponse - customer address response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.address.modifyPATCHResponse**

`PATCH /customers/{customer_id}/addresses/{address_name}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPATCHResponse</b> (customer : <i>dw.customer.Customer</i>, customerAddress : <i>dw.customer.CustomerAddress</i>, customerAddressResponse : <i>CustomerAddress</i>, customerAddressRequest : <i>CustomerAddress</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customerAddress - target customer address</dd>
    <dd>customerAddressResponse - customer address response object</dd>
    <dd>customerAddressRequest - customer address request object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.address.modifyPOSTResponse**

`POST /customers/{customer_id}/addresses`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPOSTResponse</b> (customer : <i>dw.customer.Customer</i>, customerAddress : <i>dw.customer.CustomerAddress</i>, customerAddressResponse : <i>CustomerAddress</i>, customerAddressRequest : <i>CustomerAddress</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before returning response. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer for whom the address was added.</dd>
    <dd>customerAddress - created customer address</dd>
    <dd>customerAddressResponse - customer address response object.</dd>
    <dd>customerAddressRequest - the customer address request object.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Customer Addresses

Customer addresses hooks for Shop API.

***

**dw\.ocapi.shop.customer.addresses.afterPOST**

`POST /customers/{customer_id}/addresses`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPOST</b> (customer : <i>dw.customer.Customer</i>, addressName : <i>String</i>, customerAddress : <i>CustomerAddress</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after adding an address to a customer. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer for whom the address was added</dd>
    <dd>addressName - the name of the address that was added</dd>
    <dd>customerAddress - the customer address request data</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.addresses.beforeGET**

`GET /customers/{customer_id}/addresses`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (customerId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customerId - the customer id</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.addresses.beforePOST**

`POST /customers/{customer_id}/addresses`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePOST</b> (customer : <i>dw.customer.Customer</i>, addressName : <i>String</i>, customerAddress : <i>CustomerAddress</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before adding an address to a customer. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer for whom to add the address</dd>
    <dd>addressName - the name of the address to be added</dd>
    <dd>customerAddress - the customer address request data</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.customer.addresses.modifyGETResponse**

`GET /customers/{customer_id}/addresses`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (customerAddressResultResponse : <i>CustomerAddressResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customerAddressResultResponse - customer addresses result response</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Folder

Folder hooks for Shop API.

***

**dw\.ocapi.shop.folder.beforeGET**

`GET /folders/({id},...,{id})`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (id : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>id - The id of the requested content folder.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.folder.beforeGET**

`GET /folders/{id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (id : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>id - The id of the requested content folder.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.folder.modifyGETResponse**

`GET /folders/({id},...,{id})`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (scriptFolder : <i>dw.content.Folder</i>, doc : <i>ContentFolder</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>scriptFolder - an instance of dw.content.Folder</dd>
    <dd>doc - the document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.folder.modifyGETResponse**

`GET /folders/{id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (scriptFolder : <i>dw.content.Folder</i>, doc : <i>ContentFolder</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>scriptFolder - an instance of dw.content.Folder</dd>
    <dd>doc - the document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Gift Certificate

Gift certificate hooks for version 24.5.

**dw\.ocapi.shop.gift_certificate.beforePOST**

`POST /gift_certificate`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePOST</b> (giftCertificateRequest : <i>GiftCertificateRequest</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>giftCertificateRequest - The request containing the gift certificate code.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.gift_certificate.modifyPOSTResponse**

`POST /gift_certificate`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPOSTResponse</b> (giftCertificate : <i>dw.order.GiftCertificate</i>, giftCertificateResponse : <i>GiftCertificate</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>giftCertificate - the target gift certificate</dd>
    <dd>giftCertificateResponse - gift certificate response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Order

Order hooks for Shop API.

***

**dw\.ocapi.shop.order.afterPATCH**

`PATCH /orders/{order_no}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPATCH</b> (order : <i>dw.order.Order</i>, orderInput : <i>Order</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after an order was patched. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - the order that was changed</dd>
    <dd>orderInput - the input data from the REST call</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.afterPOST**

`POST /orders`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPOST</b> (order : <i>dw.order.Order</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after an order was created from the basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - the order that was created for the basket</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.afterPUT**

`PUT /orders/{order_no}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPUT</b> (order : <i>dw.order.Order</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after an order is created for the basket with the caller supplying the order number. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - the order that was created for the basket</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.beforeGET**

`GET /orders/{order_no}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (orderNo : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>orderNo - the order number</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.beforePATCH**

`PATCH /orders/{order_no}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePATCH</b> (order : <i>dw.order.Order</i>, orderInput : <i>Order</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before an order is patched. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - the order that will be changed</dd>
    <dd>orderInput - the input data from the REST call</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.beforePOST**

`POST /orders`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePOST</b> (basket : <i>dw.order.Basket</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before an order is created for the basket. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the order is created</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.beforePUT**

`PUT /orders/{order_no}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePUT</b> (ctor : <i>dw.order.Basket</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before an order is created for the basket with the caller supplying the order number. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>basket - the basket based on which the order is created</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.modifyGETResponse**

`GET /orders/{order_no}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (order : <i>dw.order.Order</i>, orderResponse : <i>Order</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - target order</dd>
    <dd>orderResponse - order response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.modifyPATCHResponse**

`PATCH /orders/{order_no}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPATCHResponse</b> (order : <i>dw.order.Order</i>, orderResponse : <i>Order</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - target order</dd>
    <dd>orderResponse - order response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.modifyPOSTResponse**

`POST /orders`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPOSTResponse</b> (order : <i>dw.order.Order</i>, orderResponse : <i>Order</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - target order</dd>
    <dd>orderResponse - order response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.modifyPUTResponse**

`PUT /orders/{order_no}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPUTResponse</b> (order : <i>dw.order.Order</i>, orderResponse : <i>Order</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - target order</dd>
    <dd>orderResponse - order response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Order Payment

Order payment hooks for Shop API.

***

**dw\.order.payment.authorize**

`PATCH /orders/{order_no}/payment_instruments/{payment_instrument_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>authorize</b> (order : <i>dw.order.Order</i>, paymentDetails : <i>dw.order.OrderPaymentInstrument</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Custom payment authorization - modify the order as needed. 
  <ul>
    <li>Prerequisite: An order has been created using the data api or via the storefront.</li>
    <li>Return Status.OK: Corresponding payment transaction is marked as authorized (usually a custom property is used for this).</li>
    <li>Return Status.ERROR: Order is held, authorization needs to be repeated.</li>
  </ul>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - the order</dd>
    <dd>paymentDetails - specified payment details</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd> 
      <ul>
        <li>Status.OK successful authorization.</li>
        <li>Status.ERROR authorization failed.</li>
      </ul>
    </dd>
  </dl>
</div>
</details>

***

**dw\.order.payment.authorize**

`POST /orders/{order_no}/payment_instruments`

<details>  
<summary>Method details</summary>

<p>
  <b>authorize</b> (order : <i>dw.order.Order</i>, paymentDetails : <i>dw.order.OrderPaymentInstrument</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Custom payment authorization - modify the order as needed. 
  <ul>
    <li>Prerequisite: An order has been created using the data api or via the storefront.</li>
    <li>Return Status.OK: Corresponding payment transaction is marked as authorized (usually a custom property is used for this).</li>
    <li>Return Status.ERROR: Order is held, authorization needs to be repeated.</li>
  </ul>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - the order</dd>
    <dd>paymentDetails - specified payment details</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd> 
      <ul>
        <li>Status.OK successful authorization.</li>
        <li>Status.ERROR authorization failed.</li>
      </ul>
    </dd>
  </dl>
</div>
</details>

***

**dw\.order.payment.authorizeCreditCard**

`PATCH /orders/{order_no}/payment_instruments/{payment_instrument_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>authorizeCreditCard</b> (order : <i>dw.order.Order</i>, paymentDetails : <i>dw.order.OrderPaymentInstrument</i>, cvn : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Custom payment authorization of a credit card - modify the order as needed. 
  <ul>
    <li>Prerequisite: An order has been created using the data api or via the storefront.</li>
    <li>Return Status.OK: Corresponding payment transaction is marked as authorized (usually a custom property is used for this).</li>
    <li>Return Status.ERROR: Order is held, authorization needs to be repeated.</li>
  </ul>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - the order</dd>
    <dd>paymentDetails - specified payment details</dd>
    <dd>cvn - the credit card verification number</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd> 
      <ul>
        <li>Status.OK successful authorization.</li>
        <li>Status.ERROR authorization failed.</li>
      </ul>
    </dd>
  </dl>
</div>
</details>

***

**dw\.order.payment.authorizeCreditCard**

`POST /orders/{order_no}/payment_instruments`

<details>  
<summary>Method details</summary>

<p>
  <b>authorizeCreditCard</b> (order : <i>dw.order.Order</i>, paymentDetails : <i>dw.order.OrderPaymentInstrument</i>, cvn : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Custom payment authorization of a credit card - modify the order as needed. 
  <ul>
    <li>Prerequisite: An order has been created using the data api or via the storefront.</li>
    <li>Return Status.OK: Corresponding payment transaction is marked as authorized (usually a custom property is used for this).</li>
    <li>Return Status.ERROR: Order is held, authorization needs to be repeated.</li>
  </ul>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - the order</dd>
    <dd>paymentDetails - specified payment details</dd>
    <dd>cvn - the credit card verification number</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd> 
      <ul>
        <li>Status.OK successful authorization.</li>
        <li>Status.ERROR authorization failed.</li>
      </ul>
    </dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.validateOrder**

`DELETE /orders/{order_no}/payment_instruments/{payment_instrument_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>validateOrder</b> (order : <i>Order</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Validate an order after the order has been updated. The hook is called outside a database transaction, so modifications to the order are not possible. Allows the addition of custom flashes to convey information to the client. Example showing addition of flashes:
</p>
<div>

```javascript
exports.validateBasket = function() {
  order.addFlash({
    type: "PaymentAuthorizationFailure",
    message: "Order was not successfully authorized.",
    path: "authorizations",
    details: {
      "result": "reject",
      "reason": "invalid_credit_card"
    }
  });
}
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - the modified order</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.validateOrder**

`PATCH /orders/{order_no}/payment_instruments/{payment_instrument_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>validateOrder</b> (order : <i>Order</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Validate an order after the order has been updated. The hook is called outside a database transaction, so modifications to the order are not possible. Allows the addition of custom flashes to convey information to the client. Example showing addition of flashes:
</p>
<div>

```javascript
exports.validateBasket = function () {
  order.addFlash({
    type: "PaymentAuthorizationFailure",
    message: "Order was not successfully authorized.",
    path: "authorizations",
    details: {
      result: "reject",
      reason: "invalid_credit_card",
    },
  });
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - the modified order</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.validateOrder**

`POST /orders/{order_no}/payment_instruments`

<details>  
<summary>Method details</summary>

<p>
  <b>validateOrder</b> (order : <i>Order</i>) : <i>dw.system.Status</i> 
</p>
<p>
  Validate an order after the order has been updated. The hook is called outside a database transaction, so modifications to the order are not possible. Allows the addition of custom flashes to convey information to the client. Example showing addition of flashes:
</p>
<div>

```javascript
exports.validateBasket = function () {
  order.addFlash({
    type: "PaymentAuthorizationFailure",
    message: "Order was not successfully authorized.",
    path: "authorizations",
    details: {
      result: "reject",
      reason: "invalid_credit_card",
    },
  });
};
```

</div>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - the modified order</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Order Note

Order note hooks for Shop API.

***

**dw\.ocapi.shop.order.note.afterDELETE**

`DELETE /orders/{order_no}/notes/{note_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterDELETE</b> (order : <i>dw.order.Order</i>, note : <i>dw.object.Note</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after a note is deleted. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - the order</dd>
    <dd>note - the note to be removed</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.note.beforeDELETE**

`DELETE /orders/{order_no}/notes/{note_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeDELETE</b> (order : <i>dw.order.Order</i>, note : <i>dw.object.Note</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before a note is deleted. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - the order</dd>
    <dd>note - the note to be removed</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.note.beforePOST**

`POST /orders/{order_no}/notes`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePOST</b> (orderNo : <i>String</i>, note : <i>Note</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>orderNo - The id of the order from which you want to retrieve notes.</dd>
    <dd>note - The note to be added.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.note.modifyDELETEResponse**

`DELETE /orders/{order_no}/notes/{note_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyDELETEResponse</b> (order : <i>dw.order.Order</i>, orderResponse : <i>Order</i>, noteId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - target order</dd>
    <dd>orderResponse - order response object</dd>
    <dd>noteId - note id to delete</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.note.modifyPOSTResponse**

`POST /orders/{order_no}/notes`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPOSTResponse</b> (order : <i>dw.order.Order</i>, orderResponse : <i>Order</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - target order</dd>
    <dd>orderResponse - order response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Order Notes

Order notes hooks for Shop API.

***

**dw\.ocapi.shop.order.notes.beforeGET**

`GET /orders/{order_no}/notes`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (orderNo : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>orderNo - The id of the order from which you want to retrieve notes.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.notes.modifyGETResponse_v2**

`GET /orders/{order_no}/notes`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse_v2</b> (order : <i>dw.order.Order</i>, notesResultResponse : <i>NotesResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - the order the notes result retrieved for.</dd>
    <dd>notesResultResponse - notes result response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Order Payment Instruments

Order payment instruments hooks for Shop API.

***

**dw\.ocapi.shop.order.payment_instrument.afterDELETE**

`DELETE /orders/{order_no}/payment_instruments/{payment_instrument_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterDELETE</b> (order : <i>dw.order.Order</i>, paymentInstrument : <i>dw.order.OrderPaymentInstrument</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after removing a payment instrument of an order. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - the modified order</dd>
    <dd>paymentInstrument - the removed payment instrument</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.payment_instrument.afterPATCH**

`PATCH /orders/{order_no}/payment_instruments/{payment_instrument_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPATCH</b> (order : <i>dw.order.Order</i>, paymentInstrument : <i>dw.order.OrderPaymentInstrument</i>, newPaymentInstrument : <i>OrderPaymentInstrumentRequest</i>, successfullyAuthorized : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after updating a payment instrument of an order. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - the modified order</dd>
    <dd>paymentInstrument - the updated payment instrument</dd>
    <dd>newPaymentInstrument - the new payment instrument data</dd>
    <dd>successfullyAuthorized - was the payment instrument successfully authorized.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.payment_instrument.afterPOST**

`POST /orders/{order_no}/payment_instruments`

<details>  
<summary>Method details</summary>

<p>
  <b>afterPOST</b> (order : <i>dw.order.Order</i>, paymentInstrument : <i>OrderPaymentInstrumentRequest</i>, successfullyAuthorized : <i>boolean</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after a payment instrument was added to the order. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - the modified order</dd>
    <dd>paymentInstrument - the payment instrument that was added to the order</dd>
    <dd>successfullyAuthorized - was the payment instrument successfully authorized.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.payment_instrument.beforeDELETE**

`DELETE /orders/{order_no}/payment_instruments/{payment_instrument_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeDELETE</b> (order : <i>dw.order.Order</i>, paymentInstrument : <i>dw.order.OrderPaymentInstrument</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before removing a payment instrument of an order. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - the modified order</dd>
    <dd>paymentInstrument - the payment instrument to be removed</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.payment_instrument.beforePATCH**

`PATCH /orders/{order_no}/payment_instruments/{payment_instrument_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePATCH</b> (order : <i>dw.order.Order</i>, paymentInstrument : <i>dw.order.OrderPaymentInstrument</i>, newPaymentInstrument : <i>OrderPaymentInstrumentRequest</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before updating a payment instrument of an order. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - the modified order</dd>
    <dd>paymentInstrument - the payment instrument to be updated</dd>
    <dd>newPaymentInstrument - the new payment instrument data</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.payment_instrument.beforePOST**

`POST /orders/{order_no}/payment_instruments`

<details>  
<summary>Method details</summary>

<p>
  <b>beforePOST</b> (order : <i>dw.order.Order</i>, paymentInstrument : <i>OrderPaymentInstrumentRequest</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before a payment instrument is added to the order. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - the modified order</dd>
    <dd>paymentInstrument - the payment instrument to be added to the order</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.payment_instrument.modifyDELETEResponse**

`DELETE /orders/{order_no}/payment_instruments/{payment_instrument_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyDELETEResponse</b> (order : <i>dw.order.Order</i>, orderResponse : <i>Order</i>, paymentInstrumentId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - target order</dd>
    <dd>orderResponse - order response object</dd>
    <dd>paymentInstrumentId - payment instrument id</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.payment_instrument.modifyPATCHResponse**

`PATCH /orders/{order_no}/payment_instruments/{payment_instrument_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPATCHResponse</b> (order : <i>dw.order.Order</i>, orderResponse : <i>Order</i>, paymentInstrumentId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - target order</dd>
    <dd>orderResponse - order response object</dd>
    <dd>paymentInstrumentId - payment instrument id</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.payment_instrument.modifyPOSTResponse**

`POST /orders/{order_no}/payment_instruments`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPOSTResponse</b> (order : <i>dw.order.Order</i>, orderResponse : <i>Order</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - target order</dd>
    <dd>orderResponse - order response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Order Payment Methods

Order payment methods hooks for Shop API.

***

**dw\.ocapi.shop.order.payment_methods.beforeGET**

`GET /orders/{order_no}/payment_methods`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (orderNumber : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>orderNumber - the order number</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.order.payment_methods.modifyGETResponse_v2**

`GET /orders/{order_no}/payment_methods`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse_v2</b> (order : <i>dw.order.Order</i>, paymentMethodResultResponse : <i>PaymentMethodResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>order - the order the payment method result retrieved for.</dd>
    <dd>paymentMethodResultResponse - payment method result response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Order Search

Order search hooks for Shop API.

***

**dw\.ocapi.shop.order_search.modifyPOSTResponse**

`POST /order_search`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyPOSTResponse</b> (orderSearchResultResponse : <i>OrderSearchResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>orderSearchResultResponse - order search result response object.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Price Adjustment Limits Hooks

Price adjustment limits hooks for Shop API.

***

**dw\.ocapi.shop.price_adjustment_limits.beforeGET**

`GET /price_adjustment_limits`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> () : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.price_adjustment_limits.modifyGETResponse**

`GET /price_adjustment_limits`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (priceAdjLimitResponse : <i>PriceAdjustmentLimits</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>priceAdjLimitResponse - the PriceAdjustmentLimit response object</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Product

Product hooks for Shop API.

***

**dw\.ocapi.shop.product.beforeGET**

`GET /products/({id},...,{id})`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (productId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>productId - the incoming product id from the URL.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product.beforeGET**

`GET /products/{id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (productId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>productId - the incoming product id from the URL.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product.beforeGET**

`GET /products/{id}/availability`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (productId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>productId - the incoming product id from the URL.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product.beforeGET**

`GET /products/{id}/bundled_products`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (productId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>productId - the incoming product id from the URL.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product.beforeGET**

`GET /products/{id}/images`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (productId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>productId - the incoming product id from the URL.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product.beforeGET**

`GET /products/{id}/links`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (productId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>productId - the incoming product id from the URL.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product.beforeGET**

`GET /products/{id}/options`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (productId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>productId - the incoming product id from the URL.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product.beforeGET**

`GET /products/{id}/prices`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (productId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>productId - the incoming product id from the URL.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product.beforeGET**

`GET /products/{id}/promotions`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (productId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>productId - the incoming product id from the URL.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product.beforeGET**

`GET /products/{id}/recommendations`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (productId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>productId - the incoming product id from the URL.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product.beforeGET**

`GET /products/{id}/set_products`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (productId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>productId - the incoming product id from the URL.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product.beforeGET**

`GET /products/{id}/variations`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (productId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>productId - the incoming product id from the URL.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product.modifyGETResponse**

`GET /products/({id},...,{id})`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (scriptProduct : <i>dw.catalog.Product</i>, doc : <i>Product</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>doc - the document</dd>
    <dd>scriptProduct - an instance of dw.catalog.Product</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product.modifyGETResponse**

`GET /products/{id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (scriptProduct : <i>dw.catalog.Product</i>, doc : <i>Product</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>doc - the document</dd>
    <dd>scriptProduct - an instance of dw.catalog.Product</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product.modifyGETResponse**

`GET /products/{id}/availability`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (scriptProduct : <i>dw.catalog.Product</i>, doc : <i>Product</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>doc - the document</dd>
    <dd>scriptProduct - an instance of dw.catalog.Product</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product.modifyGETResponse**

`GET /products/{id}/bundled_products`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (scriptProduct : <i>dw.catalog.Product</i>, doc : <i>Product</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>doc - the document</dd>
    <dd>scriptProduct - an instance of dw.catalog.Product</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product.modifyGETResponse**

`GET /products/{id}/images`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (scriptProduct : <i>dw.catalog.Product</i>, doc : <i>Product</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>doc - the document</dd>
    <dd>scriptProduct - an instance of dw.catalog.Product</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product.modifyGETResponse**

`GET /products/{id}/links`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (scriptProduct : <i>dw.catalog.Product</i>, doc : <i>Product</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>doc - the document</dd>
    <dd>scriptProduct - an instance of dw.catalog.Product</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product.modifyGETResponse**

`GET /products/{id}/options`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (scriptProduct : <i>dw.catalog.Product</i>, doc : <i>Product</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>doc - the document</dd>
    <dd>scriptProduct - an instance of dw.catalog.Product</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product.modifyGETResponse**

`GET /products/{id}/prices`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (scriptProduct : <i>dw.catalog.Product</i>, doc : <i>Product</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>doc - the document</dd>
    <dd>scriptProduct - an instance of dw.catalog.Product</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product.modifyGETResponse**

`GET /products/{id}/promotions`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (scriptProduct : <i>dw.catalog.Product</i>, doc : <i>Product</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>doc - the document</dd>
    <dd>scriptProduct - an instance of dw.catalog.Product</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product.modifyGETResponse**

`GET /products/{id}/recommendations`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (scriptProduct : <i>dw.catalog.Product</i>, doc : <i>Product</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>doc - the document</dd>
    <dd>scriptProduct - an instance of dw.catalog.Product</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product.modifyGETResponse**

`GET /products/{id}/set_products`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (scriptProduct : <i>dw.catalog.Product</i>, doc : <i>Product</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>doc - the document</dd>
    <dd>scriptProduct - an instance of dw.catalog.Product</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product.modifyGETResponse**

`GET /products/{id}/variations`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (scriptProduct : <i>dw.catalog.Product</i>, doc : <i>Product</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>doc - the document</dd>
    <dd>scriptProduct - an instance of dw.catalog.Product</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Product Shipping

Product shipping hooks for Shop API.

***

**dw\.ocapi.shop.product.shipping_methods.beforeGET**

`GET /products/{id}/shipping_methods`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (productId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>productId - the requested product id</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product.shipping_methods.modifyGETResponse_v2**

`GET /products/{id}/shipping_methods`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse_v2</b> (product : <i>dw.catalog.Product</i>, shippingMethodResultResponse : <i>ShippingMethodResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>product - the product the shipping methods result retrieved for.</dd>
    <dd>shippingMethodResultResponse - shipping method result response</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Product List

Product list hooks for Shop API.

***

**dw\.ocapi.shop.product_list.beforeGET**

`GET /product_lists/{list_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (listId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>listId - The id of the list.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product_list.item.beforeGET**

`GET /product_lists/{list_id}/items/{item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (listId : <i>String</i>, itemId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>listId - The id of the list.</dd>
    <dd>itemId - The id of the item.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product_list.item.modifyGETResponse**

`GET /product_lists/{list_id}/items/{item_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (productList : <i>dw.customer.ProductList</i>, productListItem : <i>dw.customer.ProductListItem</i>, publicProductListItemResponse : <i>PublicProductListItem</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>productList - product list.</dd>
    <dd>productListItem - product list item.</dd>
    <dd>publicProductListItemResponse - public product list item response object.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product_list.items.beforeGET**

`GET /product_lists/{list_id}/items`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (listId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>listId - The id of the list.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product_list.items.modifyGETResponse**

`GET /product_lists/{list_id}/items`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse_v2</b> (productList : <i>dw.customer.ProductList</i>, publicProductListItemResultResponse : <i>PublicProductListItemResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>productList - the product list the items are retrieved for.</dd>
    <dd>publicProductListItemResultResponse - public product list item result response object.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product_list.modifyGETResponse**

`GET /product_lists/{list_id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (productList : <i>dw.customer.ProductList</i>, publicProductListResponse : <i>PublicProductList</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>productList - product list.</dd>
    <dd>publicProductListResponse - public product list response object.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Product Lists

Product lists hooks for Shop API.

***

**dw\.ocapi.shop.product_lists.beforeGET**

`GET /product_lists`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (email : <i>String</i>, firstName : <i>String</i>, lastName : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>email - The email address of the customer, the product lists belong to.</dd>
    <dd>firstName - The first name of the customer, the product lists belong to.</dd>
    <dd>lastName - The last name of the customer, the product lists belong to.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product_lists.modifyGETResponse**

`GET /product_lists`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (publicProductListResultResponse : <i>PublicProductListResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>publicProductListResultResponse - public product list result response object.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Product Search

Product search hooks for Shop API.

***

**dw\.ocapi.shop.product_search.beforeGET**

`GET /product_search`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> () : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product_search.beforeGET**

`GET /product_search/availability`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> () : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product_search.beforeGET**

`GET /product_search/images`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> () : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product_search.beforeGET**

`GET /product_search/prices`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> () : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product_search.beforeGET**

`GET /product_search/represented_products`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> () : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product_search.beforeGET**

`GET /product_search/variations`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> () : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product_search.modifyGETResponse**

`GET /product_search`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (doc : <i>ProductSearchResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>doc - the document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product_search.modifyGETResponse**

`GET /product_search/availability`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (doc : <i>ProductSearchResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>doc - the document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product_search.modifyGETResponse**

`GET /product_search/images`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (doc : <i>ProductSearchResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>doc - the document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product_search.modifyGETResponse**

`GET /product_search/prices`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (doc : <i>ProductSearchResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>doc - the document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product_search.modifyGETResponse**

`GET /product_search/represented_products`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (doc : <i>ProductSearchResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>doc - the document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.product_search.modifyGETResponse**

`GET /product_search/variations`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (doc : <i>ProductSearchResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>doc - the document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Promotion

Promotion hooks for Shop API.

***

**dw\.ocapi.shop.promotion.beforeGET**

`GET /promotions/({id},...,{id})`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (id : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>id - The id of the requested promotion.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.promotion.beforeGET**

`GET /promotions/{id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (id : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>id - The id of the requested promotion.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.promotion.modifyGETResponse**

`GET /promotions/({id},...,{id})`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (scriptPromotion : <i>dw.campaign.Promotion</i>, doc : <i>Promotion</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>scriptPromotion - an instance of dw.campaign.Promotion</dd>
    <dd>doc - the document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.promotion.modifyGETResponse**

`GET /promotions/{id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (scriptPromotion : <i>dw.campaign.Promotion</i>, doc : <i>Promotion</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>scriptPromotion - an instance of dw.campaign.Promotion</dd>
    <dd>doc - the document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Promotions

Promotions hooks for Shop API.

***

**dw\.ocapi.shop.promotions.beforeGET**

`GET /promotions`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (campaignId : <i>String</i>, startDate : <i>String</i>, endDate : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>campaignId - Find the promotions assigned to this campaign (mandatory)</dd>
    <dd>startDate - The start date of the promotion in ISO8601 date time format: yyyy-MM-dd'T'HH:mmZ</dd>
    <dd>endDate - The end date of the promotion in ISO8601 date time format: yyyy-MM-dd'T'HH:mmZ</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.promotions.modifyGETResponse**

`GET /promotions`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (doc : <i>PromotionResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>doc - the document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Search Suggestions

Search suggestions hooks for Shop API.

***

**dw\.ocapi.shop.search_suggestion.beforeGET**

`GET /search_suggestion`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> () : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.search_suggestion.modifyGETResponse**

`GET /search_suggestion`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (doc : <i>SuggestionResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>doc - the document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Site

Site hooks for Shop API.

***

**dw\.ocapi.shop.site.beforeGET**

`GET /site`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (siteId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.site.modifyGETResponse**

`GET /site`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (doc : <i>Site</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>doc - the document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Store

Store hooks for Shop API.

***

**dw\.ocapi.shop.store.beforeGET**

`GET /stores/{id}`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (id : <i>String</i>, siteId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>id - The id of the requested store.</dd>
    <dd>siteId - The ID of the site to get the store from</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.store.modifyGETResponse**

`GET /stores/({id},...,{id})`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (scriptStore : <i>dw.catalog.Store</i>, doc : <i>Store</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>scriptStore - an instance of dw.catalog.Store</dd>
    <dd>doc - the document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.store.modifyGETResponse**

`GET /stores/{id}`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (scriptStore : <i>dw.catalog.Store</i>, doc : <i>Store</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>scriptStore - an instance of dw.catalog.Store</dd>
    <dd>doc - the document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Stores

Stores hooks for Shop API.

***

**dw\.ocapi.shop.stores.beforeGET**

`GET /stores`

<details>  
<summary>Method details</summary>

<p>
  <b>beforeGET</b> (latitude : <i>Double</i>, longitude : <i>Double</i>, countryCode : <i>String</i>, postalCode : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the request will be processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>latitude - The geo coordinate latitude to search for stores (value range -90.00 .. 90.00).</dd>
    <dd>longitude - The geo coordinate longitude to search for stores (value range -180.00 .. 180.00).</dd>
    <dd>countryCode - The two letter ISO country code e.g. "US".</dd>
    <dd>postalCode - The postal code e.g. "01801".</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.shop.stores.modifyGETResponse**

`GET /stores`

<details>  
<summary>Method details</summary>

<p>
  <b>modifyGETResponse</b> (doc : <i>StoreResult</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the request has been processed. 
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>doc - the document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***
