Sanctions Search API: v2

<back to all web services

RegisterAccount

Account
The following routes are available for this service:
POST/account/registerCreate 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 .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /account/register HTTP/1.1 
Host: api.sanctionssearch.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"request":{"username":"String","password":"String","email":"String","fullName":"String","companyName":"String","companyPhone":"String","address1":"String","address2":"String","address3":"String","city":"String","postcode":"String","country":"String","companyType":"String","companyIndustry":"String","companyNetwork":"String","agreeToTerms":false,"agreeToDataProtection":false,"agreeToContact":false,"agreeToPrivacy":false,"voucherCode":"String","accountActivationCode":"String","vatNumber":"String","vatCountry":"String"},"authentication":{"apiUserId":"String","apiUserKey":"String"}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"data":{"apiUserId":"String","apiUserKey":"String","responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}}