Skip to main content
Sitecore Documentation
  • Learn
  • Downloads
  • Changelog
  • Roadmap
CDPCloud Portal
Sitecore CDP Developer Documentation
  • Developing with Sitecore CDP
    • Authentication
    • Base URL
    • Batch file formatting requirements
        • Sending offline orders
        • Order data model
        • Order data model for flight
        • Send additional order data
        • Order extension data model
        • Order item data model
        • Send additional order items data
        • Order item extension data model
        • Flight segments data model
        • Using order delete
        • Order delete data model
  1. Batch API Offline orders
  1. Batch API
  2. Batch API Offline orders
  3. Using order delete

Using order delete

The Order Delete endpoint in the Sitecore CDP Batch API enables you to delete an order and all order items associated with the order. After you delete an order, it is no longer visible in the guest profile. You cannot undo this operation. After you delete an order, you cannot retrieve the order or any related order items.

The Order Delete API uses a combination of the referenceId and orderedAt values to identify the order to delete. This is because some organizations recycle referenceId values so providing the orderedAt value ensures you are identifying the correct order for deletion.

To delete an order, you must upload a batch file containing the order. You must use delete mode.

The Order Delete endpoint then attempts to find any orders that match the referenceId and orderedAt values:

  • If the Order Delete endpoint finds one order with a matching referenceId value, the Order Delete endpoint returns a 200 Response Order and associated entities deleted. The order is permanently deleted along with its order items.

  • If the Order Delete endpoint finds more than one order with the same referenceId value and you didn't provide a date for the orderedAt value, the Order Delete endpoint returns a 400 Response  More than one order exists with that referenceId, please supply the orderedAt date for the order you wish to delete.

  • If the Order Delete endpoint doesn't find an order with the provided referenceId value and orderedAt value, the Order Delete endpoint returns a 404 Response No order found for the provided referenceId and orderedAt attributes.

If you have suggestions for improving this article, let us know!

Documentation Assistant

This assistant uses AI to generate responses based on Sitecore documentation. While it has access to official sources, answers may be incomplete or inaccurate and should not be considered official advice or support.
Powered by
k
kapa.ai
Protected by reCAPTCHA

© Copyright 2026, Sitecore A/S or a Sitecore affiliated company.
All rights reserved.

Privacy policySitecore Trust CenterTerms of use