Platform API

<back to all web services

SaveUserProfile

Updates a Users Profile information'

Requires Authentication
"use strict";
export class LocationCoordinatesModel {
    /** @param {{Latitude?:number,Longitude?:number,Altitude?:number,Accuracy?:number,AltitudeAccuracy?:number,Heading?:number,Speed?:number,VerticalSpeed?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {number}
     * @description The latitude of an address - geographic coordinates specifying the north-south position of a point on the Earth's surface. */
    Latitude;
    /**
     * @type {number}
     * @description The longitude of an address - geographic coordinates specifying the east-west position of a point on the Earth's surface. */
    Longitude;
    /**
     * @type {?number}
     * @description The altitude of an address - the altitude above sea level." */
    Altitude;
    /**
     * @type {?number}
     * @description Accuracy of the latitude and longitude. */
    Accuracy;
    /**
     * @type {?number}
     * @description Accurancy of the Altitude. */
    AltitudeAccuracy;
    /**
     * @type {?number}
     * @description Direction you are heading. */
    Heading;
    /**
     * @type {?number}
     * @description Speed you are going. */
    Speed;
    /**
     * @type {?number}
     * @description Speed your altitude is ascending/descending at. */
    VerticalSpeed;
}
export class AddressModel {
    /** @param {{DistanceAway?:number,Latitude?:number,Longitude?:number,AddressFormatId?:string,SuburbId?:string,SuburbName?:string,StateShortName?:string,PostCode?:string,CountryId?:string,CountryName?:string,ISOCountryCode?:string,LotNumber?:string,SubUnit?:string,BuildingNumber?:string,StreetNumber?:string,StreetName?:string,AddressLineOne?:string,AddressLineTwo?:string,AddressFull?:string,IsPhysical?:boolean,Notes?:string,AutoMapCoordinates?:boolean,LocationCoordinates?:LocationCoordinatesModel}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {number}
     * @description The distance between this project and another specified set of gps coordinates. */
    DistanceAway;
    /**
     * @type {number}
     * @description The latitude of an address - geographic coordinates specifying the north-south position of a point on the Earth's surface. */
    Latitude;
    /**
     * @type {number}
     * @description The longitude of an address - geographic coordinates specifying the east-west position of a point on the Earth's surface. */
    Longitude;
    /**
     * @type {string}
     * @description Address Format Id Guid - this will be determined by the service. */
    AddressFormatId;
    /**
     * @type {string}
     * @description Suburb Id Guid - this will attempt to be determined by the SuburbName, StateShortName and Postcode entered. */
    SuburbId;
    /**
     * @type {string}
     * @description The suburb name. */
    SuburbName;
    /**
     * @type {string}
     * @description The shortened State Name e.g Vic for Victoria. */
    StateShortName;
    /**
     * @type {string}
     * @description The suburb postcode. */
    PostCode;
    /**
     * @type {string}
     * @description Country Id Guid - this will be determined by the CountrName or ISOCountryCode entered. */
    CountryId;
    /**
     * @type {string}
     * @description the name of the country the address is within. */
    CountryName;
    /**
     * @type {string}
     * @description ISO Country Code. */
    ISOCountryCode;
    /**
     * @type {string}
     * @description The address Lot number. */
    LotNumber;
    /**
     * @type {string}
     * @description The address Sub Unit number. */
    SubUnit;
    /**
     * @type {string}
     * @description The address building number. */
    BuildingNumber;
    /**
     * @type {string}
     * @description The address street number. */
    StreetNumber;
    /**
     * @type {string}
     * @description The address street name including street type. */
    StreetName;
    /**
     * @type {string}
     * @description A formatted address Line 1. */
    AddressLineOne;
    /**
     * @type {string}
     * @description A formatted address Line 2. */
    AddressLineTwo;
    /**
     * @type {string}
     * @description The full address string. */
    AddressFull;
    /**
     * @type {?boolean}
     * @description True if the address is a physical location. */
    IsPhysical;
    /**
     * @type {string}
     * @description Notes about the address. */
    Notes;
    /**
     * @type {?boolean}
     * @description If true, the address is eligible for having its coordinates calculated/updated. */
    AutoMapCoordinates;
    /**
     * @type {LocationCoordinatesModel}
     * @description Location Coordinates for the address. */
    LocationCoordinates;
}
export class ContactAddressModel {
    /** @param {{Address?:AddressModel,IsPostal?:boolean,IsPrimaryLocation?:boolean,IsRegisteredLocation?:boolean,SuburbName?:string,StateName?:string,CountryName?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {AddressModel}
     * @description Address Details */
    Address;
    /**
     * @type {boolean}
     * @description True if this is a postal address. */
    IsPostal;
    /**
     * @type {boolean}
     * @description True if this is the primary address. */
    IsPrimaryLocation;
    /**
     * @type {boolean}
     * @description True if this address is the registered tax address. */
    IsRegisteredLocation;
    /**
     * @type {string}
     * @description Suburb Name */
    SuburbName;
    /**
     * @type {string}
     * @description State Name */
    StateName;
    /**
     * @type {string}
     * @description Country Name */
    CountryName;
}
export class PhoneModel {
    /** @param {{CountryCode?:string,AreaCode?:string,LocalNumber?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Country Code */
    CountryCode;
    /**
     * @type {string}
     * @description Area Code */
    AreaCode;
    /**
     * @type {string}
     * @description Local Number */
    LocalNumber;
}
export class ContactDetailModel {
    /** @param {{ContactMethodId?:string,ContactMethodName?:string,ContactAddress?:ContactAddressModel,ContactPhone?:PhoneModel,CountryId?:string,ContactDetails?:string,Notes?:string,ContactDetailsCode?:string,OrderContactMethod?:number,IsPrimaryContactMethod?:boolean,IsAddress?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Id of the Contact Method */
    ContactMethodId;
    /**
     * @type {string}
     * @description Contact Method Name */
    ContactMethodName;
    /**
     * @type {ContactAddressModel}
     * @description If the contact method is an address, this will contain the address details. */
    ContactAddress;
    /**
     * @type {PhoneModel}
     * @description If the contact method is a phone, this will contain the phone details */
    ContactPhone;
    /**
     * @type {?string}
     * @description Id of the country */
    CountryId;
    /**
     * @type {string}
     * @description A summary string representing the contact details */
    ContactDetails;
    /**
     * @type {string}
     * @description Notes about the contact details */
    Notes;
    /**
     * @type {string}
     * @description Area Code if contact details are a phone number */
    ContactDetailsCode;
    /**
     * @type {number}
     * @description Order number of the contact method */
    OrderContactMethod;
    /**
     * @type {boolean}
     * @description True if this is the primary contact method */
    IsPrimaryContactMethod;
    /**
     * @type {boolean}
     * @description True if this contact method is an address */
    IsAddress;
}
export class SaveUserProfile {
    /** @param {{UserProfileId?:string,UserId?:string,ContactId?:string,ProfileName?:string,Title?:string,FirstName?:string,Surname?:string,Description?:string,EmploymentIndustry?:string,EmploymentRole?:string,EmploymentGeographicArea?:string,Timezone?:string,ContactDetails?:ContactDetailModel[],ContactType?:string,LegalName?:string,TradingName?:string,Abn?:string,Acn?:string,Arbn?:string,GstRegistered?:boolean,GenderId?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description The users profile Guid. */
    UserProfileId;
    /**
     * @type {string}
     * @description The users Guid. This is used for validation to ensure the user in the session is only changing his own user information. */
    UserId;
    /**
     * @type {string}
     * @description The users contact Guid. */
    ContactId;
    /**
     * @type {string}
     * @description The users profile name. */
    ProfileName;
    /**
     * @type {string}
     * @description The users (contact) title. */
    Title;
    /**
     * @type {string}
     * @description The users (contact) first name(s). */
    FirstName;
    /**
     * @type {string}
     * @description The users (contact) surname. */
    Surname;
    /**
     * @type {string}
     * @description The contact profile description. */
    Description;
    /**
     * @type {string}
     * @description The contacts profession/trade/industry details. */
    EmploymentIndustry;
    /**
     * @type {string}
     * @description The contact details of who they work/subcontract for. */
    EmploymentRole;
    /**
     * @type {string}
     * @description The contacts work area/suburbs. */
    EmploymentGeographicArea;
    /**
     * @type {string}
     * @description The contacts timezone. */
    Timezone;
    /**
     * @type {ContactDetailModel[]}
     * @description A list of the contact details for the contact. Note: an email must always be set for a business. */
    ContactDetails = [];
    /**
     * @type {string}
     * @description Type of contact (person, organisation etc.) linked to the profile */
    ContactType;
    /**
     * @type {string}
     * @description Legal name of contact linked to the profile */
    LegalName;
    /**
     * @type {string}
     * @description Trading name of contact linked to the profile */
    TradingName;
    /**
     * @type {string}
     * @description Abn of contact linked to the profile */
    Abn;
    /**
     * @type {string}
     * @description Acn of contact linked to the profile */
    Acn;
    /**
     * @type {string}
     * @description Arbn of contact linked to the profile */
    Arbn;
    /**
     * @type {boolean}
     * @description Indicates if the Contact is registered for GST. */
    GstRegistered;
    /**
     * @type {?string}
     * @description The Gender Guid of the contact. */
    GenderId;
}

