It allows you:
to get the Organization list to use with all API Methods;
to insert a new Organization;
to update an existing one;
to delete an Organization (only if it is empty = not used!)
Columns that can be used as filters:
Value
Name
Active
IsSummaryLevel
IsTrxOrg - to list only Tranzactional Organizations
Actions can be done:
list
create
update - organization name is mandatory
delete - organization name is mandatory
URL: https://api.socratecloud.com/webapi/rest/organization/list/{version}?startRow={0}&endRow={100}&accessToken={access_token}
Method: GET
Return: JSON object with next format:
{
"data": [
{
"Created": "2000-01-02 10:00:00",
"CreatedBy": "System",
"Updated": "2000-01-02 10:00:00",
"UpdatedBy": "System",
"Active": true,
"Value": "0",
"Name": "*",
"Description": "All Organizations",
"IsSummaryLevel": false
}
],
"totalRows": 1
}
URL: https://api.socratecloud.com/webapi/rest/organization/create/{version}?startRow={0}&endRow={100}&accessToken={access_token}
Method: POST
Return: organization name for success or error message (start with "ERROR: ")
Data format:
{
"Active": true,
"Value": "org_code",
"Name": "Some organization name",
"Description": "some description",
"IsSummaryLevel": false
}
URL: https://api.socratecloud.com/webapi/rest/organization/update/{version}?startRow={0}&endRow={100}&accessToken={access_token}&Name={organization_name}
Method: POST
Return: organization name for success or error message (start with "ERROR: ")
Data format:
{
"Active": false,
"Value": "org_code",
"Name": "Some organization name",
"Description": "some description (updated)",
"IsSummaryLevel": false
}
URL: https://api.socratecloud.com/webapi/rest/organization/delete/{version}?startRow={0}&endRow={100}&accessToken={access_token}&Name={organization_name}
Method: POST
Return: 'Deleted' for success or error message (start with "ERROR: ")