Create a new account |
// @DataContract
export class Authentication
{
/** @description 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")
public apiUserId: string;
/** @description 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")
public apiUserKey: string;
public constructor(init?: Partial<Authentication>) { (Object as any).assign(this, init); }
}
// @DataContract
export class BaseRequest implements IBaseRequest
{
/** @description The authentication credentials */
// @DataMember
// @ApiMember(Description="The authentication credentials", IsRequired=true, ParameterType="header, body")
public authentication: Authentication;
public constructor(init?: Partial<BaseRequest>) { (Object as any).assign(this, init); }
}
// @DataContract
export class ResponseError
{
// @DataMember(Order=1)
public errorCode: string;
// @DataMember(Order=2)
public fieldName: string;
// @DataMember(Order=3)
public message: string;
// @DataMember(Order=4)
public meta: { [index: string]: string; };
public constructor(init?: Partial<ResponseError>) { (Object as any).assign(this, init); }
}
export class ArrayOfResponseError extends Array<ResponseError>
{
public constructor(init?: Partial<ArrayOfResponseError>) { super(); (Object as any).assign(this, init); }
}
// @DataContract
export class ResponseStatus
{
// @DataMember(Order=1)
public errorCode: string;
// @DataMember(Order=2)
public message: string;
// @DataMember(Order=3)
public stackTrace: string;
// @DataMember(Order=4)
public errors: ArrayOfResponseError;
// @DataMember(Order=5)
public meta: { [index: string]: string; };
public constructor(init?: Partial<ResponseStatus>) { (Object as any).assign(this, init); }
}
export class BaseResponse implements IBaseDataResponse, IHasResponseStatus
{
/** @description The status of the response */
// @ApiMember(Description="The status of the response")
public responseStatus: ResponseStatus;
public constructor(init?: Partial<BaseResponse>) { (Object as any).assign(this, init); }
}
export class RegisterAccountData extends BaseResponse
{
/** @description A unique identifier for the users API access */
// @ApiMember(Description="A unique identifier for the users API access")
public apiUserId: string;
/** @description A secure, randomly generated key used for API authentication */
// @ApiMember(Description="A secure, randomly generated key used for API authentication")
public apiUserKey: string;
public constructor(init?: Partial<RegisterAccountData>) { super(init); (Object as any).assign(this, init); }
}
// @DataContract
export class RegisterAccountResponse
{
/** @description The response data */
// @DataMember
// @ApiMember(Description="The response data")
public data: RegisterAccountData;
public constructor(init?: Partial<RegisterAccountResponse>) { (Object as any).assign(this, init); }
}
export class RegisterAccountRequest
{
/** @description The desired login username for the account */
// @ApiMember(Description="The desired login username for the account", IsRequired=true)
public username: string;
/** @description The password for account login */
// @ApiMember(Description="The password for account login", IsRequired=true)
public password: string;
/** @description The contact email address for the account holder */
// @ApiMember(Description="The contact email address for the account holder", IsRequired=true)
public email: string;
/** @description The full legal name of the account holder */
// @ApiMember(Description="The full legal name of the account holder", IsRequired=true)
public fullName: string;
/** @description The registered name of the company associated with this account */
// @ApiMember(Description="The registered name of the company associated with this account", IsRequired=true)
public companyName: string;
/** @description The primary contact phone number of the company */
// @ApiMember(Description="The primary contact phone number of the company", IsRequired=true)
public companyPhone: string;
/** @description 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)
public address1: string;
/** @description The second line of the company’s address (optional) */
// @ApiMember(Description="The second line of the company’s address (optional)")
public address2: string;
/** @description The third line of the company’s address (optional) */
// @ApiMember(Description="The third line of the company’s address (optional)")
public address3: string;
/** @description The city where the company is located (optional) */
// @ApiMember(Description="The city where the company is located (optional)")
public city: string;
/** @description The postal or ZIP code of the company’s address */
// @ApiMember(Description="The postal or ZIP code of the company’s address", IsRequired=true)
public postcode: string;
/** @description The country where the company is registered */
// @ApiMember(Description="The country where the company is registered", IsRequired=true)
public country: string;
/** @description 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)
public companyType: string;
/** @description The industry sector the company operates in */
// @ApiMember(Description="The industry sector the company operates in", IsRequired=true)
public companyIndustry: string;
/** @description 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)")
public companyNetwork: string;
/** @description Indicates agreement to the terms and conditions (required) */
// @ApiMember(Description="Indicates agreement to the terms and conditions (required)", IsRequired=true)
public agreeToTerms: boolean;
/** @description Indicates agreement to the data protection statement (required) */
// @ApiMember(Description="Indicates agreement to the data protection statement (required)", IsRequired=true)
public agreeToDataProtection: boolean;
/** @description Indicates consent to be contacted (optional) */
// @ApiMember(Description="Indicates consent to be contacted (optional)")
public agreeToContact: boolean;
/** @description Indicates agreement to the privacy policy (required) */
// @ApiMember(Description="Indicates agreement to the privacy policy (required)", IsRequired=true)
public agreeToPrivacy: boolean;
/** @description An optional voucher code for discounts or promotions */
// @ApiMember(Description="An optional voucher code for discounts or promotions")
public voucherCode: string;
/** @description An optional code that grants access to certain features or subscriptions */
// @ApiMember(Description="An optional code that grants access to certain features or subscriptions")
public accountActivationCode: string;
/** @description The company's VAT registration number (if applicable) */
// @ApiMember(Description="The company's VAT registration number (if applicable)")
public vatNumber: string;
/** @description The country where the company is VAT-registered */
// @ApiMember(Description="The country where the company is VAT-registered")
public vatCountry: string;
public constructor(init?: Partial<RegisterAccountRequest>) { (Object as any).assign(this, init); }
}
// @DataContract
export class RegisterAccount extends BaseRequest
{
// @DataMember
public request: RegisterAccountRequest;
public constructor(init?: Partial<RegisterAccount>) { super(init); (Object as any).assign(this, init); }
}
TypeScript RegisterAccount DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .soap12 suffix or ?format=soap12
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /soap12 HTTP/1.1
Host: api.sanctionssearch.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12: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>
</soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12: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> </soap12:Body> </soap12:Envelope>