code: public function handleSynchronizationRequest(Request $request, $token = null)
      {
          $data = json_decode($request->get('payload'), false);
  
          if (JSON_ERROR_NONE !== json_last_error()) {
              throw new Exception(400, 'The JSON data cannot be parsed');
          } elseif (false === isset($data->repository->url)) {
              throw new Exception(400, 'The JSON data does not contain the required information');
          }
  
          if (false === $this->synchronize($data->repository->url, $token)) {
              throw new Exception(500, 'Internal error', $data->repository->url);
          }
  
          return new Response('', 204);
      }
docs: Handles a synchronization request
  
  @param Request         $request The request
  @param string          $token   The token
  
  @return Response The response