JavaScript SaveUserProfile DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /xml/reply/SaveUserProfile HTTP/1.1 
Host: pfapi.pstpf.com.au 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<SaveUserProfile xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Canvara.WebAPIModel.ServiceModel">
  <Abn>String</Abn>
  <Acn>String</Acn>
  <Arbn>String</Arbn>
  <ContactDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eros.Saguna.Common.WebAPI.ServiceModel">
    <d2p1:ContactDetailModel>
      <d2p1:_x003C_ContactAddress_x003E_k__BackingField>
        <d2p1:_x003C_Address_x003E_k__BackingField>
          <d2p1:_addressFull>String</d2p1:_addressFull>
          <d2p1:_x003C_AddressFormatId_x003E_k__BackingField>00000000-0000-0000-0000-000000000000</d2p1:_x003C_AddressFormatId_x003E_k__BackingField>
          <d2p1:_x003C_AddressLineOne_x003E_k__BackingField>String</d2p1:_x003C_AddressLineOne_x003E_k__BackingField>
          <d2p1:_x003C_AddressLineTwo_x003E_k__BackingField>String</d2p1:_x003C_AddressLineTwo_x003E_k__BackingField>
          <d2p1:_x003C_AutoMapCoordinates_x003E_k__BackingField>false</d2p1:_x003C_AutoMapCoordinates_x003E_k__BackingField>
          <d2p1:_x003C_BuildingNumber_x003E_k__BackingField>String</d2p1:_x003C_BuildingNumber_x003E_k__BackingField>
          <d2p1:_x003C_CountryId_x003E_k__BackingField>00000000-0000-0000-0000-000000000000</d2p1:_x003C_CountryId_x003E_k__BackingField>
          <d2p1:_x003C_CountryName_x003E_k__BackingField>String</d2p1:_x003C_CountryName_x003E_k__BackingField>
          <d2p1:_x003C_DistanceAway_x003E_k__BackingField>0</d2p1:_x003C_DistanceAway_x003E_k__BackingField>
          <d2p1:_x003C_ISOCountryCode_x003E_k__BackingField>String</d2p1:_x003C_ISOCountryCode_x003E_k__BackingField>
          <d2p1:_x003C_IsPhysical_x003E_k__BackingField>false</d2p1:_x003C_IsPhysical_x003E_k__BackingField>
          <d2p1:_x003C_Latitude_x003E_k__BackingField>0</d2p1:_x003C_Latitude_x003E_k__BackingField>
          <d2p1:_x003C_LocationCoordinates_x003E_k__BackingField>
            <d2p1:_x003C_Accuracy_x003E_k__BackingField>0</d2p1:_x003C_Accuracy_x003E_k__BackingField>
            <d2p1:_x003C_AltitudeAccuracy_x003E_k__BackingField>0</d2p1:_x003C_AltitudeAccuracy_x003E_k__BackingField>
            <d2p1:_x003C_Altitude_x003E_k__BackingField>0</d2p1:_x003C_Altitude_x003E_k__BackingField>
            <d2p1:_x003C_Heading_x003E_k__BackingField>0</d2p1:_x003C_Heading_x003E_k__BackingField>
            <d2p1:_x003C_Latitude_x003E_k__BackingField>0</d2p1:_x003C_Latitude_x003E_k__BackingField>
            <d2p1:_x003C_Longitude_x003E_k__BackingField>0</d2p1:_x003C_Longitude_x003E_k__BackingField>
            <d2p1:_x003C_Speed_x003E_k__BackingField>0</d2p1:_x003C_Speed_x003E_k__BackingField>
            <d2p1:_x003C_VerticalSpeed_x003E_k__BackingField>0</d2p1:_x003C_VerticalSpeed_x003E_k__BackingField>
          </d2p1:_x003C_LocationCoordinates_x003E_k__BackingField>
          <d2p1:_x003C_Longitude_x003E_k__BackingField>0</d2p1:_x003C_Longitude_x003E_k__BackingField>
          <d2p1:_x003C_LotNumber_x003E_k__BackingField>String</d2p1:_x003C_LotNumber_x003E_k__BackingField>
          <d2p1:_x003C_Notes_x003E_k__BackingField>String</d2p1:_x003C_Notes_x003E_k__BackingField>
          <d2p1:_x003C_PostCode_x003E_k__BackingField>String</d2p1:_x003C_PostCode_x003E_k__BackingField>
          <d2p1:_x003C_StateShortName_x003E_k__BackingField>String</d2p1:_x003C_StateShortName_x003E_k__BackingField>
          <d2p1:_x003C_StreetName_x003E_k__BackingField>String</d2p1:_x003C_StreetName_x003E_k__BackingField>
          <d2p1:_x003C_StreetNumber_x003E_k__BackingField>String</d2p1:_x003C_StreetNumber_x003E_k__BackingField>
          <d2p1:_x003C_SubUnit_x003E_k__BackingField>String</d2p1:_x003C_SubUnit_x003E_k__BackingField>
          <d2p1:_x003C_SuburbId_x003E_k__BackingField>00000000-0000-0000-0000-000000000000</d2p1:_x003C_SuburbId_x003E_k__BackingField>
          <d2p1:_x003C_SuburbName_x003E_k__BackingField>String</d2p1:_x003C_SuburbName_x003E_k__BackingField>
        </d2p1:_x003C_Address_x003E_k__BackingField>
        <d2p1:_x003C_CountryName_x003E_k__BackingField>String</d2p1:_x003C_CountryName_x003E_k__BackingField>
        <d2p1:_x003C_IsPostal_x003E_k__BackingField>false</d2p1:_x003C_IsPostal_x003E_k__BackingField>
        <d2p1:_x003C_IsPrimaryLocation_x003E_k__BackingField>false</d2p1:_x003C_IsPrimaryLocation_x003E_k__BackingField>
        <d2p1:_x003C_IsRegisteredLocation_x003E_k__BackingField>false</d2p1:_x003C_IsRegisteredLocation_x003E_k__BackingField>
        <d2p1:_x003C_StateName_x003E_k__BackingField>String</d2p1:_x003C_StateName_x003E_k__BackingField>
        <d2p1:_x003C_SuburbName_x003E_k__BackingField>String</d2p1:_x003C_SuburbName_x003E_k__BackingField>
      </d2p1:_x003C_ContactAddress_x003E_k__BackingField>
      <d2p1:_x003C_ContactDetailsCode_x003E_k__BackingField>String</d2p1:_x003C_ContactDetailsCode_x003E_k__BackingField>
      <d2p1:_x003C_ContactDetails_x003E_k__BackingField>String</d2p1:_x003C_ContactDetails_x003E_k__BackingField>
      <d2p1:_x003C_ContactMethodId_x003E_k__BackingField>00000000-0000-0000-0000-000000000000</d2p1:_x003C_ContactMethodId_x003E_k__BackingField>
      <d2p1:_x003C_ContactMethodName_x003E_k__BackingField>String</d2p1:_x003C_ContactMethodName_x003E_k__BackingField>
      <d2p1:_x003C_ContactPhone_x003E_k__BackingField>
        <d2p1:_x003C_AreaCode_x003E_k__BackingField>String</d2p1:_x003C_AreaCode_x003E_k__BackingField>
        <d2p1:_x003C_CountryCode_x003E_k__BackingField>String</d2p1:_x003C_CountryCode_x003E_k__BackingField>
        <d2p1:_x003C_LocalNumber_x003E_k__BackingField>String</d2p1:_x003C_LocalNumber_x003E_k__BackingField>
      </d2p1:_x003C_ContactPhone_x003E_k__BackingField>
      <d2p1:_x003C_CountryId_x003E_k__BackingField>00000000-0000-0000-0000-000000000000</d2p1:_x003C_CountryId_x003E_k__BackingField>
      <d2p1:_x003C_IsPrimaryContactMethod_x003E_k__BackingField>false</d2p1:_x003C_IsPrimaryContactMethod_x003E_k__BackingField>
      <d2p1:_x003C_Notes_x003E_k__BackingField>String</d2p1:_x003C_Notes_x003E_k__BackingField>
      <d2p1:_x003C_OrderContactMethod_x003E_k__BackingField>0</d2p1:_x003C_OrderContactMethod_x003E_k__BackingField>
    </d2p1:ContactDetailModel>
  </ContactDetails>
  <ContactId>00000000-0000-0000-0000-000000000000</ContactId>
  <ContactType>00000000-0000-0000-0000-000000000000</ContactType>
  <Description>String</Description>
  <EmploymentGeographicArea>String</EmploymentGeographicArea>
  <EmploymentIndustry>String</EmploymentIndustry>
  <EmploymentRole>String</EmploymentRole>
  <FirstName>String</FirstName>
  <GenderId>00000000-0000-0000-0000-000000000000</GenderId>
  <GstRegistered>false</GstRegistered>
  <LegalName>String</LegalName>
  <ProfileName>String</ProfileName>
  <Surname>String</Surname>
  <Timezone>00000000-0000-0000-0000-000000000000</Timezone>
  <Title>String</Title>
  <TradingName>String</TradingName>
  <UserId>00000000-0000-0000-0000-000000000000</UserId>
  <UserProfileId>00000000-0000-0000-0000-000000000000</UserProfileId>
</SaveUserProfile>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ResponseStatus xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <ErrorCode>String</ErrorCode>
  <Message>String</Message>
  <StackTrace>String</StackTrace>
  <Errors>
    <ResponseError>
      <ErrorCode>String</ErrorCode>
      <FieldName>String</FieldName>
      <Message>String</Message>
      <Meta xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value>String</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
      </Meta>
    </ResponseError>
  </Errors>
  <Meta xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </Meta>
</ResponseStatus>