Sanctions Search API: v2

<back to all web services

RegisterAccountTemplate

Account
The following routes are available for this service:
GET/account/register/templateGet a template to create a new account
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

// @DataContract
class ResponseError implements IConvertible
{
    // @DataMember(Order=1)
    String? errorCode;

    // @DataMember(Order=2)
    String? fieldName;

    // @DataMember(Order=3)
    String? message;

    // @DataMember(Order=4)
    Map<String,String?>? meta;

    ResponseError({this.errorCode,this.fieldName,this.message,this.meta});
    ResponseError.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        errorCode = json['errorCode'];
        fieldName = json['fieldName'];
        message = json['message'];
        meta = JsonConverters.toStringMap(json['meta']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'errorCode': errorCode,
        'fieldName': fieldName,
        'message': message,
        'meta': meta
    };

    getTypeName() => "ResponseError";
    TypeContext? context = _ctx;
}

class ArrayOfResponseError extends ListBase<ResponseError> implements IConvertible
{
    final List<ResponseError> l = [];
    set length(int newLength) { l.length = newLength; }
    int get length => l.length;
    ResponseError operator [](int index) => l[index];
    void operator []=(int index, ResponseError value) { l[index] = value; }
    ArrayOfResponseError();
    ArrayOfResponseError.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "ArrayOfResponseError";
    TypeContext? context = _ctx;
}

// @DataContract
class ResponseStatus implements IConvertible
{
    // @DataMember(Order=1)
    String? errorCode;

    // @DataMember(Order=2)
    String? message;

    // @DataMember(Order=3)
    String? stackTrace;

    // @DataMember(Order=4)
    ArrayOfResponseError? errors;

    // @DataMember(Order=5)
    Map<String,String?>? meta;

    ResponseStatus({this.errorCode,this.message,this.stackTrace,this.errors,this.meta});
    ResponseStatus.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        errorCode = json['errorCode'];
        message = json['message'];
        stackTrace = json['stackTrace'];
        errors = JsonConverters.fromJson(json['errors'],'ArrayOfResponseError',context!);
        meta = JsonConverters.toStringMap(json['meta']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'errorCode': errorCode,
        'message': message,
        'stackTrace': stackTrace,
        'errors': JsonConverters.toJson(errors,'ArrayOfResponseError',context!),
        'meta': meta
    };

    getTypeName() => "ResponseStatus";
    TypeContext? context = _ctx;
}

class BaseResponse implements IBaseDataResponse, IHasResponseStatus, IConvertible
{
    /**
    * The status of the response
    */
    // @ApiMember(Description="The status of the response")
    ResponseStatus? responseStatus;

    BaseResponse({this.responseStatus});
    BaseResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
    };

    getTypeName() => "BaseResponse";
    TypeContext? context = _ctx;
}

class RegisterAccountRequest implements IConvertible
{
    /**
    * The desired login username for the account
    */
    // @ApiMember(Description="The desired login username for the account", IsRequired=true)
    String? username;

    /**
    * The password for account login
    */
    // @ApiMember(Description="The password for account login", IsRequired=true)
    String? password;

    /**
    * The contact email address for the account holder
    */
    // @ApiMember(Description="The contact email address for the account holder", IsRequired=true)
    String? email;

    /**
    * The full legal name of the account holder
    */
    // @ApiMember(Description="The full legal name of the account holder", IsRequired=true)
    String? fullName;

    /**
    * The registered name of the company associated with this account
    */
    // @ApiMember(Description="The registered name of the company associated with this account", IsRequired=true)
    String? companyName;

    /**
    * The primary contact phone number of the company
    */
    // @ApiMember(Description="The primary contact phone number of the company", IsRequired=true)
    String? companyPhone;

    /**
    * 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)
    String? address1;

    /**
    * The second line of the company’s address (optional)
    */
    // @ApiMember(Description="The second line of the company’s address (optional)")
    String? address2;

    /**
    * The third line of the company’s address (optional)
    */
    // @ApiMember(Description="The third line of the company’s address (optional)")
    String? address3;

    /**
    * The city where the company is located (optional)
    */
    // @ApiMember(Description="The city where the company is located (optional)")
    String? city;

    /**
    * The postal or ZIP code of the company’s address
    */
    // @ApiMember(Description="The postal or ZIP code of the company’s address", IsRequired=true)
    String? postcode;

