Creating a node via REST - Entity reference field value not updating
I managed to get working by changing this...

'entity_reference_field' =&gt; array(
  'target_id' =&gt; $entity_id,
),


to this...

'entity_reference_field' =&gt; array(
  array('target_id' =&gt; $entity_id),
),


I also had to disable using an entity reference view as the 'Reference type' on the field and just have the option as 'Default'. Not sure if this is a bug or if there's something wrong with my entity reference view.