Headers
-
API token (can be retrieved from account settings)
-
ID of organization, for which the operation must be performed
POST
/api-v1/consolidated-organization
curl \
--request POST 'https://wyzio.app/api-v1/consolidated-organization' \
--header "Content-Type: application/json" \
--header "WEAL-TOKEN: string" \
--header "TARGET-ORGANIZATION-ID: 42" \
--data '{"newOrganization":{"name":"string","mainLanguage":{"id":42,"code":"string","name":"string","isMain":true},"currency":"string","fiscalYearStart":"string","fiscalYearEnd":"string","organizationIds":[42],"managingCompanyId":42,"id":42},"user":{"permissions":[{"id":42,"module":"ALL","sub0":"ALL","sub1":"ALL","sub2":"ALL","canView":true,"canCreate":true,"canModify":true,"canDelete":true,"canExport":true,"viewType":"NONE","modifyType":"NONE","deleteType":"NONE"}],"permissionAuthorities":[{"authority":"string"}],"authorities":[{"authority":"string"}],"password":"string","username":"string","secret":"string","parentContactId":42,"userDbId":42,"defaultLanguage":"EN","organizationId":42,"organizationCountryId":42,"organizationCountryRegionId":42,"isAdmin":true,"isMainUser":true,"isImpersonateOthers":true,"organizationMainLanguage":"EN","authorizationToken":"string","userGroupIds":[42],"isConsolidatedOrganization":true,"subUserContactId":42,"enabled":true,"active":true,"admin":true,"notNullUserGroupIds":[42],"blockedForLicenceNonPayment":true,"notMainUser":true,"contentLanguage":"EN","notAdmin":true,"accountNonExpired":true,"accountNonLocked":true,"credentialsNonExpired":true}}'
Request examples
# Headers
WEAL-TOKEN: string
TARGET-ORGANIZATION-ID: 42
# Payload
{
"newOrganization": {
"name": "string",
"mainLanguage": {
"id": 42,
"code": "string",
"name": "string",
"isMain": true
},
"currency": "string",
"fiscalYearStart": "string",
"fiscalYearEnd": "string",
"organizationIds": [
42
],
"managingCompanyId": 42,
"id": 42
},
"user": {
"permissions": [
{
"id": 42,
"module": "ALL",
"sub0": "ALL",
"sub1": "ALL",
"sub2": "ALL",
"canView": true,
"canCreate": true,
"canModify": true,
"canDelete": true,
"canExport": true,
"viewType": "NONE",
"modifyType": "NONE",
"deleteType": "NONE"
}
],
"permissionAuthorities": [
{
"authority": "string"
}
],
"authorities": [
{
"authority": "string"
}
],
"password": "string",
"username": "string",
"secret": "string",
"parentContactId": 42,
"userDbId": 42,
"defaultLanguage": "EN",
"organizationId": 42,
"organizationCountryId": 42,
"organizationCountryRegionId": 42,
"isAdmin": true,
"isMainUser": true,
"isImpersonateOthers": true,
"organizationMainLanguage": "EN",
"authorizationToken": "string",
"userGroupIds": [
42
],
"isConsolidatedOrganization": true,
"subUserContactId": 42,
"enabled": true,
"active": true,
"admin": true,
"notNullUserGroupIds": [
42
],
"blockedForLicenceNonPayment": true,
"notMainUser": true,
"contentLanguage": "EN",
"notAdmin": true,
"accountNonExpired": true,
"accountNonLocked": true,
"credentialsNonExpired": true
}
}
Response examples (200)
{
"data": {},
"error": {
"errorCode": "NO_ERROR",
"errorDetailValues": [
{
"errorCode": "string",
"fieldName": "string",
"data": "string",
"isSevere": true
}
]
},
"valid": true
}