Post data to program into dhis2 returning success but data sent through the api could no be found

I am trying to post into program from an angular based extension.

I am getting a successful response from the server but the data could not be found when searching for it.

Is there anything missing?

let attributes = [

      {attribute: "OcuwLhE6Gu0", value: "H0000001496"},

      {attribute: "lhMhyp9F1kg", value: "post from angular8"},

      {attribute: "v4nxGLRD3n8", value: "inactive"},

      {attribute: "rgBt6xSDLPp", value: "The family moved to other country"}


    let data = {

      trackedEntityType: "w8K4RIh1TRU",

      orgUnit: "rDsA2t3fk8J",

      attributes: attributes


And here is the response:


1 Like

Couple of things could be a reason for this,

  1. First of all check the post URL and confirm you are looking for the data in correct place where you are posting.
  2. {attribute: “v4nxGLRD3n8”, value: “inactive”}—are you deactivated/deleted client mistakenly?
  3. orgUnit: “rDsA2t3fk8J”— are you looking for the data under appropriate org unit?

Hope you already covered these if not recheck these. Wish you good luck to your successful submission :slight_smile:

Thanks Sarder for your reply. I think I found a solution. Data is being uploaded properly, but I need to use another api to enroll it into specific program.