Once a custom unit has been created for a client, it is not possible to enrol in the standard version of that unit via API.
The way the API system operates is if a client has one custom unit, that custom unit will be the unit version that is enrolled regardless of whether an edition code is included or not.
If a client does require the standard version as well as their custom version, our current process is to create a second custom unit (that is identical to our standard version) with its own edition code. It will then follow the process below:
Clients that have two or more versions of a unit with the same unit code, will mean that each version should have an edition code. In this circumstance (as we discussed this morning) to target a specific version the edition code should be supplied along with the unit code
i.e "unit_code": "CHCDIV003 (EPEC)".
If no edition code is supplied, then the fallback behaviour is to enrol into the first unit it can find (which is almost always the first custom unit created).
In a circumstance where there are two or more custom versions where one doesn't have an edition code, it will actually enrol into the custom version without an edition code. We implemented this as a fallback option in case an edition code was missed.
We, however, would strongly recommend all versions (where there are multiple versions of a unit_code) have an edition code, so that they can be appropriately targeted by the API - and prevent confusion down the line.
Comments
0 commentsArticle is closed for comments.