Web API. Complete example of payload including: tracked entity instance, enrollment and event. Working?

I tried to create a TEI, enrollment and event at the same time (without including their uids), following the documentation, but I was not able to do it. Does somebody know how to do it?

The sections of the documentation that I followed were: