feat: add /retrieve-age-band (SIM swap age band) endpoint#273
feat: add /retrieve-age-band (SIM swap age band) endpoint#273KeldaAnders wants to merge 5 commits into
Conversation
…ge band only Returns the standardized simSwapAgeBandEnum only; excludes the swapped Boolean (/check) and the change date (/retrieve-date) per the 2026-04-29 ad-hoc agreement (camaraproject#253) and TEF stance (camaraproject#260).
|
@KeldaAnders For our largest customer (40 million accounts) requires a more granular age band (they use 72 hours). Can you add more age bands in the first week to accomodate this ? |
|
@KeldaAnders And what to return in the first 24 hours if your regulator only allows days as minimum recency ? And what is there is an upper limit that is allowed to be returned ?? |
|
@HuubAppelboom Thanks for sharing both points. On finer granularity in the first week (your 72h case). Granularity at the recent end (where time-sensitive decisions cluster) is reasonable. A couple of things to align on first: The enum is a standardized, cross-operator set (the agreement behind #253/#260), so the goal is to choose standard boundaries that let common decision thresholds land on a band edge — rather than adding customer-specific bands, which would fragment the standard and break interoperability. Your 72h example is a good illustration of a potential gap: 72h = 3d falls inside the current
That makes a 72h cut expressible without any per-customer logic. Could you share the full set of thresholds your customers actually decide on (72h noted) and the associated business value? If we collect those (e.g. 24h / 48h / 72h / 7d), I'll propose a revised standard band set to the WG that keeps fine granularity in the first days and stays coarse later. On day-level granularity and the upper limit. First, adding a The monitored-period / retention context is already fully served by So a consumer that needs the provider's monitored window — or whether the event predates it — uses For
TL;DR: @jpengar @bigludo7 @shilpa-padgaonkar — does that separation work for you? |
|
@KeldaAnders For us it is sufficient to add the 72 hours band, that seems to be the standard here, but maybe others have different use cases as well. In any case, would it hurt to add 96 hours as well ?? Regarding telco's that are only allowed a precision of at least 24 hours, I have a different proposal. In stead of returning a single band as the answer, simply allow for example "<=3" (in stead of 1, 2 or 3). That indicates that it should fall in category 1,2 or 3. Likewise for the upper range, if you don't want to go further than for example than 1 year back, you simply provide ">=13" in stead of 13, 14 or 15. That way it is self contained, no extra parameters are required, and these cases can also be covered. |
|
72h / 96h bands — accepted. I'm adding both boundaries. The old
That gives clean 72h and 96h cut points, and the set runs On the The notation changes the response field from a plain A fixed integer band set ( @jpengar @bigludo7 @shilpa-padgaonkar — assuming the 72h/96h additions look good, can we proceed to approval? |
…enumber to 1-17 Signed-off-by: Kelda <kelda.anders@gmail.com>
…missing data), and consistent 'SIM swap event' wording Signed-off-by: Kelda Anders <kelda.anders@gmail.com>
Title: feat: add
/retrieve-age-band(SIM swap age band) endpointAdds a standalone, single-purpose operation that returns a standardized SIM swap recency band (
simSwapAgeBand) only. Supersedes #266 (which was opened frommainby mistake) and incorporates that PR's review feedback. Targeting release 2.1.0.What type of PR is this?
What this PR does / why we need it:
Adds
POST /retrieve-age-bandto the SIM Swap API: an alternative way to expose SIM swap recency for providers that do not expose the exact SIM swap date. It returns a time-bucketed value indicating how recently a SIM swap/activation occurred — and nothing else./checkand/retrieve-date(and their schemas, request bodies, and examples) are preserved unchanged. The only additions are the new path, theSimSwapAgeBand/SimSwapAgeBandInfo/CreateSimSwapAgeBandschemas, theAGEBAND_*examples, the new scope, and the related description updates.swappedBoolean (/check) or the SIM change timestamp (/retrieve-date).check/retrieve-date; support depends on the provider's capabilities and commercial use case.1–15represent increasing recency bands (4h → 3y+);999indicates no SIM swap event was found. When the information is unavailable for the subscriber, the request returns422 SERVICE_NOT_APPLICABLE.sim-swap:retrieve-age-band, alongsidesim-swap:check,sim-swap:retrieve-date, and the API-levelsim-swapscope.Adding a new endpoint is backward-compatible, so this targets a MINOR bump to 2.1.0 (URL path unchanged:
/sim-swap/v2).Which issue(s) this PR fixes:
Fixes #260
Fixes #253
Changes after the #266 review
simSwapAgeBandEnumtosimSwapAgeBand(the schema already defines it as an enum). — per @jpengar-1is removed; unavailable information is now an error (422 SERVICE_NOT_APPLICABLE) rather than mixing time-bucket and error semantics. — per @jpengar / @bigludo7Special notes for reviewers:
999for "no SIM swap found." @jpengar proposed instead making the fieldnullable: trueand returningnull, keeping the enum1–15; @bigludo7 raised whetherinteger+nullis valid (it is, vianullable: truein OAS 3.0.x). Please confirm which you prefer and I'll align.SERVICE_NOT_APPLICABLE. Please confirm this is the right Commonalities code or whether a dedicated one is preferred./checkor/retrieve-date. Supersedes Update sim-swap | add /retrieve-age-band endpoint returning age band … #266 and addresses the scope concern from Update sim-swap.yaml with age band #254.Changelog input
Additional documentation
This section can be blank.
This PR is opened from the feature branch
KeldaAnders:feat/sim-swap-age-band-endpointand supersedes the previously opened PR #266 which was created frommain.