modified API to get base_path from payload