    /**
    * The country where the company is registered
    */
    // @ApiMember(Description="The country where the company is registered", IsRequired=true)
    String? country;

    /**
    * 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)
    String? companyType;

    /**
    * The industry sector the company operates in
    */
    // @ApiMember(Description="The industry sector the company operates in", IsRequired=true)
    String? companyIndustry;

    /**
    * 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)")
    String? companyNetwork;

    /**
    * Indicates agreement to the terms and conditions (required)
    */
    // @ApiMember(Description="Indicates agreement to the terms and conditions (required)", IsRequired=true)
    bool? agreeToTerms;

    /**
    * Indicates agreement to the data protection statement (required)
    */
    // @ApiMember(Description="Indicates agreement to the data protection statement (required)", IsRequired=true)
    bool? agreeToDataProtection;

    /**
    * Indicates consent to be contacted (optional)
    */
    // @ApiMember(Description="Indicates consent to be contacted (optional)")
    bool? agreeToContact;

    /**
    * Indicates agreement to the privacy policy (required)
    */
    // @ApiMember(Description="Indicates agreement to the privacy policy (required)", IsRequired=true)
    bool? agreeToPrivacy;

    /**
    * An optional voucher code for discounts or promotions
    */
    // @ApiMember(Description="An optional voucher code for discounts or promotions")
    String? voucherCode;

    /**
    * An optional code that grants access to certain features or subscriptions
    */
    // @ApiMember(Description="An optional code that grants access to certain features or subscriptions")
    String? accountActivationCode;

    /**
    * The company's VAT registration number (if applicable)
    */
    // @ApiMember(Description="The company's VAT registration number (if applicable)")
    String? vatNumber;

    /**
    * The country where the company is VAT-registered
    */
    // @ApiMember(Description="The country where the company is VAT-registered")
    String? vatCountry;

    RegisterAccountRequest({this.username,this.password,this.email,this.fullName,this.companyName,this.companyPhone,this.address1,this.address2,this.address3,this.city,this.postcode,this.country,this.companyType,this.companyIndustry,this.companyNetwork,this.agreeToTerms,this.agreeToDataProtection,this.agreeToContact,this.agreeToPrivacy,this.voucherCode,this.accountActivationCode,this.vatNumber,this.vatCountry});
    RegisterAccountRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        username = json['username'];
        password = json['password'];
        email = json['email'];
        fullName = json['fullName'];
        companyName = json['companyName'];
        companyPhone = json['companyPhone'];
        address1 = json['address1'];
        address2 = json['address2'];
        address3 = json['address3'];
        city = json['city'];
        postcode = json['postcode'];
        country = json['country'];
        companyType = json['companyType'];
        companyIndustry = json['companyIndustry'];
        companyNetwork = json['companyNetwork'];
        agreeToTerms = json['agreeToTerms'];
        agreeToDataProtection = json['agreeToDataProtection'];
        agreeToContact = json['agreeToContact'];
        agreeToPrivacy = json['agreeToPrivacy'];
        voucherCode = json['voucherCode'];
        accountActivationCode = json['accountActivationCode'];
        vatNumber = json['vatNumber'];
        vatCountry = json['vatCountry'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'username': username,
        'password': password,
        'email': email,
        'fullName': fullName,
        'companyName': companyName,
        'companyPhone': companyPhone,
        'address1': address1,
        'address2': address2,
        'address3': address3,
        'city': city,
        'postcode': postcode,
        'country': country,
        'companyType': companyType,
        'companyIndustry': companyIndustry,
        'companyNetwork': companyNetwork,
        'agreeToTerms': agreeToTerms,
        'agreeToDataProtection': agreeToDataProtection,
        'agreeToContact': agreeToContact,
        'agreeToPrivacy': agreeToPrivacy,
        'voucherCode': voucherCode,
        'accountActivationCode': accountActivationCode,
        'vatNumber': vatNumber,
        'vatCountry': vatCountry
    };

    getTypeName() => "RegisterAccountRequest";
    TypeContext? context = _ctx;
}

