Book and Host Online Services
Please Login or Register

Knowledgebase

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

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

company:

  • Company MUST NOT be null
  • Maximum length: 255 characters
  • Company Name can not start with a dot "."
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 e.g. "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:

  • city MUST NOT be null

country:

  • country MUST NOT be null
  • country MUST be the 2 letter ISO Code of that particular Country e.g. "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 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


Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read

Powered by WHMCompleteSolution

Language:

Quick Navigation

Client Login

Email

Password

Remember Me

Search