Loading...
Area: Episerver Product Recommendations, Episerver Personalized Search & Navigation, Episerver Content Recommendations
Applies to versions: Not applicable

Order cancellations

Recommendations [hide]

This topic describes how to manage order cancellations, when using the personalization service as part of the Episerver Personalization product suite. When a visitor creates an online order and then cancels it, you need to inform Episerver of the cancellation.

Online order cancellations

To cancel an online order, submit a POST request with an active session, a cuid, and an orderNo. These do not need to match the session and CUID that were used when the order was placed, but these will be used if the order is cancelled within the same session.

POST https://<clientname>.peerius.episerver.net/tracker/api/<apiversion>/<sitename>/order/cancel.pagex

Request Parameters:

  • session. current_sessionid
  • cuid. current_cuid
  • orderNo. orderref123

Test your API calls using the user acceptance testing (UAT) server prior to adding code to your production server or live website. Also discuss with your Episerver contact before implementing order updates and cancellations so these can be enabled within Episerver Personalization.

Parameters may be passed in the API URL after a question mark (/cancel.pagex?session=...&cuid=...&orderNo=...) or in the request body of a POST request that uses 'application/x-www-form-urlencoded' content type. 

For example:

https://my-site.peerius.episerver.net/tracker/api/v1_4/mysite/order/cancel.pagex?session=123456789012|a1b2c3d4e5A6B7C8D9E0f1g2h3i4j5F1G2H3I4J5k1l&cuid=09876543210|Z0Y9X8W7V6z5y4x3w2v1U0T9S8R7Q6u5t4s3r2q1P0O&orderNo=ABC-DE-123456

Offline order cancellations

Similarly, when a visitor creates an offline order and then cancels it, you need to inform Episerver of the cancellation.

To cancel offline orders, submit a DELETE request with the order number to the offline orders endpoint. The siteName, channel and siteToken values should be the same as those used to create the order. For confirmation of these values contact Episerver.

DELETE https://<clientname>.peerius.episerver.net/smart-api/orders/offline/<order_number>

Request Headers:

  • site. sitename
  • siteToken. token123
  • Content-Type. application/json
  • channel. store

For example:

https://my-site.peerius.episerve

Test your API calls using the user acceptance testing (UAT) server prior to adding code to your production server or live website. Also discuss with your Episerver contact before implementing order updates and cancellations so these can be enabled within Episerver Personalization.

Do you find this information helpful? Please log in to provide feedback.

Last updated: Dec 23, 2019

Recommendations [hide]