Non-existent sub account cannot be created because it exists

Jump to solution
tamphol
Community Member

Has anyone seen this behaviour of and known the solution to this?

POST https://<host>/api/v1/accounts/94/sub_accounts with data: account[name]=Sub account name and account[sis_account_id]=2702. You get 400 Bad Request with the content:

{
"errors": {
"sis_source_id": [
{
"attribute": "sis_source_id",
"type": "SIS ID \"2702\" is already in use",
"message": "SIS ID \"2702\" is already in use"
}
]
}
}‍‍‍‍‍‍‍‍‍‍‍

Then you GET https://<host>/api/v1/accounts/sis_account_id:2702. You get 404 Not Found with the content:

{
"errors": [
{
"message": "The specified resource does not exist."
}
]
}

This happens to at least two sub accounts from two different parent accounts. 

1 Solution
tamphol
Community Member
Author

With inspiration from the post, REST - Deleting Sub-Accounts, I found the cause. SIS imports to set the sub account to active solves the issue.

View solution in original post