class ArrayOfCountry extends ListBase<String> implements IConvertible
{
    final List<String> l = [];
    set length(int newLength) { l.length = newLength; }
    int get length => l.length;
    String operator [](int index) => l[index];
    void operator []=(int index, String value) { l[index] = value; }
    ArrayOfCountry();
    ArrayOfCountry.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "ArrayOfCountry";
    TypeContext? context = _ctx;
}

class ArrayOfCompanyIndustry extends ListBase<String> implements IConvertible
{
    final List<String> l = [];
    set length(int newLength) { l.length = newLength; }
    int get length => l.length;
    String operator [](int index) => l[index];
    void operator []=(int index, String value) { l[index] = value; }
    ArrayOfCompanyIndustry();
    ArrayOfCompanyIndustry.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "ArrayOfCompanyIndustry";
    TypeContext? context = _ctx;
}

class ArrayOfCompanyType extends ListBase<String> implements IConvertible
{
    final List<String> l = [];
    set length(int newLength) { l.length = newLength; }
    int get length => l.length;
    String operator [](int index) => l[index];
    void operator []=(int index, String value) { l[index] = value; }
    ArrayOfCompanyType();
    ArrayOfCompanyType.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "ArrayOfCompanyType";
    TypeContext? context = _ctx;
}

class ArrayOfVATCountry extends ListBase<String> implements IConvertible
{
    final List<String> l = [];
    set length(int newLength) { l.length = newLength; }
    int get length => l.length;
    String operator [](int index) => l[index];
    void operator []=(int index, String value) { l[index] = value; }
    ArrayOfVATCountry();
    ArrayOfVATCountry.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "ArrayOfVATCountry";
    TypeContext? context = _ctx;
}

class ReferenceData implements IConvertible
{
    /**
    * A list of supported country values
    */
    // @ApiMember(Description="A list of supported country values")
    ArrayOfCountry? countries;

    /**
    * A list of valid industry classifications for companies
    */
    // @ApiMember(Description="A list of valid industry classifications for companies")
    ArrayOfCompanyIndustry? companyIndustries;

    /**
    * A list of accepted company types
    */
    // @ApiMember(Description="A list of accepted company types")
    ArrayOfCompanyType? companyTypes;

    /**
    * A list of countries where VAT registration is recognized
    */
    // @ApiMember(Description="A list of countries where VAT registration is recognized")
    ArrayOfVATCountry? vatCountries;

    /**
    * A URL linking to the terms and conditions document
    */
    // @ApiMember(Description="A URL linking to the terms and conditions document")
    String? termsAndConditionsLink;

    /**
    * A URL linking to the privacy policy
    */
    // @ApiMember(Description="A URL linking to the privacy policy")
    String? privacyPolicyLink;

    /**
    * The statement regarding contact preferences
    */
    // @ApiMember(Description="The statement regarding contact preferences")
    String? contactStatement;

    /**
    * The statement outlining data protection policies
    */
    // @ApiMember(Description="The statement outlining data protection policies")
    String? dataProtectionStatement;

    ReferenceData({this.countries,this.companyIndustries,this.companyTypes,this.vatCountries,this.termsAndConditionsLink,this.privacyPolicyLink,this.contactStatement,this.dataProtectionStatement});
    ReferenceData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        countries = JsonConverters.fromJson(json['countries'],'ArrayOfCountry',context!);
        companyIndustries = JsonConverters.fromJson(json['companyIndustries'],'ArrayOfCompanyIndustry',context!);
        companyTypes = JsonConverters.fromJson(json['companyTypes'],'ArrayOfCompanyType',context!);
        vatCountries = JsonConverters.fromJson(json['vatCountries'],'ArrayOfVATCountry',context!);
        termsAndConditionsLink = json['termsAndConditionsLink'];
        privacyPolicyLink = json['privacyPolicyLink'];
        contactStatement = json['contactStatement'];
        dataProtectionStatement = json['dataProtectionStatement'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'countries': JsonConverters.toJson(countries,'ArrayOfCountry',context!),
        'companyIndustries': JsonConverters.toJson(companyIndustries,'ArrayOfCompanyIndustry',context!),
        'companyTypes': JsonConverters.toJson(companyTypes,'ArrayOfCompanyType',context!),
        'vatCountries': JsonConverters.toJson(vatCountries,'ArrayOfVATCountry',context!),
        'termsAndConditionsLink': termsAndConditionsLink,
        'privacyPolicyLink': privacyPolicyLink,
        'contactStatement': contactStatement,
        'dataProtectionStatement': dataProtectionStatement
    };

