Skip to content

createUserAddress ​

Creates a new Address for User. NOTE: there is an upper limit of 4 addresses.

Request ​

http
POST /rest/user/addresses

Headers ​

HeaderRequiredDescription
x-nextinteract-authtokenYesAuth token returned from loginUser

Parameters ​

JSON Request.

ParameterTypeRequiredDescription
typeCodechar(1)NoThe type of the Address. Either W=Work, P=Personal, or O=Other.
namechar(255)NoName of the address e.g. Alfred Hospital
streetchar(255)NoStreet of the address e.g. 123 Whatever Street
citychar(100)NoCity of the address e.g. Melbourne
suburbchar(100)NoSuburb of the address e.g. Alfred Hospital
stateCodechar(6)NoISO State Code of the address e.g. AU-VIC. Should only use values sourced from getStates /refdata/states API.
postCodechar(20)NoPostcode of the address e.g. 3000
countryCodechar(2)NoISO Country Code of the address e.g. AU. Should only use values sourced from getCountries /refdata/countries API.
emailchar(255)NoEmail associated with the address e.g. some@email.address
phonechar(30)NoPhone associated with the address e.g. 03 789546757
faxchar(30)NoFax associated with the address e.g. 03 789546757
mobilechar(30)NoMobile associated with the address e.g. 0404444444
departmentchar(50)NoDepartment associated with the address e.g. Radiology
divisionchar(50)NoDivision associated with the address e.g. Oncology
jobTitlechar(50)NoJob title associated with the address e.g. Head of Radiooncology
json
{
   "typeCode":"W",
   "name":"Address 1 Name",
   "street":"Address 1 Street",
   "city":"Address 1 City",
   "suburb":"Address 1 Suburb",
   "stateCode":"AU-NSW",
   "postcode":"2000",
   "countryCode":"AU",
   "email":"test@test.com",
   "phone":"phone",
   "fax":"fax",
   "mobile":"mobile",
   "department":"department",
   "division":"division",
   "jobTitle":"jobTitle"
}

Response ​

200 OK ​

HTTP 200 and returns the newly created entity. NOTE: the addition of the uuid when successful.

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 ​

ExceptionDescription
WSInvalidParameterExceptionSee Error Definitions
WSInvalidAuthTokenExceptionSee Error Definitions
WSCacheServiceExceptionSee Error Definitions
WSAddressServiceExceptionSee Error Definitions
WSAlreadyExistsExceptionSee Error Definitions
WSAddressAlreadyFullExceptionSee Error Definitions
WSUserNotFoundExceptionSee Error Definitions
WSFieldLengthExceptionSee Error Definitions