Create org success but then immediately use org id to create Person and fails

Hi All,

I have some code which first creates an org. Then with the org_id returned, I use it to create a Person and assign it to that org_id.

However, when I run the POST request to create the person, it comes back saying this organization with this org_id is not found.

I suspect that somehow the newly create Org hasn’t been committed yet to the DB. Can someone verify if this is the case?

And how should I handle it then if I want to create an org and then immediately assign a Person to this org?

what’s the proper way to do this?