I am inserting in programId=lxAQ7Zs9VYR and orgUnit=DiszpKrYNg8
This is the payload, I am sending as POST in https://play.dhis2.org/dev/api/33/trackedEntityInstances
Payload
{
"trackedEntityType": "nEenWmSyUEp",
"orgUnit": "DiszpKrYNg8",
"attributes": [
{
"attribute": "w75KJ2mc4zz",
"value": "Ankit"
},
{
"attribute": "zDhUuAYrxNC",
"value": "Hans"
},
{
"attribute": "cejWyOfXge6",
"value": "Male"
}
],
"enrollments": [
{
"orgUnit": "DiszpKrYNg8",
"program": "lxAQ7Zs9VYR",
"enrollmentDate": "2021-09-15",
"incidentDate": "2021-09-15",
"events": [
{
"program": "q04UBOqq3rp",
"orgUnit": "DiszpKrYNg8",
"eventDate": "2021-10-17",
"status": "COMPLETED",
"storedBy": "admin",
"dataValues": [
{
"dataElement": "sWoqcoByYmD",
"value": "No"
}
]
}
]
}
]
}
Response
{
"httpStatus": "OK",
"httpStatusCode": 200,
"status": "OK",
"message": "Import was successful.",
"response": {
"responseType": "ImportSummaries",
"status": "SUCCESS",
"imported": 1,
"updated": 0,
"deleted": 0,
"ignored": 0,
"importOptions": {
"idSchemes": {},
"dryRun": false,
"async": false,
"importStrategy": "CREATE_AND_UPDATE",
"mergeMode": "REPLACE",
"reportMode": "FULL",
"skipExistingCheck": false,
"sharing": false,
"skipNotifications": false,
"skipAudit": false,
"datasetAllowsPeriods": false,
"strictPeriods": false,
"strictDataElements": false,
"strictCategoryOptionCombos": false,
"strictAttributeOptionCombos": false,
"strictOrganisationUnits": false,
"requireCategoryOptionCombo": false,
"requireAttributeOptionCombo": false,
"skipPatternValidation": false,
"ignoreEmptyCollection": false,
"force": false,
"firstRowIsHeader": true,
"skipLastUpdated": true,
"mergeDataValues": false,
"skipCache": false
},
"importSummaries": [
{
"responseType": "ImportSummary",
"status": "SUCCESS",
"importOptions": {
"idSchemes": {},
"dryRun": false,
"async": false,
"importStrategy": "CREATE_AND_UPDATE",
"mergeMode": "REPLACE",
"reportMode": "FULL",
"skipExistingCheck": false,
"sharing": false,
"skipNotifications": false,
"skipAudit": false,
"datasetAllowsPeriods": false,
"strictPeriods": false,
"strictDataElements": false,
"strictCategoryOptionCombos": false,
"strictAttributeOptionCombos": false,
"strictOrganisationUnits": false,
"requireCategoryOptionCombo": false,
"requireAttributeOptionCombo": false,
"skipPatternValidation": false,
"ignoreEmptyCollection": false,
"force": false,
"firstRowIsHeader": true,
"skipLastUpdated": true,
"mergeDataValues": false,
"skipCache": false
},
"importCount": {
"imported": 1,
"updated": 0,
"ignored": 0,
"deleted": 0
},
"conflicts": [],
"reference": "u3tS9AS2brA",
"href": "https://play.dhis2.org/dev/api/trackedEntityInstances/u3tS9AS2brA",
"enrollments": {
"responseType": "ImportSummaries",
"status": "SUCCESS",
"imported": 0,
"updated": 0,
"deleted": 0,
"ignored": 0,
"importSummaries": [],
"total": 0
}
}
],
"total": 1
}
}



if you have any other doubts feel free to ask.