We have a use case where we have integrated Target and analytics audience to deliver content through delivery API. For this request, we need to pass the marketing cloud visitor ID in API request alongwith the customer ID to fetch the relevant target content. But currently we are reading the MCID from the web and using it in API. We want to dynamically fetch the mcid in API request. We are currently using Postman application for the API requests. We tried using the getMarketingCloudVisitorID function in the pre-request script to populate the mcid; but it does not works and throws error.
Can anyone please suggest a way to dynamically fetch the MCID in Target API through the pre-request scripts or some other modifications that we can make in the API request?