To remove a specific organization, you must know the organization identifier id
which can be fetched as described in the add object tutorial. See step 1. Important to note is that only organizations that don’t have children can be removed.
Perform an HTTP request to remove the organization with id
.
DELETE /api/organizations/{id} HTTP/1.1
Host: https://admin.skyresponse.com
Authorization: Bearer tkgY9yiM...plBp
If you don’t know how to get the Authorization
header, please proceed to the Authentication tutorial
If a organization with the specified id
exists and you are allowed to perform this kind of operation, the server will respond with HTTP 202 Accepted
.
{
"data": null,
"errors": []
}
Note: If the organization has any child organizations
you must first delete all children
or you will get:
{
"data": null,
"errors": [
{
"name": "DeleteCustomerNotAllowedBecauseSubcustomers"
}
]
}
If you recieved DeleteCustomerNotAllowedBecauseSubcustomers
in the previous section or if you need to delete a specific suborganization
, you should perform the next HTTP method, where organizationId
is the organization from whom you want to delete the suborganization
, and id
is the particular suborganization
to delete.
DELETE /api/organizations/{id} HTTP/1.1
Host: https://admin.skyresponse.com
Authorization: Bearer tkgY9yiM...plBp
Note that you can perform a GET
request to /api/organizations/{id}/descendants
to fetch a list of all child organizations.
cURL
example:Example of remove customer:
curl -X DELETE -H 'https://admin.skyresponse.com/api/organizations/1' -H "Authorization: Bearer PASTE_YOUR_TOKEN_HERE"
To remove a specific organization, you must know the organization identifier id
which can be fetched as described in the add object tutorial. See step 1. Important to note is that only organizations that don’t have children can be removed.
Perform an HTTP request to remove the organization with id
.
DELETE /api/organizations/{id} HTTP/1.1
Host: https://admin.skyresponse.com
Authorization: Bearer tkgY9yiM...plBp
If you don’t know how to get the Authorization
header, please proceed to the Authentication tutorial
If a organization with the specified id
exists and you are allowed to perform this kind of operation, the server will respond with HTTP 202 Accepted
.
{
"data": null,
"errors": []
}
Note: If the organization has any child organizations
you must first delete all children
or you will get:
{
"data": null,
"errors": [
{
"name": "DeleteCustomerNotAllowedBecauseSubcustomers"
}
]
}
If you recieved DeleteCustomerNotAllowedBecauseSubcustomers
in the previous section or if you need to delete a specific suborganization
, you should perform the next HTTP method, where organizationId
is the organization from whom you want to delete the suborganization
, and id
is the particular suborganization
to delete.
DELETE /api/organizations/{id} HTTP/1.1
Host: https://admin.skyresponse.com
Authorization: Bearer tkgY9yiM...plBp
Note that you can perform a GET
request to /api/organizations/{id}/descendants
to fetch a list of all child organizations.
cURL
example:Example of remove customer:
curl -X DELETE -H 'https://admin.skyresponse.com/api/organizations/1' -H "Authorization: Bearer PASTE_YOUR_TOKEN_HERE"