Sanctions Search API: v2

<back to all web services

RegisterAccountTemplate

import Foundation
import ServiceStack

// @DataContract
public class RegisterAccountTemplate : Codable
{
    required public init(){}
}

// @DataContract
public class RegisterAccountTemplateResponse : Codable
{
    /**
    * The response data
    */
    // @DataMember
    // @ApiMember(Description="The response data")
    public var data:RegisterAccountTemplateData

    required public init(){}
}

public class RegisterAccountTemplateData : BaseResponse
{
    /**
    * The request body of the RegisterAccount endpoint
    */
    // @ApiMember(Description="The request body of the RegisterAccount endpoint")
    public var request:RegisterAccountRequest

    /**
    * Reference data to fill out the RegisterAccount body
    */
    // @ApiMember(Description="Reference data to fill out the RegisterAccount body")
    public var referenceData:ReferenceData

    required public init(){ super.init() }

    private enum CodingKeys : String, CodingKey {
        case request
        case referenceData
    }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        request = try container.decodeIfPresent(RegisterAccountRequest.self, forKey: .request)
        referenceData = try container.decodeIfPresent(ReferenceData.self, forKey: .referenceData)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if request != nil { try container.encode(request, forKey: .request) }
        if referenceData != nil { try container.encode(referenceData, forKey: .referenceData) }
    }
}

public class BaseResponse : IBaseDataResponse, IHasResponseStatus, Codable
{
    /**
    * The status of the response
    */
    // @ApiMember(Description="The status of the response")
    public var responseStatus:ResponseStatus

    required public init(){}
}

public class ArrayOfResponseError : List<ResponseError>
{
    required public init(){ super.init() }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
    }
}

public class RegisterAccountRequest : Codable
{
    /**
    * The desired login username for the account
    */
    // @ApiMember(Description="The desired login username for the account", IsRequired=true)
    public var username:String

    /**
    * The password for account login
    */
    // @ApiMember(Description="The password for account login", IsRequired=true)
    public var password:String

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

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

    /**
    * 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 var companyName:String

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

    /**
    * 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 var address1:String

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

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

    /**
    * The city where the company is located (optional)
    */
    // @ApiMember(Description="The city where the company is located (optional)")
    public var city:String

    /**
    * 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 var postcode:String

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

    /**
    * 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 var companyType:String

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

    /**
    * 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 var companyNetwork:String

    /**
    * Indicates agreement to the terms and conditions (required)
    */
    // @ApiMember(Description="Indicates agreement to the terms and conditions (required)", IsRequired=true)
    public var agreeToTerms:Bool

    /**
    * Indicates agreement to the data protection statement (required)
    */
    // @ApiMember(Description="Indicates agreement to the data protection statement (required)", IsRequired=true)
    public var agreeToDataProtection:Bool

    /**
    * Indicates consent to be contacted (optional)
    */
    // @ApiMember(Description="Indicates consent to be contacted (optional)")
    public var agreeToContact:Bool

    /**
    * Indicates agreement to the privacy policy (required)
    */
    // @ApiMember(Description="Indicates agreement to the privacy policy (required)", IsRequired=true)
    public var agreeToPrivacy:Bool

    /**
    * An optional voucher code for discounts or promotions
    */
    // @ApiMember(Description="An optional voucher code for discounts or promotions")
    public var voucherCode:String

    /**
    * 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 var accountActivationCode:String

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

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

    required public init(){}
}

public class ReferenceData : Codable
{
    /**
    * A list of supported country values
    */
    // @ApiMember(Description="A list of supported country values")
    public var countries:ArrayOfCountry

    /**
    * A list of valid industry classifications for companies
    */
    // @ApiMember(Description="A list of valid industry classifications for companies")
    public var companyIndustries:ArrayOfCompanyIndustry

    /**
    * A list of accepted company types
    */
    // @ApiMember(Description="A list of accepted company types")
    public var companyTypes:ArrayOfCompanyType

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

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

    /**
    * A URL linking to the privacy policy
    */
    // @ApiMember(Description="A URL linking to the privacy policy")
    public var privacyPolicyLink:String

    /**
    * The statement regarding contact preferences
    */
    // @ApiMember(Description="The statement regarding contact preferences")
    public var contactStatement:String

    /**
    * The statement outlining data protection policies
    */
    // @ApiMember(Description="The statement outlining data protection policies")
    public var dataProtectionStatement:String

    required public init(){}
}

public class ArrayOfCountry : List<String>
{
    required public init(){ super.init() }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
    }
}

public class ArrayOfCompanyIndustry : List<String>
{
    required public init(){ super.init() }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
    }
}

public class ArrayOfCompanyType : List<String>
{
    required public init(){ super.init() }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
    }
}

public class ArrayOfVATCountry : List<String>
{
    required public init(){ super.init() }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
    }
}


Swift RegisterAccountTemplate DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .soap12 suffix or ?format=soap12

HTTP + 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>

<RegisterAccountTemplate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types" />

</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>

<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>

</soap12:Body>
</soap12:Envelope>