HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunitySubmit a ticketLog In
GitHubNuGetDev CommunitySubmit a ticket


When a visitor creates an online order and then cancels it, you need to inform Optimizely of the cancellation.

Note

Test your API calls using the user acceptance testing (UAT) server prior to adding code to your production server or live website. Also, before implementing, contact Optimizely to enable order updates and cancellations in Optimizely Personalization.

## Cancel online orders

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 are used if the order is cancelled within the same session.

ο»Ώ

Request Parameters:

  • **session**. current\_sessionid

  • **cuid**. current\_cuid

  • **orderNo**. orderref123

You can pass parameters 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:

ο»Ώ

## Cancel offline orders

When a visitor creates an offline order and then cancels it, you need to inform Optimizely 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 Optimizely.

ο»Ώ

Request Headers:

  • **site** – sitename

  • **siteToken** – token123

  • **Content-Type** – application/json

  • **channel** – store

For example:

ο»Ώ