Do you know about the MicrositeURL() AMPScript function? It’s relatively new. It sure is handy if you’re building custom preference centers in Enterprise 2.0 business units.
The idea is that you can encrypt custom parameters in your email links to Microsite pages and then retrieve the unencrypted values with an AMPScript function. Once you have the business unit MID in the microsite page, you can use it to ensure your API calls are for the correct business unit.
In your email you would have this code:
<a href='%%=MicrositeURL(888888,"subscriberMID", "12345678")=%%'>Update Profile</a>
The 888888 is the Page ID of the Microsite page, and 12345678 is the business unit MID for the originating email send.
In your Microsite page, you’d have the following AMPScript block:
%%[ var @subscriberMID set @subscriberMID = iif(empty(RequestParameter("subscriberMID")),memberid, RequestParameter("subscriberMID")) ]%%
In the case where the the subscriberMID is not set, default to the parent business unit’s MID, which is accessible from the memberid personalization string.