Appearance
createAddressForDirectoryContact ​
Creates a brand new Address for a Contact existing in a Directory. NOTE: A Maximum of 4 addresses are currently supported.
Request ​
http
POST /rest/smartdirectory/{directoryUUID}/contactRecord/addressesHeaders ​
| Header | Required | Description |
|---|---|---|
x-nextinteract-authtoken | Yes | Auth token returned from loginUser |
Parameters ​
Path Params:
| Parameter | Type | Required | Description |
|---|---|---|---|
directoryUUID | String | Yes | UUID of the Smart Directory as setup in SAM |
JSON Request:
| Parameter | Type | Required | Description |
|---|---|---|---|
typeCode | String (char 1) | No | The type of the Address. Either W=Work, P=Personal, or O=Other |
name | String (char 255) | No | Name of the address e.g. Alfred Hospital |
street | String (char 255) | No | Street of the address e.g. 123 Whatever Street |
city | String (char 100) | No | City of the address e.g. Melbourne |
suburb | String (char 100) | No | Suburb of the address e.g. Alfred Hospital |
stateCode | String (char 6) | No | ISO State Code of the address e.g. AU-VIC. Should only use values sourced from getStates /refdata/states API |
postCode | String (char 20) | No | Postcode of the address e.g. 3000 |
countryCode | String (char 2) | No | ISO Country Code of the address e.g. AU. Should only use values sourced from getCountries /refdata/countries API |
email | String (char 255) | No | Email associated with the address e.g. some@email.address |
phone | String (char 30) | No | Phone associated with the address e.g. 03 789546757 |
fax | String (char 30) | No | Fax associated with the address e.g. 03 789546757 |
mobile | String (char 30) | No | Mobile associated with the address e.g. 0404444444 |
department | String (char 50) | No | Department associated with the address e.g. Radiology |
division | String (char 50) | No | Division associated with the address e.g. Oncology |
jobTitle | String (char 50) | No | Job title associated with the address e.g. Head of Radiooncology |
json
{
"type":"Work",
"typeCode":"W",
"name":"Address 1 Name UPDATED",
"street":"Address 1 Street UPDATED",
"city":"Address 1 City",
"suburb":"Address 1 Suburb",
"stateCode":"AU-NSW",
"state":"New South Wales",
"postcode":"2000",
"countryCode":"AU",
"country":"AUSTRALIA",
"email":"test@test.com",
"phone":"phone",
"fax":"fax",
"mobile":"mobile",
"department":"department",
"division":"division",
"jobTitle":"jobTitle"
}Response ​
200 OK ​
json
{
"uuid": "75594f4e-d053-4c93-b045-d013d4aea3c0",
"type": "Work",
"typeCode": "W",
"name": "Address 1 Name",
"street": "Address 1 Street",
"city": "Address 1 City",
"suburb": "Address 1 Suburb",
"stateCode": "AU-NSW",
"state": "New South Wales",
"postcode": "2000",
"countryCode": "AU",
"country": "AUSTRALIA",
"email": "test@test.com",
"phone": "phone",
"fax": "fax",
"mobile": "mobile",
"department": "department",
"division": "division",
"jobTitle": "jobTitle"
}Errors ​
| Exception | Description |
|---|---|
WSInvalidAuthTokenException | See Error Definitions |
WSCacheServiceException | See Error Definitions |
WSInvalidParameterException | See Error Definitions |
WSSmartDirectoryNotFoundException | See Error Definitions |
WSSmartDirectoryServiceException | See Error Definitions |
WSUserNotConsentedException | See Error Definitions |
WSSmartDirectoryNotEnabledForCompanyException | See Error Definitions |
WSUserContactNotFoundException | See Error Definitions |
WSUserNotInSmartDirectoryException | See Error Definitions |
WSSmartDirectoryInactiveException | See Error Definitions |
WSAddressServiceException | See Error Definitions |
WSAddressAlreadyFullException | See Error Definitions |
WSContactNotFoundException | See Error Definitions |
WSNoAddressFieldsInDirectoryException | See Error Definitions |
WSFieldLengthException | See Error Definitions |