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:

https://docs.dhis2.org/master/en/developer/html/dhis2_developer_manual_full.html#webapi_create_enroll_tei

https://docs.dhis2.org/master/en/developer/html/dhis2_developer_manual_full.html#webapi_create_enroll_tei_create_event