Headers
-
API token (can be retrieved from account settings)
-
ID of organization, for which the operation must be performed
POST
/api-v1/organization
curl \
--request POST 'https://wyzio.app/api-v1/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","templateCompanyBy":"NOGA_CODE","nogaCodeId":42,"templateOrganizationId":42,"startDate":"string","address":{"id":42,"name":"string","line1":"string","line2":"string","city":"string","region":{"id":42,"name":"string","code":"string","taxMode":"ANNUALLY"},"countryCode2":"string","postCode":"string","toTheAttentionOf":"string","position":42,"countryId":42,"houseNumber":"string","service":"string","dtbNumber":"string","cedNumber":"string","fiduciaryId":42},"fiscalYearStart":"string","fiscalYearEnd":"string","vatRuleType":"NONE","timesheets":true,"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",
"templateCompanyBy": "NOGA_CODE",
"nogaCodeId": 42,
"templateOrganizationId": 42,
"startDate": "string",
"address": {
"id": 42,
"name": "string",
"line1": "string",
"line2": "string",
"city": "string",
"region": {
"id": 42,
"name": "string",
"code": "string",
"taxMode": "ANNUALLY"
},
"countryCode2": "string",
"postCode": "string",
"toTheAttentionOf": "string",
"position": 42,
"countryId": 42,
"houseNumber": "string",
"service": "string",
"dtbNumber": "string",
"cedNumber": "string",
"fiduciaryId": 42
},
"fiscalYearStart": "string",
"fiscalYearEnd": "string",
"vatRuleType": "NONE",
"timesheets": true,
"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
}