Program Enrollment via Web API

Hey all
I am trying to copy data from a third party app to DHIS2 using Tracker Data Capture. But I am confused regarding the flow.
I have a Program, say Family Registration. This program has a child program, set via Relations, Members Registered. Family Registration uses Family Entity Type and Members Registered use Family Member Entity Type.
Now I can create a new registration using UI, but I have more than 10K rows for these forms/programs doing them via UI is not possible. Also that app has new data every few days so my bridge (between App and DHIS) will run every other day.

This is what I understand regading the flow for new enrollment.

I am to make a new enrollment so I understand I’ll make a POST request to /api/enrollments,
but what will be my parameters?
What I understand is I might need to generate a POST request to /api/trackedEntityInstances using attributes from GET request to /api/trackedEntityTypes and use UID from these two in enrollment, but again what will be my parameters.

After filling Family Registration I have to add a Relation (Family Member Program). I’ll most probably will be doing same as above and then create a relation? ( I am asking, as I am lost with this part).

If someone can help me understand this it would be great or if someone can guide me to the right material that would be great too.

Thanks & Regards

1 Like