private function retrieveInitData()
    {
        // Get initialisation data
        try {
            $response = $this->client->request('GET', "/v2/init-data/$this->locale", $this->authHeaders);

            $this->processHttpResponse($response);
        } catch (\GuzzleHttp\Exception\TransferException $tex) {
            throw new Exception\ConnectionFailedException('Failed to connect to the BitRank API', $tex);
        }

        $init_data = json_decode($response->getBody(), true);

        $required = ['flags', 'scores', 'locale'];

        foreach ($required as $req) {
            if (!isset($init_data[$req])) {
                throw new Exception\InvalidDataException("Initialisation data did not contain $req data.");
            }
        }

        $this->dataVersion = $response->getHeader('X-Data-Version');

        if (is_string($this->dataVersion)) {
            // This is good.
        } elseif (is_array($this->dataVersion) && count($this->dataVersion)) {
            $this->dataVersion = $this->dataVersion[0];
        } else {
            throw new Exception\InvalidDataException('The init data response did not contain a valid X-Data-Version header.');
        }

        $init_data['dataVersion'] = $this->dataVersion;

        return $init_data;
    }