I think region is optional, better to change this to endpoint.get('region').