Customer Service Center Hooks

Use the Shop API hooks to customize Customer Service Center.

note: The Shop API hooks use OCAPI version 17.8 except for <li>dw.ocapi.shop.customer.modifyGETResponse, which uses OCAPI version 18.3.

Find an Order

CSC Function Resource Shop API Hooks
Search orders POST /order_search<ul><li>The Created On (From) and Created On (To) search filter criteria are consolidated into one search filter criteria, Created On, which can define a date range.</li><li>Previously, the two separate search filter criteria were required to filter a date range.</li></ul> dw.ocapi.shop.order_search.modifyPOSTResponse
Open an order GET /orders/{order_no} dw.ocapi.shop.order.modifyGETResponse
Add a note POST /orders/{order_no}/notes dw.ocapi.shop.order.note.modifyPOSTResponse

Create a New Order

Customer Service Center Function Resource Shop API Hooks
New order POST /baskets GET /baskets/{basket_id} <ul><li>dw.ocapi.shop.basket.modifyPOSTResponse</li><li>dw.ocapi.shop.basket.modifyGETResponse</li></ul>
Set Customer PUT /baskets/{basket_id}/customer <ul><li>dw.ocapi.shop.basket.beforePutCustomer</li><li>dw.ocapi.shop.basket.afterPutCustomer</li><li>dw.ocapi.shop.basket.customer.modifyPUTResponse</li></ul>
Set Billing Address PUT /baskets/{basket_id}/billing_address <ul><li>dw.ocapi.shop.basket.beforePutBillingAddress</li><li>dw.ocapi.shop.basket.afterPutBillingAddress</li><li>dw.ocapi.shop.basket.billing_address.modifyPUTResponse</li></ul>
Set Shipping Address PUT /baskets/{basket_id}/shipments/{shipment_id}/shipping_address <ul><li>dw.ocapi.shop.basket.shipment.beforePutShippingAddress</li><li>dw.ocapi.shop.basket.shipment.afterPutShippingAddress</li><li>dw.ocapi.shop.basket.shipment.shipping_address.modifyPUTResponse</li></ul>
Add Product POST /baskets/{basket_id}/items <ul><li>dw.ocapi.shop.basket.items.beforePOST</li><li>dw.ocapi.shop.basket.items.afterPOST</li><li>dw.ocapi.shop.basket.items.modifyPOSTResponse</li></ul>
Update Product Item (such as quantity and custom properties PATCH /baskets/{basket_id}/items/{item_id} <ul><li>dw.ocapi.shop.basket.beforePatchItem</li><li>dw.ocapi.shop.basket.afterPatchItem</li><li>dw.ocapi.shop.basket.item.modifyPATCHResponse</li></ul>
Remove a product item DELETE /baskets/{basket_id}/items/{item_id} <ul><li>dw.ocapi.shop.basket.beforeDeleteItem</li><li>dw.ocapi.shop.basket.afterDeleteItem</li><li>dw.ocapi.shop.basket.item.modifyDELETEResponse</li></ul>
Set shipping method PUT /baskets/{basket_id}/shipments/{shipment_id}/shipping_method <ul><li>dw.ocapi.shop.basket.beforePutShippingAddress</li><li>dw.ocapi.shop.basket.afterPutShippingAddress</li><li>dw.ocapi.shop.basket.shipment.shipping_method.modifyPUTResponse</li></ul>
Add Coupon POST /baskets/{basket_id}/coupons <ul><li>dw.ocapi.shop.basket.beforePostCoupon</li><li>dw.ocapi.shop.basket.afterPostCoupon</li><li>dw.ocapi.shop.basket.coupon.modifyPOSTResponse</li></ul>
Remove Coupon DELETE /baskets/{basket_id}/coupons/{coupon_item_id} <ul><li>dw.ocapi.shop.basket.beforeDeleteCoupon</li><li>dw.ocapi.shop.basket.afterDeleteCoupon</li><li>dw.ocapi.shop.basket.coupon.modifyDELETEResponse</li></ul>
Add Price Adjustment POST /baskets/{basket_id}/price_adjustments <ul><li>dw.ocapi.shop.basket.beforePostPriceAdjustment</li><li>dw.ocapi.shop.basket.afterPostPriceAdjustment</li><li>dw.ocapi.shop.basket.price_adjustment.modifyPOSTResponse</li></ul>
Delete Price Adjustment DELETE /baskets/{basket_id}/price_adjustments/{price_adjustment_id} <ul><li>dw.ocapi.shop.basket.beforeDeletePriceAdjustment</li><li>dw.ocapi.shop.basket.afterDeletePriceAdjustment</li><li>dw.ocapi.shop.basket.price_adjustment.modifyDELETEResponse</li></ul>
Submit Basket POST /orders <ul><li>dw.ocapi.shop.order.beforePOST</li><li>dw.ocapi.shop.order.afterPOST</li><li>dw.ocapi.shop.order.modifyPOSTResponse</li></ul>
Get Payment Methods GET /baskets/{basket_id}/payment_methods (first payment selection) GET /orders/{order_no}/payment_methods <ul><li>dw.ocapi.shop.basket.payment_methods.modifyGETResponse</li><li>dw.ocapi.shop.order.payment_methods.modifyGETResponse</li></ul>
Add Payment Instrument POST /orders/{order_no}/payment_instruments <ul><li>dw.ocapi.shop.order.beforePostPaymentInstrument</li><li>dw.ocapi.shop.order.afterPostPaymentInstrument</li><li>dw.ocapi.shop.order.payment_instrument.modifyPOSTResponse<ul><li>For payment integrations, use dw.order.hooks.PaymentHooks.</li></ul><li>dw.order.payment.authorize</li><li>dw.order.payment.authorizeCreditCard</li><li>dw.ocapi.shop.order.validateOrder</li></ul>
Delete Payment Instrument DELETE /orders/{order_no}/payment_instruments/{payment_instrument_id} <ul><li>dw.ocapi.shop.order.payment_instrument.modifyDELETEResponse</li><li>dw.ocapi.shop.order.validateOrder</li></ul>
Guide all basket resources <ul><li>dw.ocapi.shop.basket.validateBasket</li></ul>

Find Customers

Customer Service Center Function Resource Shop API Hooks
View Customer GET /customers/{customer_id} <ul><li>dw.ocapi.shop.customer.modifyGETResponse</li><li>dw.ocapi.shop.customer.modifyGETResponse uses OCAPI version 18.3.</li></ul>
Edit Customer PATCH /customers/{customer_id} <ul><li>dw.ocapi.shop.customer.beforePatchCustomer</li><li>dw.ocapi.shop.customer.afterPatchCustomer</li><li>dw.ocapi.shop.customer.modifyPATCHResponse</li></ul>
Create a Customer POST /customers <ul><li>dw.ocapi.shop.customer.beforePost</li><li>dw.ocapi.shop.customer.afterPost</li><li>dw.ocapi.shop.customer.modifyPOSTResponse</li></ul>
Reset Password POST /customers/password_reset POST /customers/{customer_id}/password_reset <ul><li>dw.ocapi.shop.customers.password_reset.afterPOST</li><li>dw.ocapi.shop.customer.password_reset.afterPOST The AfterPost hook triggers a customer password reset email.</li></ul>
Create an Address POST /customers/{customer_id}/addresses <ul><li>dw.ocapi.shop.customer.addresses.beforePOST</li><li>dw.ocapi.shop.customer.addresses.afterPOST</li><li>dw.ocapi.shop.customer.addresses.modifyPOSTResponse</li></ul>
Edit Address PATCH /customers/{customer_id}/addresses/{address_name} <ul><li>dw.ocapi.shop.customer.address.beforePATCH</li><li>dw.ocapi.shop.customer.address.afterPATCH</li><li>dw.ocapi.shop.customer.address.modifyPATCHResponse</li></ul>
Delete Address DELETE /customers/{customer_id}/addresses/{address_name} <ul><li>dw.ocapi.shop.customer.address.beforeDELETE</li><li>dw.ocapi.shop.customer.address.afterDELETE</li></ul>