    getTypeName() => "ReferenceData";
    TypeContext? context = _ctx;
}

class RegisterAccountTemplateData extends BaseResponse implements IConvertible
{
    /**
    * The request body of the RegisterAccount endpoint
    */
    // @ApiMember(Description="The request body of the RegisterAccount endpoint")
    RegisterAccountRequest? request;

    /**
    * Reference data to fill out the RegisterAccount body
    */
    // @ApiMember(Description="Reference data to fill out the RegisterAccount body")
    ReferenceData? referenceData;

    RegisterAccountTemplateData({this.request,this.referenceData});
    RegisterAccountTemplateData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        request = JsonConverters.fromJson(json['request'],'RegisterAccountRequest',context!);
        referenceData = JsonConverters.fromJson(json['referenceData'],'ReferenceData',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'request': JsonConverters.toJson(request,'RegisterAccountRequest',context!),
        'referenceData': JsonConverters.toJson(referenceData,'ReferenceData',context!)
    });

    getTypeName() => "RegisterAccountTemplateData";
    TypeContext? context = _ctx;
}

// @DataContract
class RegisterAccountTemplateResponse implements IConvertible
{
    /**
    * The response data
    */
    // @DataMember
    // @ApiMember(Description="The response data")
    RegisterAccountTemplateData? data;

    RegisterAccountTemplateResponse({this.data});
    RegisterAccountTemplateResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        data = JsonConverters.fromJson(json['data'],'RegisterAccountTemplateData',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'data': JsonConverters.toJson(data,'RegisterAccountTemplateData',context!)
    };

    getTypeName() => "RegisterAccountTemplateResponse";
    TypeContext? context = _ctx;
}

// @DataContract
class RegisterAccountTemplate implements IConvertible
{
    RegisterAccountTemplate();
    RegisterAccountTemplate.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "RegisterAccountTemplate";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'api.sanctionssearch.com', types: <String, TypeInfo> {
    'ArrayOfResponseError': TypeInfo(TypeOf.Class, create:() => ArrayOfResponseError()),
    'BaseResponse': TypeInfo(TypeOf.Class, create:() => BaseResponse()),
    'RegisterAccountRequest': TypeInfo(TypeOf.Class, create:() => RegisterAccountRequest()),
    'ArrayOfCountry': TypeInfo(TypeOf.Class, create:() => ArrayOfCountry()),
    'ArrayOfCompanyIndustry': TypeInfo(TypeOf.Class, create:() => ArrayOfCompanyIndustry()),
    'ArrayOfCompanyType': TypeInfo(TypeOf.Class, create:() => ArrayOfCompanyType()),
    'ArrayOfVATCountry': TypeInfo(TypeOf.Class, create:() => ArrayOfVATCountry()),
    'ReferenceData': TypeInfo(TypeOf.Class, create:() => ReferenceData()),
    'RegisterAccountTemplateData': TypeInfo(TypeOf.Class, create:() => RegisterAccountTemplateData()),
    'RegisterAccountTemplateResponse': TypeInfo(TypeOf.Class, create:() => RegisterAccountTemplateResponse()),
    'RegisterAccountTemplate': TypeInfo(TypeOf.Class, create:() => RegisterAccountTemplate()),
});

Dart RegisterAccountTemplate 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.

GET /account/register/template HTTP/1.1 
Host: api.sanctionssearch.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<RegisterAccountTemplateResponse 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>
    <ReferenceData>
      <CompanyIndustries>
        <CompanyIndustry>String</CompanyIndustry>
      </CompanyIndustries>
      <CompanyTypes>
        <CompanyType>String</CompanyType>
      </CompanyTypes>
      <ContactStatement>String</ContactStatement>
      <Countries>
        <Country>String</Country>
      </Countries>
      <DataProtectionStatement>String</DataProtectionStatement>
      <PrivacyPolicyLink>String</PrivacyPolicyLink>
      <TermsAndConditionsLink>String</TermsAndConditionsLink>
      <VATCountries>
        <VATCountry>String</VATCountry>
      </VATCountries>
    </ReferenceData>
    <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>
  </Data>
</RegisterAccountTemplateResponse>