Movenium REST API 1.1

Documentation

validations

mandatory:

  • The field is mandatory, and has to be supplied on POST
  • mandatory setting can have two different formats
    "features": {
        "mandatory": [
            {
                "homecountry": "!fi"
            }
        ]
    }
  • This means the field is mandatory if "homecountry" does not have the value "fi"
  • Without the "!" sign it would be mandatory if the "homecountry" value is "fi"
OR
    "features": {
        "mandatory": "true"
    }
  • The field is always mandatory

number:

  • The field must be a float
    "features": {
        "validate_check": [
            "number"
        ]
    }
  • Can be in [] or without

digit:

  • Field must be an integer
    "features": {
        "validate_check": [
            "digit"
        ]
    }
  • Can be in [] or without

PositiveNumber:

  • A positive float
    "features": {
        "validate_check": [
            "PositiveNumber"
        ]
    }
  • Can be in [] or without

email:

  • The field must be a valid email address
    "features": {
        "validate_check": [
            "email"
        ]
    }
  • Can be in [] or without

vatin_fin:

  • Must be a valid Finnish Business ID (y-tunnus)
  • Format is 1234567-1 where the last number is a control number
    "features": {
        "validate_check": [
            "ytunnus"
        ]
    }
  • Can be in [] or without

exact_len:length:

  • Field must be the exact length of length
    "features": {
        "validate_check": [
            "exact_len:12"
        ]
    }
  • Can be in [] or without


phoneNumber:

  • Field must be a valid phone number
  • Checked with regexp /^[0-9\+\-\ \s]+$/i
    "features": {
        "validate_check": [
            "phoneNumber"
        ]
    }
  • Can be in [] or without

exact_len_rfid:

  • Length must be 0, 8 or 14
    "features": {
        "validate_check": [
            "exact_len_rfid"
        ]
    }
  • Can be in [] or without

rfidCheck:

  • Checked with regexp /^([a-fA-F0-9]+)$/i
    "features": {
        "validate_check": [
            "rfidCheck"
        ]
    }
  • Can be in [] or without

birthdate:

  • A date that is over 15 years in the past
  • Only full years taken into account
    "features": {
        "validate_check": [
            "birthdate"
        ]
    }
  • Can be in [] or without

timeCheck:

  • Time check allowed characters:
    • numbers
    • ,
    • .
    • am
    • pm
    • :
  • maxlength 4
    "features": {
        "validate_check": [
            "timeCheck"
        ]
    }
  • Can be in [] or without

hour24Check:

  • 24 hour validation, hours must be between 0 and 24
  • Accepts time in format HH:MM and splits hours with : . ,
    "features": {
        "validate_check": [
            "hour24Check"
        ]
    }
  • Can be in [] or without

hourCheck:

  • Checked with regexp /^(-?[0-9]{1,6}([:|.|,]){0,1}[0-9]{0,2})$/i
    "features": {
        "validate_check": [
            "hourCheck"
        ]
    }
  • Can be in [] or without