Trying to create department but getting error
Haseeb.Ahmad9092
Posts: 5 🌱
I am trying to create a department using valence API, I am sending the data to route:/d2l/api/lp/1.12/orgstructure/ and the data I am sending is the following:
{"Type":101,
"Name":"Test",
"Code":"TestCode",
"Parents":[{"number":6606}]
}
But I keep getting the following:
"{\"Errors\":[{\"Message\":\"Parents list cannot be empty.\"}]}"
Tagged:
Answers
-
Hi @Haseeb Ahmad,
As a starting point, I think the "Parents" array is meant to just have comma-separated org-unit IDs and not a JSON object. Try changing it to this, and see if your problem persists:
"Parents": [6606]
Hope this helps!