Create an Organization
With this method, you create a new business partner of type organization. The system automatically assigns a unique ID to the new organization.
To access, create change and delete organizations you need to have the respective authorization. This instance authorization is realized through hierarchical ObjectGroups and ObjectGroupCapabilities for the object type com.sap.appcore:organization.
Also, you may decide that the new organization is assigned to a tenant different to the one where you are currently logged on. To accomplish this, you need to explicitly specify that tenant during creation of the organization. Note, however, that such a cross-tenant operation is possible only for top-level organizations, that is, an organization that acts as a cloud platform provider.
If the organization is successfully created, the server sends HTTP response code 201. Any other code indicates an error.
Request
URI: /Organizations
HTTP Method: POST
Permissions:
<bp>.c
<bp>.r
<bp>.tenant.r
Request Header Fields
| Name | Required | Description |
|---|---|---|
| X-CSRF-Token | Yes | Cross site request forgery token |
Request Fields
| Name | Required | Type | Description | Send As |
|---|---|---|---|---|
| organizationName1 | Yes | string | Semantic name of the organization | JSON |
|
emailAddress |
Yes |
string |
An email address used to get in contact with the organization. |
JSON |
| tenant | No | string | If omitted, tenant of currently logged on user is used. | JSON |
Request Example
/Organizations
Payload
Format: JSON
Only media type JSON is supported. The JSON for this method has the following structure:
{ "basicData" : {
"businessPartnerID" : {"type": "string", "maxLength": 32},
"tenant" : {"type": "string", "maxLength": 36, "required": true },
"etag" : {"type": "string"}
},
"organizationName" : {
"organizationName1" : {"type": "string", "maxLength": 255, "required": true },
"organizationName2" : {"type": "string", "maxLength": 255 }
},
"communicationData" : {
"emailAddress" : { "type": "string", "maxLength": 255, "required": true},
"mobileDestinationLocation":{ "type": "string", "maxLength": 2 },
"mobilePhoneNumber" : { "type": "string", "maxLength": 127 },
"landlineDestinationLocation": { "type": "string", "maxLength": 2 },
"landlinePhoneNumber" : { "type": "string", "maxLength": 127 },
"landlinePhoneNumberExtension": { "type": "string", "maxLength": 127 },
"streetName" : { "type": "string", "maxLength": 255 },
"houseNumber" : { "type": "string", "maxLength": 10 },
"cityName" : { "type": "string", "maxLength": 255 },
"postalCode" : { "type": "string", "maxLength": 10 },
"country" : { "type": "string", "maxLength": 2 },
"countryDescription" : { "type": "string", "maxLength": 60, "readOnly" : true },
"region" : { "type": "string","maxLength": 3 },
"regionDescription" : { "type": "string", "maxLength": 60, "readOnly" : true},
"longitude" : { "type": "number" },
"latitude" : { "type": "number" }
},
"objectGroup" : { "type": "string", "maxLength": 32, "required": "true" },
"externalIDs" : {
value: [{ "type": "string", "maxLength": 60, "required": "false"}]
}
}
Response
Format: JSON
Response Header Fields
|
Name |
Type |
Description |
|---|---|---|
|
Location |
string |
Path to the newly created Organization |
Response Status and Error Codes
| Code | Reason |
|---|---|
| 201 | Organization created successfully |