Antylogic
DemoApp login

399 operational guides

Docs sections
DocsCatalogues
Device

How to delete an allergen

Delete an editable allergen from Harbor Demo Group or Harbor Soho. Antylogic removes the allergen and its product links, keeps the products, and preserves historical catalogue data first when affected services exist.

In this article

Use this guide when a restaurant operator needs to retire a custom allergen from catalogue setup. The action is available from the Allergens table and from the editable allergen detail screen.

Deletion follows the allergen's real owner scope. A Harbor Soho allergen is deleted through the location route, an organisation allergen through Harbor Demo Group, and system allergens remain view-only.

Before you start

  • Sign in as Harbor Demo User and select Harbor Demo Group.
  • For location-level deletion, select Harbor Soho so the location context is available.
  • Use an allergen that belongs to a writable Organisation or Location scope. System allergens cannot be deleted from the app.
  • The user needs catalog:manage for the allergen's real owner scope. catalog:view is enough to see the allergen, but not to delete it.
  • For documentation captures, create or confirm a disposable allergen in the GB demo runtime before opening the delete modal.

Instructions

  1. 1.

    Open Allergens

    Go to the Catalogs area and select the Allergens tab. For the Harbor Soho example, use /location/catalogs?tab=allergens. Organisation-level allergens can be handled from /organization/catalogs?tab=allergens.

  2. 2.

    Choose a writable allergen

    Find the allergen to delete and check that it is not a System allergen. The app uses the allergen's real org_id or location_id to decide whether Delete is available.

  3. 3.

    Start from the table

    From the Allergens table, open the row menu for the disposable allergen and choose Delete. The confirmation modal is titled Delete Allergen and shows the allergen name before the destructive request is sent.

  4. 4.

    Start from detail when needed

    Alternatively, open the allergen detail page and use the Delete button at the bottom of the editable form. This path is useful when the operator wants to check Name and Color before deleting.

  5. 5.

    Confirm deletion

    Confirm only after verifying the allergen is disposable or no longer needed. The request uses the endpoint that matches the allergen's real scope and does not send an update payload.

  6. 6.

    Check the result

    After success, the Allergens list refreshes, the deleted detail cache is removed, and the app shows the deleted notification. If the action started from detail, the user returns to the Allergens tab.

  7. 7.

    Review the impact

    Deleting the allergen removes rows from product_allergens by cascade, but it does not delete products such as Beef pie, Fish and chips, or Lemon posset. Historical catalogue snapshots are preserved first when existing services in the same scope would otherwise be affected.

Validations and limits

  • selectedOrgId is required. On location surfaces, selectedLocationId is also required.
  • Allergen list and detail screens can load with catalog:view or catalog:manage, but deletion requires catalog:manage for the allergen's real owner scope.
  • The Delete action is not available in create mode, read-only routes, historical views, deleted records, or system allergen records.
  • Location allergens are deleted through DELETE /api/app/{orgId}/{locationId}/allergens/{allergenId}. Organisation allergens are deleted through DELETE /api/app/{orgId}/allergens/{allergenId}.
  • The delete endpoint uses the allergenId route segment and does not accept an update payload.
  • A successful backend response is 204 No Content.
  • If catalogue snapshot preservation, dependency reads, calendar updates, or the final delete fail, the transaction is aborted and the allergen remains.
  • For allergens there is no replacement or merge flow. Product-allergen associations are removed by cascade and products remain in the catalogue.

Expected result

The editable allergen is removed from its Organisation or Location scope, product_allergens links are cleaned up, products remain available, and historical services keep their preserved catalogue snapshot when one is needed.

Related articles