protected function patchItems( \Aimeos\MW\View\Iface $view, ServerRequestInterface $request, ResponseInterface $response )
	{
		$body = (string) $request->getBody();

		if( ( $payload = json_decode( $body ) ) === null || !isset( $payload->data ) ) {
			throw new \Aimeos\Admin\JsonAdm\Exception( sprintf( 'Invalid JSON in body' ), 400 );
		}

		$manager = \Aimeos\MShop::create( $this->getContext(), $this->getPath() );

		if( is_array( $payload->data ) )
		{
			$data = $this->saveData( $manager, $payload );

			$view->data = $data;
			$view->total = count( $data );
			$response = $response->withHeader( 'Content-Type', 'application/vnd.api+json; ext="bulk"; supported-ext="bulk"' );
		}
		elseif( ( $id = $view->param( 'id' ) ) != null )
		{
			$payload->data->id = $id;
			$data = $this->saveEntry( $manager, $payload->data );

			$view->data = $data;
			$view->total = 1;
		}
		else
		{
			throw new \Aimeos\Admin\JsonAdm\Exception( sprintf( 'No ID given' ), 400 );
		}

		return $response;
	}