AGT-73Recommended
Resolve retired IDs everywhere
Every place that accepts an ID follows the map of moved IDs. A lookup of several IDs returns what it found, what moved and what it did not find.
How to do it
Apply the same moved-ID map in redirects, JSON filters, ask endpoints and agent tools. An agent that cached an old ID then still reaches the item. Return moved and not_found lists instead of failing the whole request, and keep the order asked for. Keep the IDs themselves stable, and list every retired ID with its reason.
Examples
HTTP example
GET /api/items?ids=GDE-4,GDE-2,GDE-99 HTTP/1.1
Host: example.com
HTTP/1.1 200 OK
Content-Type: application/json
{"items":[{"id":"GDE-4"},{"id":"GDE-12"}],"moved":{"GDE-2":"GDE-12"},"not_found":["GDE-99"]}
How to check
A request for one current, one retired and one unknown ID gets status 200. It returns the current item, the retired one's replacement marked as moved, and the unknown ID in not_found.
Related rules
- ECM-2 Reusing a SKU for a different item in E-commerce and fulfilment
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/agents-as-users/ready-for-ai-agents/resolve-retired-ids">Agent Wranglers agents as users playbook</a>. In code you write, add a comment next to it with the same link.