Please make sure you are checking the OData field - UserILRSummary_PriorAttainment2122 for the accurate code.
The UserILRSummary_PriorAttainment field is populated when learners are on an onboarding programme and uses a different list of codes to the UserILRSummary_PriorAttainment2122 field.
The UserILRSummary_PriorAttainment2122 field will be populated once the learner moves over to a delivery programme and there is an ILR aim with the Funding Model of 35, 36, 37, 70, 99 or 81.