Create a new account |
import java.math.*
import java.util.*
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*
@DataContract
open class RegisterAccount : BaseRequest()
{
@DataMember
var request:RegisterAccountRequest? = null
}
@DataContract
open class BaseRequest : IBaseRequest
{
/**
* The authentication credentials
*/
@DataMember
@ApiMember(Description="The authentication credentials", IsRequired=true, ParameterType="header, body")
var authentication:Authentication? = null
}
@DataContract
open class Authentication
{
/**
* The API User ID provided by us when you signed up to use our API
*/
@DataMember
@ApiMember(Description="The API User ID provided by us when you signed up to use our API", IsRequired=true, ParameterType="header, body")
var apiUserId:String? = null
/**
* The API User Key provided by us when you signed up to use our API
*/
@DataMember
@ApiMember(Description="The API User Key provided by us when you signed up to use our API", IsRequired=true, ParameterType="header, body")
var apiUserKey:String? = null
}
open class RegisterAccountRequest
{
/**
* The desired login username for the account
*/
@ApiMember(Description="The desired login username for the account", IsRequired=true)
var username:String? = null
/**
* The password for account login
*/
@ApiMember(Description="The password for account login", IsRequired=true)
var password:String? = null
/**
* The contact email address for the account holder
*/
@ApiMember(Description="The contact email address for the account holder", IsRequired=true)
var email:String? = null
/**
* The full legal name of the account holder
*/
@ApiMember(Description="The full legal name of the account holder", IsRequired=true)
var fullName:String? = null
/**
* The registered name of the company associated with this account
*/
@ApiMember(Description="The registered name of the company associated with this account", IsRequired=true)
var companyName:String? = null
/**
* The primary contact phone number of the company
*/
@ApiMember(Description="The primary contact phone number of the company", IsRequired=true)
var companyPhone:String? = null
/**
* The first line of the company’s address (e.g., street name and number)
*/
@ApiMember(Description="The first line of the company’s address (e.g., street name and number)", IsRequired=true)
var address1:String? = null
/**
* The second line of the company’s address (optional)
*/
@ApiMember(Description="The second line of the company’s address (optional)")
var address2:String? = null
/**
* The third line of the company’s address (optional)
*/
@ApiMember(Description="The third line of the company’s address (optional)")
var address3:String? = null
/**
* The city where the company is located (optional)
*/
@ApiMember(Description="The city where the company is located (optional)")
var city:String? = null
/**
* The postal or ZIP code of the company’s address
*/
@ApiMember(Description="The postal or ZIP code of the company’s address", IsRequired=true)
var postcode:String? = null
/**
* The country where the company is registered
*/
@ApiMember(Description="The country where the company is registered", IsRequired=true)
var country:String? = null
/**
* The classification of the company (e.g., LLC, Corporation, Sole Proprietorship)
*/
@ApiMember(Description="The classification of the company (e.g., LLC, Corporation, Sole Proprietorship)", IsRequired=true)
var companyType:String? = null
/**
* The industry sector the company operates in
*/
@ApiMember(Description="The industry sector the company operates in", IsRequired=true)
var companyIndustry:String? = null
/**
* The trade body, network, or affiliation the company is a member of (if applicable)
*/
@ApiMember(Description="The trade body, network, or affiliation the company is a member of (if applicable)")
var companyNetwork:String? = null
/**
* Indicates agreement to the terms and conditions (required)
*/
@ApiMember(Description="Indicates agreement to the terms and conditions (required)", IsRequired=true)
var agreeToTerms:Boolean? = null
/**
* Indicates agreement to the data protection statement (required)
*/
@ApiMember(Description="Indicates agreement to the data protection statement (required)", IsRequired=true)
var agreeToDataProtection:Boolean? = null
/**
* Indicates consent to be contacted (optional)
*/
@ApiMember(Description="Indicates consent to be contacted (optional)")
var agreeToContact:Boolean? = null
/**
* Indicates agreement to the privacy policy (required)
*/
@ApiMember(Description="Indicates agreement to the privacy policy (required)", IsRequired=true)
var agreeToPrivacy:Boolean? = null
/**
* An optional voucher code for discounts or promotions
*/
@ApiMember(Description="An optional voucher code for discounts or promotions")
var voucherCode:String? = null
/**
* An optional code that grants access to certain features or subscriptions
*/
@ApiMember(Description="An optional code that grants access to certain features or subscriptions")
var accountActivationCode:String? = null
/**
* The company's VAT registration number (if applicable)
*/
@ApiMember(Description="The company's VAT registration number (if applicable)")
var vatNumber:String? = null
/**
* The country where the company is VAT-registered
*/
@ApiMember(Description="The country where the company is VAT-registered")
var vatCountry:String? = null
}
@DataContract
open class RegisterAccountResponse
{
/**
* The response data
*/
@DataMember
@ApiMember(Description="The response data")
@SerializedName("data") var Data:RegisterAccountData? = null
}
open class RegisterAccountData : BaseResponse()
{
/**
* A unique identifier for the users API access
*/
@ApiMember(Description="A unique identifier for the users API access")
var apiUserId:String? = null
/**
* A secure, randomly generated key used for API authentication
*/
@ApiMember(Description="A secure, randomly generated key used for API authentication")
var apiUserKey:String? = null
}
open class BaseResponse : IBaseDataResponse, IHasResponseStatus
{
/**
* The status of the response
*/
@ApiMember(Description="The status of the response")
var responseStatus:ResponseStatus? = null
}
open class ArrayOfResponseError : ArrayList<ResponseError>()
{
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .soap11 suffix or ?format=soap11
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /soap11 HTTP/1.1
Host: api.sanctionssearch.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: RegisterAccount
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<RegisterAccount xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
<Authentication>
<ApiUserId>String</ApiUserId>
<ApiUserKey>String</ApiUserKey>
</Authentication>
<Request>
<AccountActivationCode>String</AccountActivationCode>
<Address1>String</Address1>
<Address2>String</Address2>
<Address3>String</Address3>
<AgreeToContact>false</AgreeToContact>
<AgreeToDataProtection>false</AgreeToDataProtection>
<AgreeToPrivacy>false</AgreeToPrivacy>
<AgreeToTerms>false</AgreeToTerms>
<City>String</City>
<CompanyIndustry>String</CompanyIndustry>
<CompanyName>String</CompanyName>
<CompanyNetwork>String</CompanyNetwork>
<CompanyPhone>String</CompanyPhone>
<CompanyType>String</CompanyType>
<Country>String</Country>
<Email>String</Email>
<FullName>String</FullName>
<Password>String</Password>
<Postcode>String</Postcode>
<Username>String</Username>
<VATCountry>String</VATCountry>
<VATNumber>String</VATNumber>
<VoucherCode>String</VoucherCode>
</Request>
</RegisterAccount>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <RegisterAccountResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types"> <Data> <ResponseStatus> <ErrorCode>String</ErrorCode> <Message>String</Message> <StackTrace>String</StackTrace> <Errors> <ResponseError> <ErrorCode>String</ErrorCode> <FieldName>String</FieldName> <Message>String</Message> <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> </Meta> </ResponseError> </Errors> <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> </ResponseStatus> <ApiUserId>String</ApiUserId> <ApiUserKey>String</ApiUserKey> </Data> </RegisterAccountResponse> </soap:Body> </soap:Envelope>