# OCAPI Hooks for Data API

The following hooks exist in OCAPI version 24.5.

## Content

Content hooks for Data API.

***

**dw\.ocapi.data.content.content.afterCreate**

`PUT /libraries/{library_id}/content/{content_id}`

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

<p>
  <b>afterCreate</b> (library : <i>dw.content.Library</i>, content : <i>dw.content.Content</i>, create : <i>ContentAsset</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the new content asset was created.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>library - the library in the actual context</dd>
    <dd>content - the new content asset.</dd>
    <dd>create - the content asset create document.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.content.content.afterDelete**

`DELETE /libraries/{library_id}/content/{content_id}`

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

<p>
  <b>afterDelete</b> (library : <i>dw.content.Library</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the content asset was deleted.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>library - the library in the actual context</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.content.content.afterUpdate**

`PATCH /libraries/{library_id}/content/{content_id}`

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

<p>
  <b>afterUpdate</b> (library : <i>dw.content.Library</i>, content : <i>dw.content.Content</i>, update : <i>ContentAsset</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the content asset is updated with update document.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>library - the library in the actual context</dd>
    <dd>content - the content asset to update.</dd>
    <dd>update - the update document.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.content.content.beforeCreate**

`PUT /libraries/{library_id}/content/{content_id}`

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

<p>
  <b>beforeCreate</b> (library : <i>dw.content.Library</i>, create : <i>ContentAsset</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the content asset is created with the given document.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>library - the library in the actual context</dd>
    <dd>create - the content asset create document.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.content.content.beforeDelete**

`DELETE /libraries/{library_id}/content/{content_id}`

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

<p>
  <b>beforeDelete</b> (library : <i>dw.content.Library</i>, content : <i>dw.content.Content</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the content asset is deleted.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>library - the library in the actual context</dd>
    <dd>content - the content asset 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.data.content.content.beforeUpdate**

`PATCH /libraries/{library_id}/content/{content_id}`

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

<p>
  <b>beforeUpdate</b> (library : <i>dw.content.Library</i>, content : <i>dw.content.Content</i>, update : <i>ContentAsset</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the content asset is updated with update document.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>library - the library in the actual context</dd>
    <dd>content - the content asset to update.</dd>
    <dd>update - the update document.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Content Folder

Content folder hooks for Data API.

***

**dw\.ocapi.data.content.folder.afterCreate**

`PUT /libraries/{library_id}/folders/{folder_id}`

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

<p>
  <b>afterCreate</b> (library : <i>dw.content.Library</i>, folder : <i>dw.content.Folder</i>, create : <i>ContentFolder</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the new content folder was created.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>library - the library in the actual context</dd>
    <dd>folder - the new content folder.</dd>
    <dd>create - the content folder create document.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.content.folder.afterDelete**

`DELETE /libraries/{library_id}/folders/{folder_id}`

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

<p>
  <b>afterDelete</b> (library : <i>dw.content.Library</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the content folder was deleted.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>library - the library in the actual context</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.content.folder.afterUpdate**

`PATCH /libraries/{library_id}/folders/{folder_id}`

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

<p>
  <b>afterUpdate</b> (library : <i>dw.content.Library</i>, folder : <i>dw.content.Folder</i>, update : <i>ContentFolder</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the content folder is updated with update document.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>library - the library in the actual context</dd>
    <dd>folder - the content folder to update.</dd>
    <dd>update - the update document.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.content.folder.beforeCreate**

`PUT /libraries/{library_id}/folders/{folder_id}`

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

<p>
  <b>beforeCreate</b> (library : <i>dw.content.Library</i>, create : <i>ContentFolder</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the content folder is created with the given document.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>library - the library in the actual context</dd>
    <dd>folder - the content folder create document.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.content.folder.beforeDelete**

`DELETE /libraries/{library_id}/folders/{folder_id}`

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

<p>
  <b>beforeDelete</b> (library : <i>dw.content.Library</i>, folder : <i>dw.content.Folder</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the content folder is deleted.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>library - the library in the actual context</dd>
    <dd>folder - the content folder 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.data.content.folder.beforeUpdate**

`PATCH /libraries/{library_id}/folders/{folder_id}`

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

<p>
  <b>beforeUpdate</b> (library : <i>dw.content.Library</i>, folder : <i>dw.content.Folder</i>, update : <i>ContentFolder</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the content folder is updated with update document.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>library - the library in the actual context</dd>
    <dd>folder - the content folder to update.</dd>
    <dd>update - the update 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 Data API.

***

**dw\.ocapi.data.customer_list.customer.afterDELETE**

`DELETE /customer_lists/{list_id}/customers/{customer_no}`

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

<p>
  <b>afterDelete</b> (customerListId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the customer was deleted.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customerListId - the id of the customerlist the customer is assigned to</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.customer_list.customer.afterPATCH**

`PATCH /customer_lists/{list_id}/customers/{customer_no}`

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

<p>
  <b>afterPatch</b> (customer : <i>dw.customer.Customer</i>, update : <i>Customer</i>, customerListId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the customer is updated with update document.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer to update.</dd>
    <dd>update - the update document.</dd>
    <dd>customerListId - the id of the customerlist the customer is assigned to</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.customer_list.customer.beforeDELETE**

`DELETE /customer_lists/{list_id}/customers/{customer_no}`

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

<p>
  <b>beforeDelete</b> (customer : <i>dw.customer.Customer</i>, customerListId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the customer is deleted.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer to be deleted.</dd>
    <dd>customerListId - the id of the customerlist the customer is assigned to</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.customer_list.customer.beforePATCH**

`PATCH /customer_lists/{list_id}/customers/{customer_no}`

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

<p>
  <b>beforePatch</b> (customer : <i>dw.customer.Customer</i>, update : <i>Customer</i>, customerListId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the customer is updated with update document.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer to update.</dd>
    <dd>update - the update document.</dd>
    <dd>customerListId - the id of the customerlist the customer is assigned to</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 Data API.

***

**dw\.ocapi.data.customer_list.customers.afterPOST**

`POST /customer_lists/{list_id}/customers`

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

<p>
  <b>afterPost</b> (customer : <i>dw.customer.Customer</i>, create : <i>Customer</i>, customerListId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the new customer was created.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the new customer.</dd>
    <dd>create - the customer create document.</dd>
    <dd>customerListId - the id of the customerlist the customer is assigned to</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.customer_list.customers.afterPUT**

`PUT /customer_lists/{list_id}/customers/{customer_no}`

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

<p>
  <b>afterPut</b> (customer : <i>dw.customer.Customer</i>, create : <i>Customer</i>, customerListId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the new customer was created.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the new customer.</dd>
    <dd>create - the customer create document.</dd>
    <dd>customerListId - the id of the customerlist the customer is assigned to</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.customer_list.customers.beforePOST**

`POST /customer_lists/{list_id}/customers`

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

<p>
  <b>beforePost</b> (create : <i>Customer</i>, customerListId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the customer is created with the given document.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>create - the customer create document.</dd>
    <dd>customerListId - the id of the customerlist the customer is assigned to</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.customer_list.customers.beforePUT**

`PUT /customer_lists/{list_id}/customers/{customer_no}`

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

<p>
  <b>beforePut</b> (create : <i>Customer</i>, customerListId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the customer is created with the given document.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>create - the customer create document.</dd>
    <dd>customerListId - the id of the customerlist the customer is assigned to</dd>
  </dl>
  <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 Data API.

***

**dw\.ocapi.data.customer_list.customer.address.afterDELETE**

`DELETE /customer_lists/{list_id}/customers/{customer_no}/addresses/{address_id}`

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

<p>
  <b>afterDelete</b> (customer : <i>dw.customer.Customer</i>, customerListId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the customer address was deleted.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer the address should be deleted for.</dd>
    <dd>customerListId - the id of the customerlist the customer is assigned to</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.customer_list.customer.address.afterPATCH**

`PATCH /customer_lists/{list_id}/customers/{customer_no}/addresses/{address_id}`

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

<p>
  <b>afterPatch</b> (customer : <i>dw.customer.Customer</i>, customerAddress : <i>dw.customer.CustomerAddress</i>, update : <i>CustomerAddress</i>, customerListId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the customer address is updated with update document.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer the address should be updated for.</dd>
    <dd>update - the update document.</dd>
    <dd>customerListId - the id of the customerlist the customer is assigned to</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.customer_list.customer.address.beforeDELETE**

`DELETE /customer_lists/{list_id}/customers/{customer_no}/addresses/{address_id}`

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

<p>
  <b>beforeDelete</b> (customer : <i>dw.customer.Customer</i>, customerAddress : <i>dw.customer.CustomerAddress</i>, customerListId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the customer is deleted.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer the address should be deleted for.</dd>
    <dd>customerAddress - the customer address to be deleted.</dd>
    <dd>customerListId - the id of the customerlist the customer is assigned to</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.customer_list.customer.address.beforePATCH**

`PATCH /customer_lists/{list_id}/customers/{customer_no}/addresses/{address_id}`

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

<p>
  <b>beforePatch</b> (customer : <i>dw.customer.Customer</i>, customerAddress : <i>dw.customer.CustomerAddress</i>, update : <i>CustomerAddress</i>, customerListId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the customer address is updated with update document.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer the address should be updated for.</dd>
    <dd>customerAddress - the customer address to update.</dd>
    <dd>update - the update document.</dd>
    <dd>customerListId - the id of the customerlist the customer is assigned to</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 Data API.

***

**dw\.ocapi.data.customer_list.customer.addresses.afterPOST**

`POST /customer_lists/{list_id}/customers/{customer_no}/addresses`

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

<p>
  <b>afterPost</b> (customer : <i>dw.customer.Customer</i>, customerAddress : <i>dw.customer.CustomerAddress</i>, create : <i>CustomerAddress</i>, customerListId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the new customer address was created.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer the address should be created for.</dd>
    <dd>customerAddress - the new customer address.</dd>
    <dd>create - the customer address create document.</dd>
    <dd>customerListId - the id of the customerlist the customer is assigned to</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.customer_list.customer.addresses.beforePOST**

`POST /customer_lists/{list_id}/customers/{customer_no}/addresses`

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

<p>
  <b>beforePost</b> (customer : <i>dw.customer.Customer</i>, create : <i>CustomerAddress</i>, customerListId : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before a customer address is created with the given document.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customer - the customer the address should be created for.</dd>
    <dd>create - the customer address create document.</dd>
    <dd>customerListId - the id of the customerlist the customer is assigned to</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Object

Object hooks for Data API.

***

**dw\.ocapi.data.object.afterDelete**

`DELETE /custom_objects/{object_type}/{key}`

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

<p>
  <b>afterDelete</b> () : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the custom object was deleted.
</p>
<div>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.object.afterDelete**

`DELETE /sites/{site_id}/custom_objects/{object_type}/{key}`

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

<p>
  <b>afterDelete</b> () : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the custom object was deleted.
</p>
<div>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.object.afterPatch**

`PATCH /custom_objects/{object_type}/{key}`

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

<p>
  <b>afterPatch</b> (customObject : <i>dw.object.CustomObject</i>, create : <i>CustomObject</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the custom object was updated with update document.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customObject - the updated custom object</dd>
    <dd>update - the update document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.object.afterPatch**

`PATCH /sites/{site_id}/custom_objects/{object_type}/{key}`

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

<p>
  <b>afterPatch</b> (customObject : <i>dw.object.CustomObject</i>, create : <i>CustomObject</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the custom object was updated with update document.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customObject - the updated custom object</dd>
    <dd>update - the update document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.object.afterPut**

`PUT /custom_objects/{object_type}/{key}`

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

<p>
  <b>afterPut</b> (customObject : <i>dw.object.CustomObject</i>, create : <i>CustomObject</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the custom object was created with create document.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customObject - the created custom object</dd>
    <dd>create - the create document, may be <code>null</code></dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.object.afterPut**

`PUT /sites/{site_id}/custom_objects/{object_type}/{key}`

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

<p>
  <b>afterPut</b> (customObject : <i>dw.object.CustomObject</i>, create : <i>CustomObject</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the custom object was created with create document.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>customObject - the created custom object</dd>
    <dd>create - the create document, may be <code>null</code></dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.object.beforeDelete**

`DELETE /custom_objects/{object_type}/{key}`

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

<p>
  <b>beforeDelete</b> (customObject : <i>dw.object.CustomObject</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the custom object is removed.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>create - the create document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.object.beforeDelete**

`DELETE /sites/{site_id}/custom_objects/{object_type}/{key}`

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

<p>
  <b>beforeDelete</b> (customObject : <i>dw.object.CustomObject</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the custom object is removed.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>create - the create document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.object.beforePatch**

`PATCH /custom_objects/{object_type}/{key}`

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

<p>
  <b>beforePatch</b> (customObject : <i>dw.object.CustomObject</i>, update : <i>CustomObject</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the custom object is updated with update document.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>update - the update document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.object.beforePatch**

`PATCH /sites/{site_id}/custom_objects/{object_type}/{key}`

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

<p>
  <b>beforePatch</b> (customObject : <i>dw.object.CustomObject</i>, update : <i>CustomObject</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the custom object is updated with update document.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>update - the update document</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.object.beforePut**

`PUT /custom_objects/{object_type}/{key}`

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

<p>
  <b>beforePut</b> (create : <i>CustomObject</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the custom object is created with create document.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>create - the create document, may be <code>null</code></dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

**dw\.ocapi.data.object.beforePut**

`PUT /sites/{site_id}/custom_objects/{object_type}/{key}`

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

<p>
  <b>beforePut</b> (create : <i>CustomObject</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called before the custom object is created with create document.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>create - the create document, may be <code>null</code></dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
</details>

***

## Users

Users hooks for Data API.

***

**dw\.ocapi.data.users.afterPATCH**

`PATCH /users/this/password`

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

<p>
  <b>afterPatch</b> (login : <i>String</i>, email : <i>String</i>) : <i>dw.system.Status</i> 
</p>
<p>
  The function is called after the user's password is updated.
</p>
<div>
  <dl> 
    <dt><b>Parameters:</b></dt>
    <dd>login - The login of the user.</dd>
    <dd>email - The email of the user.</dd>
  </dl>
  <dl> 
    <dt><b>Returns:</b></dt>
    <dd>a non-null Status ends the hook execution</dd>
  </dl>
</div>
