Open AleksandrMolchagin opened 3 months ago
All active regions will be retrieved through the following query:
SELECT Id, Value, Label, DurableId, EntityParticleId, ValidFor, IsActive FROM PicklistValueInfo WHERE EntityParticle.EntityDefinition.QualifiedApiName = 'Account' AND EntityParticle.QualifiedApiName = 'Region__c' AND isActive = TRUE
Description
Some regions in the enrollment flows are not active or valid and should not appear in any selector. We need a new endpoint to return only active regions.
Possible strategy1) Retrieve allTeamSeasons
2) FilterTeamSeasons
based on their start date (to determine whether they are active or not)3) Getregions
through the following relationTeam_Season__r.Team__r.School_Site__r.Region__c
Endpoint:
GET /api/regions/active
Response:
~~