Customer Service Center Hooks

Use the Shop API hooks to customize Customer Service Center.

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

CSC FunctionResourceShop API Hooks
Search ordersPOST /order_search
  • 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.
  • Previously, the two separate search filter criteria were required to filter a date range.
dw.ocapi.shop.order_search.modifyPOSTResponse
Open an orderGET /orders/{order_no}dw.ocapi.shop.order.modifyGETResponse
Add a notePOST /orders/{order_no}/notesdw.ocapi.shop.order.note.modifyPOSTResponse
Customer Service Center FunctionResourceShop API Hooks
New orderPOST /baskets GET /baskets/{basket_id}
  • dw.ocapi.shop.basket.modifyPOSTResponse
  • dw.ocapi.shop.basket.modifyGETResponse
Set CustomerPUT /baskets/{basket_id}/customer
  • dw.ocapi.shop.basket.beforePutCustomer
  • dw.ocapi.shop.basket.afterPutCustomer
  • dw.ocapi.shop.basket.customer.modifyPUTResponse
Set Billing AddressPUT /baskets/{basket_id}/billing_address
  • dw.ocapi.shop.basket.beforePutBillingAddress
  • dw.ocapi.shop.basket.afterPutBillingAddress
  • dw.ocapi.shop.basket.billing_address.modifyPUTResponse
Set Shipping AddressPUT /baskets/{basket_id}/shipments/{shipment_id}/shipping_address
  • dw.ocapi.shop.basket.shipment.beforePutShippingAddress
  • dw.ocapi.shop.basket.shipment.afterPutShippingAddress
  • dw.ocapi.shop.basket.shipment.shipping_address.modifyPUTResponse
Add ProductPOST /baskets/{basket_id}/items
  • dw.ocapi.shop.basket.items.beforePOST
  • dw.ocapi.shop.basket.items.afterPOST
  • dw.ocapi.shop.basket.items.modifyPOSTResponse
Update Product Item (such as quantity and custom propertiesPATCH /baskets/{basket_id}/items/{item_id}
  • dw.ocapi.shop.basket.beforePatchItem
  • dw.ocapi.shop.basket.afterPatchItem
  • dw.ocapi.shop.basket.item.modifyPATCHResponse
Remove a product itemDELETE /baskets/{basket_id}/items/{item_id}
  • dw.ocapi.shop.basket.beforeDeleteItem
  • dw.ocapi.shop.basket.afterDeleteItem
  • dw.ocapi.shop.basket.item.modifyDELETEResponse
Set shipping methodPUT /baskets/{basket_id}/shipments/{shipment_id}/shipping_method
  • dw.ocapi.shop.basket.beforePutShippingAddress
  • dw.ocapi.shop.basket.afterPutShippingAddress
  • dw.ocapi.shop.basket.shipment.shipping_method.modifyPUTResponse
Add CouponPOST /baskets/{basket_id}/coupons
  • dw.ocapi.shop.basket.beforePostCoupon
  • dw.ocapi.shop.basket.afterPostCoupon
  • dw.ocapi.shop.basket.coupon.modifyPOSTResponse
Remove CouponDELETE /baskets/{basket_id}/coupons/{coupon_item_id}
  • dw.ocapi.shop.basket.beforeDeleteCoupon
  • dw.ocapi.shop.basket.afterDeleteCoupon
  • dw.ocapi.shop.basket.coupon.modifyDELETEResponse
Add Price AdjustmentPOST /baskets/{basket_id}/price_adjustments
  • dw.ocapi.shop.basket.beforePostPriceAdjustment
  • dw.ocapi.shop.basket.afterPostPriceAdjustment
  • dw.ocapi.shop.basket.price_adjustment.modifyPOSTResponse
Delete Price AdjustmentDELETE /baskets/{basket_id}/price_adjustments/{price_adjustment_id}
  • dw.ocapi.shop.basket.beforeDeletePriceAdjustment
  • dw.ocapi.shop.basket.afterDeletePriceAdjustment
  • dw.ocapi.shop.basket.price_adjustment.modifyDELETEResponse
Submit BasketPOST /orders
  • dw.ocapi.shop.order.beforePOST
  • dw.ocapi.shop.order.afterPOST
  • dw.ocapi.shop.order.modifyPOSTResponse
Get Payment MethodsGET /baskets/{basket_id}/payment_methods (first payment selection) GET /orders/{order_no}/payment_methods
  • dw.ocapi.shop.basket.payment_methods.modifyGETResponse
  • dw.ocapi.shop.order.payment_methods.modifyGETResponse
Add Payment InstrumentPOST /orders/{order_no}/payment_instruments
  • dw.ocapi.shop.order.beforePostPaymentInstrument
  • dw.ocapi.shop.order.afterPostPaymentInstrument
  • dw.ocapi.shop.order.payment_instrument.modifyPOSTResponse
    • For payment integrations, use dw.order.hooks.PaymentHooks.
  • dw.order.payment.authorize
  • dw.order.payment.authorizeCreditCard
  • dw.ocapi.shop.order.validateOrder
Delete Payment InstrumentDELETE /orders/{order_no}/payment_instruments/{payment_instrument_id}
  • dw.ocapi.shop.order.payment_instrument.modifyDELETEResponse
  • dw.ocapi.shop.order.validateOrder
Guideall basket resources
  • dw.ocapi.shop.basket.validateBasket
Customer Service Center FunctionResourceShop API Hooks
View CustomerGET /customers/{customer_id}
  • dw.ocapi.shop.customer.modifyGETResponse
  • dw.ocapi.shop.customer.modifyGETResponse uses OCAPI version 18.3.
Edit CustomerPATCH /customers/{customer_id}
  • dw.ocapi.shop.customer.beforePatchCustomer
  • dw.ocapi.shop.customer.afterPatchCustomer
  • dw.ocapi.shop.customer.modifyPATCHResponse
Create a CustomerPOST /customers
  • dw.ocapi.shop.customer.beforePost
  • dw.ocapi.shop.customer.afterPost
  • dw.ocapi.shop.customer.modifyPOSTResponse
Reset PasswordPOST /customers/password_reset POST /customers/{customer_id}/password_reset
  • dw.ocapi.shop.customers.password_reset.afterPOST
  • dw.ocapi.shop.customer.password_reset.afterPOST The AfterPost hook triggers a customer password reset email.
Create an AddressPOST /customers/{customer_id}/addresses
  • dw.ocapi.shop.customer.addresses.beforePOST
  • dw.ocapi.shop.customer.addresses.afterPOST
  • dw.ocapi.shop.customer.addresses.modifyPOSTResponse
Edit AddressPATCH /customers/{customer_id}/addresses/{address_name}
  • dw.ocapi.shop.customer.address.beforePATCH
  • dw.ocapi.shop.customer.address.afterPATCH
  • dw.ocapi.shop.customer.address.modifyPATCHResponse
Delete AddressDELETE /customers/{customer_id}/addresses/{address_name}
  • dw.ocapi.shop.customer.address.beforeDELETE
  • dw.ocapi.shop.customer.address.afterDELETE