Data Validation of Parameters passed in an API Method Call

Data Validation of Parameters passed in an API Method Call

This document describes the validation routines which you need to build in for the various parameters which you send to the API call. Failure to validate these fields on your side may result in an undecipherable error from the Server.

General Guidelines for SOAP API

Any fields which are optional will require either null or "" to be passed to them if they are of type String, or 0 passed to them if they are of type Numeric. The type of a parameter can be checked in the documentation supplied alongwith the kit. So for instance, if you choose NOT to pass a FAX Number you will have to pass null or "" for that parameter.

Specific Parameters and their Validation

Note

Accented characters are supported, except for the Phone Number, Mobile Number, Fax Number, Username (Email Address) and Password fields.

username:

  • The username MUST NOT be null.

  • The username MUST be an E-Mail address of the type something@somevalidhostname.

  • Valid characters: 0-9 A-Z a-z - . + @

  • The first and last character after the @ sign cannot be - or ..

  • Maximum length of username: 64 characters

role:

  • role must always be reseller.

name:

  • name MUST NOT be null.

  • Maximum length: 64 characters

  • name can not start with a ..

  • Valid characters: 0-9 A-Z a-z - , . / & ( ) '

company:

  • company MUST NOT be null.

  • Maximum length: 255 characters

  • company name can not start with a ..

  • Valid characters: 0-9 A-Z a-z & # - . , ( ) / : ; ' @ "

Note

While creating a Contact, each Name and Company Name combination should be unique.

address:

  • address is divided into 3 fields.

  • address1 MUST NOT be null.

  • address2 and address3 MAY be null.

  • Maximum length of address1, address2 and address3 each: 64 characters

  • Valid characters: 0-9 A-Z a-z & # - . , ( ) / : ; ' @ "

langPref:

  • langPref MUST NOT be null.

  • It MUST be a two-letter ISO Code representing a language; for example, en for English.

  • Allowed Codes are

    • en for English

    • ar for Arabic

    • by for Belarussian

    • bg for Bulgarian

    • nl for Dutchv

    • ru for Russian

    • tr for Turkish

    • es for Spanish

    • fi for Finnish

    • de for German

    • iw for Hebrew

    • pt for Portuguese

password:

  • password MUST NOT be null.

  • Allowed password length: 8 - 15 characters

  • Recommended:

    • combination of capital and lowercase letters, with punctuation marks, special characters and numbers

    • no use of personal information (name, birth place, etc.), dictionary words, repeating characters (aaaaaa), keyboard patterns (asdfgh) or sequential numbers (123456)

city:

  • city MUST NOT be null.

country:

  • country MUST NOT be null.

  • country MUST be the 2 letter ISO Code of that particular Country; for example, US for United States of America.

zip:

  • zip MUST NOT be null.

  • Maximum length of zip: 10 characters

  • Allowed characters -

    • First character: 0-9 A-Z a-z

    • Rest of the characters: 0-9 A-Z a-z - #

telnocc:

  • telnocc MUST NOT be null.

  • Valid characters: 0-9 (all numerals)

  • Minimum length: 1 character

  • Maximum length: 3 characters

telno:

  • telno MUST NOT be null.

  • Valid characters: 0-9 (all numerals)

  • Minimum length: 4 character

  • Maximum length: 12 characters

alttelnocc (optional):

  • alttelnocc MAY be null.

  • If present, is validated exactly as telnocc.

alttelno (optional):

  • alttelno MAY be null.

  • If present, is validated exactly as telno.

faxnocc (optional):

  • faxnocc MAY be null.

  • If present, is validated exactly as telnocc.

faxtelno (optional):

  • faxtelno MAY be null.

  • If present, is validated exactly as telno.