private function getApiEndpoint($endpoint, $orcid = null)
    {
        $url  = 'https://';
        $url .= $this->level . '.';
        $url .= (!empty($this->environment)) ? $this->environment . '.' : '';
        $url .= self::HOSTNAME;
        $url .= '/v' . self::VERSION . '/';
        $url .= $orcid ?: $this->getOrcid();
        $url .= '/' . $endpoint;

        return $url;
    }