Skip to content

Removing Events

Delete (Remove) a Wholechain Event

To delete a Wholechain event from your traceability history, call the Remove Event endpoint and provide:

  • The Event ID of the event you want to remove (the same eventId you used when you originally ran the event)
  • Your API key (for authentication)

Removing an event deletes that event record so you can re-run it with corrected values if needed.


Key rule: you can only remove the most recent event

An event can only be removed if it is the last event that was run (i.e., the most recent event in the event chain).

If the event you want to remove is not the latest one, you must remove events in reverse order until the target event becomes the most recent.


Remove Event endpoint

Method: DELETE
URL: https://connect.wholechain.com/Integration/Events/{EVENT_ID}

Authentication: API key required via request header

Required inputs

Input Where it goes Example
EVENT_ID URL path parameter commissioning_123ABC
API key Request header (X-API-KEY) your-api-key-here

Request example

{
  "method": "DELETE",
  "url": "https://connect.wholechain.com/Integration/Events/{EVENT ID}",
  "headers": {
    "accept": "text/plain",
    "X-API-KEY": "{API KEY}"
  }
}

Example: remove a commission event

If you created and ran a commission event with the Event ID commissioning_123ABC, remove it by calling the Remove Event endpoint with that eventId.

DELETE https://connect.wholechain.com/Integration/Events/commissioning_123ABC
X-API-KEY: YOUR_API_KEY

Example: fix a mistake in the middle of a chain (remove in reverse order)

Imagine you ran these events in order: 1. receive (older) 2. transform (mistake here) 3. ship (most recent)

You cannot remove the transform event until it becomes the most recent event. That means you must: 1. Remove the ship event first 2. Then remove the transform event 3. Re-run the corrected transform event 4. Re-run the ship event

Step 1 — remove the ship event

If the ship event ID is ship_ABC123:

DELETE https://connect.wholechain.com/Integration/Events/ship_ABC123
X-API-KEY: YOUR_API_KEY

Step 2 — remove the transform event

If the transform event ID is transform_ABC456

DELETE https://connect.wholechain.com/Integration/Events/transform_ABC456
X-API-KEY: YOUR_API_KEY

Step 3 — re-run your corrected events

After the incorrect event is removed, re-run

  • the corrected transform using transform_ABC456 (or your chosen eventId) with the correct values
  • then re-run ship using ship_ABC123 (or your chosen eventId) with the correct values

Important note: removing an event affects all lots (locks) in that event

Events in Wholechain are atomic. If you want to correct one specific lot (lock) within an event, you must remove the entire event.

This means:

  • You cannot remove, edit, update, or delete an individual lot (lock) within an event.
  • When an event is removed, all lots (locks) that were created or manipulated in that event are also removed.
  • Any changes made to other lots in the same event—such as quantity updates, splits, merges, or transformations—will be fully rolled back.

What this means in practice

If an event included multiple lot operations (for example, creating several lots, transforming multiple inputs, or adjusting quantities across lots), and you only need to correct one of those lots:

  • You must remove the entire event.
  • All lots affected by that event will be reverted as if the event never occurred.
  • You must then re-run the event with all correct values, including:
  • the corrected lot (lock) data, and
  • any other lot manipulations that were originally part of that event.

Example scenario

If a transform event:

  • created Lot A,
  • updated Lot B, and
  • incorrectly adjusted Lot C,

you cannot remove or fix only Lot C. Removing the transform event will also remove the creation of Lot A and the update to Lot B. You will need to re-run the transform event with all intended lot changes correctly defined.

This behavior ensures data integrity and preserves a consistent, auditable traceability chain.