The Accounts webservice is the base of our user management - get easy access to all the basic functionality needed for user management - from Login, log off, Reset password and more.

  • DecodeLoginCookie

    Among other parameters Login method returns parameter called EncodedCookie. This method allows to decode this value.

    Request - Filters

    Parameter Mandatory Type Description
    applicationToken No string Your application token (same value you add to the request's header)
    cookie No string The cookie which has to be decoded (EncodedCookie value). Be aware: EncodedCookie value and Cookie value you might have added to requests' headers are different values

    Response - Parameters

    Parameter Type Description
    Code int Result code
    IsSuccess boolean Defines whether service call was processed successfully or not
    Key string Result key
    Message string Result message ("Success", "Error", etc.)
    Number string
    Email string Email of the customer whose EncodedCookie has been decoded
    FullName string Name of the customer whose EncodedCookie has been decoded
    ProfilePicture base64Binary Profile picture of the customer whose EncodedCookie has been decoded

    Examples

    Request

    {
      "applicationToken": "string",
      "cookie": "string"
    }

    Response

    {
      "d": {
        "Code": int,
        "IsSuccess": boolean,
        "Key": "string",
        "Message": "string",
        "Number": "string",
        "Email": "string",
        "FullName": "string",
        "ProfilePicture": base64Binary
      }
    }
  • DeviceActivate

    You may allow to use only registered devices with your app (website) to improve security. To achieve this call RegisterDevice for device registration, then call DeviceSendActivationCode to send an activation code and then call DeviceActivate. This method requires the user to send an activation code he received. This way you can ensure that correct phone number has been set while registering the device and activate the device.

    Request - Filters

    Parameter Mandatory Type Description
    deviceId No string ID of the device which is being registered
    activationCode No string Activation code which the user received after performing DeviceSendActivationCode step

    Response - Parameters

    Parameter Type Description
    d (root element) boolean Defines whether provided activation code was correct

    Examples

    Request

    {
      "deviceId": "string",
      "activationCode": "string"
    }

    Response

    {
      "d": boolean
    }
  • DeviceSendActivationCode

    You may allow to use only registered devices with your app (website) to improve security. To achieve this call RegisterDevice for device registration, then call DeviceSendActivationCode and then call DeviceActivate to check the activation code. This method sends an activation code to the phone number set during the RegisterDevice step. This way you can ensure that correct phone number has been set while registering the device.

    Request - Filters

    Parameter Mandatory Type Description
    deviceId No string ID of the device which is being registered. Phone number is already attached to it at this step.

    Response - Parameters

    Parameter Type Description
    d (root element) boolean Defines whether activation code has been sent successfully

    Examples

    Request

    {
      "deviceId": "string"
    }

    Response

    {
      "d": boolean
    }
  • LogOff

    This method allows to log off users which were logged in using Login method

    Request - Filters

    Parameter Mandatory Type Description
    This method has an empty body as it doesn't require any input parameters. It takes user's credentials token from the request's header automatically and this way detects which user has to be logged off. Check Headers topic to get more info on how to add credentials token to request's headers.

    Response - Parameters

    Parameter Type Description
    This method is void and has an empty response body

    Examples

    Request

    
        

    Response

    {
      "d": null
    }
  • Login

    This method allows already existing users to log into the system.

    Request - Filters

    Parameter Mandatory Type Description
    email No string Email of the user which has to be logged in
    userName No string Username of the user which has to be logged in
    password No string Password of the user which has to be logged in
    options No This block contains login options
    appName No string Name of the application from which login is being performed
    applicationToken No string Application token for which login is being performed (same value you add to the request's header)
    deviceId No string ID of the device from which login is being performed
    pushToken No string Push token (allows to get push messages on mobile devices)
    setCookie No boolean Defines whether cookie has to be set

    Response - Parameters

    Parameter Type Description
    Code int Result code
    IsSuccess boolean Defines whether service call was processed successfully or not
    Key string Result key ("Success", "Error", etc.)
    Message string Result message
    CredentialsHeaderName string Name of the header which should hold credentials token. Check headers' topic to get more info
    CredentialsToken string User's credentials token, which should be also added to headers. Check headers' topic to get more info
    EncodedCookie string *TBD*
    IsDeviceActivated boolean Defines whether devices was activated using DeviceActivate method
    IsDeviceBlocked boolean Defines whether device was blocked by the system
    IsDeviceRegistered boolean Defines whether devices was registered using RegisterDevice method
    IsDeviceRegistrationRequired boolean Defines whether registering device with RegisterDevice method is required
    IsFirstLogin boolean Defines whether this is first login for the account
    LastLogin dateTime Date of the previous login with this account
    VersionUpdateRequired boolean Defines whether application has to be updated

    Examples

    Request

    {
      "email": "string",
      "userName": "string",
      "password": "string",
      "options": {
        "appName": "string",
        "applicationToken": "string",
        "deviceId": "string",
        "pushToken": "string",
        "setCookie": boolean
      }
    }

    Response

    {
      "d": {
        "Code": int,
        "IsSuccess": boolean,
        "Key": "string",
        "Message": "string",
        "Number": "string",
        "CredentialsHeaderName": "string",
        "CredentialsToken": "string",
        "EncodedCookie": "string",
        "IsDeviceActivated": boolean,
        "IsDeviceBlocked": boolean,
        "IsDeviceRegistered": boolean,
        "IsDeviceRegistrationRequired": boolean,
        "IsFirstLogin": boolean,
        "LastLogin": dateTime,
        "VersionUpdateRequired": boolean
      }
    }
  • RegisterDevice

    You may allow to use only registered devices with your app (website) to improve security. To achieve this call RegisterDevice, then call DeviceSendActivationCode to send an activation code and then call DeviceActivate to check the activation code. This method allows to perform the main part of this process: to register the device and to link it with the phone number.

    Request - Filters

    Parameter Mandatory Type Description
    deviceId No string ID of the device which is being registered
    phoneNumber No string Phone number of the user who registers the device. Activation code will be sent to this number on the DeviceSendActivationCode step

    Response - Parameters

    Parameter Type Description
    Code int Result code
    IsSuccess boolean Defines whether service call was processed successfully or not
    Key string Result key ("Success", "Error", etc.)
    Message string Result message

    Examples

    Request

    {
      "deviceId": "string",
      "phoneNumber": "string"
    }

    Response

    {
      "d": {
        "Code": int,
        "IsSuccess": boolean,
        "Key": "string",
        "Message": "string",
        "Number": "string"
      }
    }
  • ResetPassword

    This method allows to reset passwords for existing users. It resets password for account with the specified email address and sends an email with a new password to that address

    Request - Filters

    Parameter Mandatory Type Description
    email No string Email for the account which password has to be reset

    Response - Parameters

    Parameter Type Description
    d (root element) boolean Defines whether password reset succeeded

    Examples

    Request

    {
      "email": "string"
    }

    Response

    {
      "d": boolean
    }
  • UpdatePassword

    This method allows to update passwords for existing users.

    Request - Filters

    Parameter Mandatory Type Description
    oldPassword No string User's current password
    newPassword No string New password to be set. Can't be the same as user's previous three passwords

    Response - Parameters

    Parameter Type Description
    Code int Result code
    IsSuccess boolean Defines whether service call was processed successfully or not
    Key string Result key ("Success", "Error", etc.)
    Message string Result message

    Examples

    Request

    {
      "oldPassword": "string",
      "newPassword": "string"
    }

    Response

    {
      "d": {
        "Code": int,
        "IsSuccess": boolean,
        "Key": "string",
        "Message": "string",
        "Number": "string"
      }
    }
  • Update Pincode

    This method allows to update PIN codes for existing users.

    Request - Filters

    Parameter Mandatory Type Description
    password No string User's current password
    newPincode No string New PIN code to be set

    Response - Parameters

    Parameter Type Description
    Code int Result code
    IsSuccess boolean Defines whether service call was processed successfully or not
    Key string Result key ("Success", "Error", etc.)
    Message string Result message

    Examples

    Request

    {
      "password": "string",
      "newPincode": "string"
    }

    Response

    {
      "d": {
        "Code": int,
        "IsSuccess": boolean,
        "Key": "string",
        "Message": "string",
        "Number": "string"
      }
    }