PT.Api

<back to all web services

CreateUser

The following routes are available for this service:
POST/api/createuser
CreateUser Parameters:
NameParameterData TypeRequiredDescription
EmailbodystringNo
PasswordbodystringNo
FullNamebodystringNo
PhonebodystringNo
SecurityNumberbodystringNo
AddressbodystringNo
ProvinceIdbodyintNo
CityIdbodyintNo
LocaleRequest Parameters:
NameParameterData TypeRequiredDescription
LocaleformstringNoLocale. Ex: vi-VN, en-US
BaseRequest Parameters:
NameParameterData TypeRequiredDescription
VersionformintNoVersion. Ex: 1,2,3,...
CreateUserResponse Parameters:
NameParameterData TypeRequiredDescription
DataformAuthenticateResponseNo
BaseResponse Parameters:
NameParameterData TypeRequiredDescription
StatusformintNoResponse status. Ex: 1 - Success; 0 - Error
MessageformstringNoResponse message
AuthenticateResponse Parameters:
NameParameterData TypeRequiredDescription
UserIdformstringNo
SessionIdformstringNo
UserNameformstringNo
DisplayNameformstringNo
ReferrerUrlformstringNo
BearerTokenformstringNo
ResponseStatusformResponseStatusNo
MetaformDictionary<string, string>No

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/CreateUser HTTP/1.1 
Host: api2.futabus.vn 
Content-Type: application/xml
Content-Length: length

<CreateUser xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PT.Api.ServiceModel">
  <Version xmlns="http://schemas.datacontract.org/2004/07/PT.Api.ServiceModel.Common">0</Version>
  <Locale xmlns="http://schemas.datacontract.org/2004/07/PT.Api.ServiceModel.Common">vi-VN</Locale>
  <Address>String</Address>
  <CityId>0</CityId>
  <Email>String</Email>
  <FullName>String</FullName>
  <Password>String</Password>
  <Phone>String</Phone>
  <ProvinceId>0</ProvinceId>
  <SecurityNumber>String</SecurityNumber>
</CreateUser>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CreateUserResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PT.Api.ServiceModel.Types">
  <Message xmlns="http://schemas.datacontract.org/2004/07/PT.Api.ServiceModel.Common">String</Message>
  <Status xmlns="http://schemas.datacontract.org/2004/07/PT.Api.ServiceModel.Common">0</Status>
  <Data xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:UserId>String</d2p1:UserId>
    <d2p1:SessionId>String</d2p1:SessionId>
    <d2p1:UserName>String</d2p1:UserName>
    <d2p1:DisplayName>String</d2p1:DisplayName>
    <d2p1:ReferrerUrl>String</d2p1:ReferrerUrl>
    <d2p1:BearerToken>String</d2p1:BearerToken>
    <d2p1:ResponseStatus>
      <d2p1:ErrorCode>String</d2p1:ErrorCode>
      <d2p1:Message>String</d2p1:Message>
      <d2p1:StackTrace>String</d2p1:StackTrace>
      <d2p1:Errors>
        <d2p1:ResponseError>
          <d2p1:ErrorCode>String</d2p1:ErrorCode>
          <d2p1:FieldName>String</d2p1:FieldName>
          <d2p1:Message>String</d2p1:Message>
          <d2p1:Meta xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <d6p1:KeyValueOfstringstring>
              <d6p1:Key>String</d6p1:Key>
              <d6p1:Value>String</d6p1:Value>
            </d6p1:KeyValueOfstringstring>
          </d2p1:Meta>
        </d2p1:ResponseError>
      </d2p1:Errors>
      <d2p1: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>
      </d2p1:Meta>
    </d2p1:ResponseStatus>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </Data>
</CreateUserResponse>