Adding values to referential entity using REST API POST I have 2 custom content type. One is movies and the other is actors. I am using REST API POST to add values into movies. Actor is a referential entity within movies. How do I add values into actors which are corresponding to a particular movie when I use POST?

An option that I am currently trying out is add multiple values into actors first and that POST will return a node id, use that node id value along POST values to movies. Is this the right approach?
You can see the article about create Custom Rest Resources for POST 

You can reference below code below

$node_actor = Node::create(
      ['type' =&gt; 'actor',// the content type
        'title' =&gt; 'Actor Name',
      ]
    );
   $actor_id = $node_actor-&gt;save();


After you can use $actor_id had node reference to movie

$node_movie = Node::create(
   ['type' =&gt; 'movie',// the content type
    'title' =&gt; 'Movie Name',
   ]
  );
  $node_movie-&gt;set('field_actor_ref',['target_id'=&gt;$actor_id])
  $node_movie-&gt;save();