Create supplier through API - address creation

I am trying to create a supplier through API, but I can’t automatically create the address.

Here is my php code :

The address is always created as invalid.

I also tried to replace the $address_array by [‹ id ›=>$address_id] for the partnerAddressList but i get a concurent modification error.

What am i missing to create a valid address on the fly in my request ?

take a different approach, use axelor domain for setting rather php

hello siddique,

i’m not sure what you mean by that, do you mean that I can change the creation rules in the xml domains to allow addresses to be persisted on the fly ?

i am saying, create one controller method and read all post data there and then create whatever you like