|
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
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
IMPORTANT
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 before
the @ sign: 'a' to 'z', 'A' to 'Z', '0' to '9', '-', '_', '.'
- Valid characters after the
@ sign: 'a' to 'z', 'A' to 'Z', '0' to '9', '-', '.'
- 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 dot ".".
- Special characters such as ! " # $ % &
' * + , / : ; < = > ? @ [ ] ^ _ ` { | } ~ are not allowed.
company:
- company MUST NOT be null.
- Maximum length: 255
characters
- company name can not start
with a dot ".".
- Special characters such as ! " $ % &
' * + , / : ; < = > ? @ [ ] ^ _ ` { | } ~ are not allowed.
IMPORTANT
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
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 Dutch
- "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.
- Minimum length: 6 characters
city:
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 can be '0' to '9', 'A' to 'Z',
'a' to 'z'.
- Rest of the characters can be '0' to '9', 'A'
to 'Z', 'a' to
'z', '-' and '#'.
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.
|