# Account profile Salesforce API requests/responses
See https://wtprojects.atlassian.net/browse/FRP-3310 for details.
## Personal Information Single Field PATCH to /accountprofilefield
Request:
```json
{
"Title":"Dr"
}
```
Response:
```json
{
"success": "true",
"recordId": "00526000009K5VwAAK",
"data": {
"Title": "Dr"
}
}
```
### Error case
Request:
```json
{
"Salutation":"Mr"
}
```
Response:
```json
{
"success": "false",
"recordId": "00526000009K5VwAAK",
"data": {
"Salutation": "Mr"
},
"errors": [
{
"error": "Missing Mapping Data for Salutation",
"fieldName": "Salutation"
}
]
}
```
## DMI Data PATCH to /accountprofilefield
Request:
```json
{
"SelectEthnicity": "Test Ethnicity Update",
"SelfDescribeEthnicity": "Test Ethnicity Self Describe Update",
"SelectEthnicitySpecific": "Test Ethnicity Specific Update",
"Disability": "Test Disability Update",
"YourConsent": true,
"DateOfBirthValue": "1972-12-01",
"DateOfBirthOptIn": true,
"SelfDescribeGenderIdentity": "Test Gender Identity Self Update",
"GenderIdentityChooseOption": "Test Gender Identity Update",
"TransIdentification": "Test Trans Identification Update"
}
```
Response:
```json
{
"success": "true",
"recordId": "00526000009K5VwAAK",
"data": {
"SelectEthnicity": "New Test Ethnicity Update",
"SelfDescribeEthnicity": "New Test Ethnicity Self Describe Update",
"SelectEthnicitySpecific": "New Test Ethnicity Specific Update",
"Disability": "New Test Disability Update",
"YourConsent": true,
"DateOfBirthValue": "1972-10-26",
"DateOfBirthOptIn": true,
"SelfDescribeGenderIdentity": "New Test Gender Identity Self Update",
"GenderIdentityChooseOption": "New Test Gender Identity Update",
"TransIdentification": "New Test Trans Identification Update"
}
}
```
Error response:
```json
{
"success": "false",
"recordId": "00526000009K5VwAAK",
"data": {
"SelectEthnicity": "Test Ethnicity Update",
"SelfDescribeEthnicity": "Test Ethnicity Self Describe Update",
"SelectEthnicitySpecific": "Test Ethnicity Specific Update",
"Disabled": "Test Disability Update",
"YourConsent": true,
"DateOfBirthValue": "1972-12-01",
"DateOfBirthOptIn": true,
"SelfDescribeGenderIdentity": "Test Gender Identity Self Update",
"GenderIdentityChooseOption": "Test Gender Identity Update",
"TransIdentification": "Test Trans Identification Update"
},
"errors": [
{
"error": "Missing Mapping Data for Disabled",
"fieldName": "Disabled"
}
]
}
```
## CV History POST to /accountprofiletable
Request:
```json
{
"EducationAndTraining": [
{
"EndDate": "1994-09-01",
"Country": "",
"Qualification": "Psychology",
"Institution": "Oxford University",
"Subject": "Psychology 303",
"StartDate": "1990-09-12"
}
]
}
```
Response:
```json
{
"success": "true",
"recordId": "00526000009K5VwAAK",
"data": {
"EducationAndTraining": [
{
"rowId": "a0U26000007CUzpEAG",
"StartDate": "1995-09-12",
"Subject": "Sociology 101",
"Institution": "Oxford University",
"Qualification": "Sociology",
"Country": "",
"EndDate": "1998-09-01"
}
]
}
}
```
## CV History PATCH to /accountprofiletable
Request:
```json
{
"EducationAndTraining": [
{
"EndDate": "1994-09-01",
"rowId": "a0U26000007CQ6uEAG",
"Country": "",
"Qualification": "Psychology",
"Institution": "Oxford University",
"Subject": "Psychology 303",
"StartDate": "1990-09-12"
}
]
}
```
Response:
```json
{
"success": "true",
"recordId": "00526000009K5VwAAK",
"data": {
"EducationAndTraining": [
{
"StartDate": "1990-09-12",
"Subject": "Psychology 202",
"Institution": "Oxford University",
"Qualification": "Psychology",
"Country": "",
"rowId": "a0U26000007CQ6uEAG",
"EndDate": "1994-09-01"
}
]
}
}
```
## Nationality POST to /accountprofiletable
Request:
```json
{
"Nationalities": [
{
"Nationality": "Irish"
}
]
}
```
Response:
```json
{
"success": "true",
"recordId": "00526000009K5VwAAK",
"data": {
"Nationalities": [
{
"rowId": "a2C26000000beGzEAI",
"Nationality": "British"
}
]
}
}
```
## Nationality PATCH to /accountprofiletable
Request:
```json
{
"Nationalities": [
{
"rowId": "a2C26000000bTAUEA2",
"Nationality": "Irish"
}
]
}
```
Response:
```json
{
"success": "true",
"recordId": "00526000009K5VwAAK",
"data": {
"Nationalities": [
{
"Nationality": "British",
"rowId": "a2C26000000beGzEAI"
}
]
}
}
```