Create a Person

With this method, you create a new business partner of type Person. The system automatically assigns a unique ID to the new person.

To access, create change and delete persons you need to have the respective authorization. This instance authorization is realized through hierarchical ObjectGroups and ObjectGroupCapabilities for the object type com.sap.appcore:person.

A user can only operate on persons that are assigned to the same tenant to which the user is logged on. Only a user acting as the cloud platform provider has the permission to access persons in other tenants through capabilities that are inherited from the root node.

If the person is successfully created, the server sends HTTP response code 201. Any other code indicates an error.

Request

URI: /Persons

HTTP Method: POST

Permissions:

<bp>.c

<bp>.tenant.r

Request Header Fields

Name Required Description
X-CSRF-Token Yes Cross-site request forgery token

Request Fields

Parameter Required Data Type Description Send As
tenant Yes string If omitted, tenant of currently logged on user is used. JSON
familyName

Yes

string

Last name of the person to be created.

JSON
givenName

Yes

string

First name of the person to be created.

JSON
emailAddress

Yes

string

An email address used to get in contact with the person.

JSON

Request Example

/Persons

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" }
  },
  "personName": {
    "formOfAddress"           : { "type": "string", "maxLength": 10 },
    "formOfAddressDescription": { "type": "string", "maxLength": 30, "readOnly" : true },
    "familyName"      : { "type": "string", "maxLength": 255, "required": true },
    "additionalFamilyName": { "type": "string", "maxLength": 255 },
    "familyNamePrefix": { "type": "string", "maxLength": 10 },
    "middleName": { "type": "string", "maxLength": 255 },
    "givenName": { "type": "string", "maxLength": 255, "required": true },
    "initials": { "type": "string", "maxLength": 10 },
    "academicTitle": { "type": "string", "maxLength": 4 },
    "academicTitleDescription": { "type": "string", "maxLength": 60, "readOnly" : true },
    "additionalAcademicTitle": { "type": "string", "maxLength": 4 },
    "additionalAcademicTitleDescription" : { "type": "string", "maxLength": 60, "readOnly" : true }
  },
  "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 }
  },
  "objectGroup": { "type": "string", "maxLength": 32, "required": "true" },
  "externalIDs": { 
                   value: [{ "type": "string", "maxLength": 60, "required": "false"}]
                 }
}

Response

Response Header Fields

Name Type Description
Location string Path to the newly created Person
ETag

string

Entity tag of the newly created Person instance

Response Status and Error Codes

Code Reason
201 Person successfully created