VNP Input Webservices - Users
"wsUpdateUser.jsp" is a VirtualNewspaper input webservice to collect any changes applied on user datas on an external platform. This Web service needs to be invoked each time user informations are updated inside any external platform. Webservice needs to be feeded with a complete set of user informations, even if only few of them have been updated on the external platform.

Any external platform submits a complete set of user informations to VirtualNewspaper, using a POST call.
Warning:
This POST call needs to be url encoded
Webservice url
http://[wwx].virtualnewspaper.it/editor_or_title_name/webservice/wsUpdateUser.jsp+parameters
Webservice Mandatory Parameters
| PARAMETER NAME | VALUE FORMAT | Description |
|---|---|---|
| version | integer | fixed value: 2 |
| varchar(255) | Email address from the VNP user you want to update | |
| authCode | string | md5 string obtained from the concatenation of [useremail] and [vnp privateKey] |
Password can be provided as plain text or as an md5 hash; if you choose md5, you will need to provide an additional "encryptedPassword" parameter presenting a "true" value. (Example : &encryptedPassword=true)
Example to update password
Parameters need to be provided using this syntax:
?version=2&email=customer@emaila.com&authCode=1a2b3c4d5k34725t&password=abc123
A different call is required for each user you need to update.
Parameters and their values, need to be separated by the "equal to" char ("=").
After each parameter/value an "&" char is required.
Warning:
You need to provide all parameters you want to synchronize.
Any missing or empty parameter will be stored using a "default value".
This VirtualNewspaper webservice is able to provide two different replies :
01) User account has been found on VirtualNewspaper and its data have been updated accordingly.
In this scenario, a JSON response will look like:
{
“user”:{
internalId: “88261”
email: “email@customer.com”
}
“status”:”OK”
“request”:“Request parameters”
}
Please link provided VirtualNewspaper internal user ID, with user data fields stored at your end.
02) Something went wrong.
In this scenario VirtualNewspaper JSON reply will look like this :
{
“status”:“KO”
“error”:“Error message”
“request”:“Request parameters”
}
| PARAMETER NAME | MANDATORY | VALUE FORMAT | DESCRIPTION | |
|---|---|---|---|---|
| version | Y | string | Fixed value = 2 | |
| Y | varchar(255) | Customer email | ||
| authCode | Y | string | Contains the email the user provided in the Registration Form | |
| forceInsert | N | boolean | true/false, If passed true force the service to Create a user whenever does not exist | |
| password | N | mediumtext | The password the user provided in the Registration Form | |
| administrative_area_level_1 | N | varchar(200) |  | |
| administrative_area_level_2 | N | varchar(200) | ||
| administrative_area_level_3 | N | varchar(200) | ||
| latitude | N | varchar(50) | ||
| longitude | N | varchar(50) | ||
| zip | N | String | ||
| town | N | mediumtext | ||
| city | N | mediumtext | Administrative area | |
| adress | N | mediumtext | ||
| nation | N | mediumtext | ||
| category | N | varchar(255) | ||
| mobile | N | varchar(50) | ||
| surname | N | mediumtext | ||
| name | N | mediumtext | ||
| notes | N | String | ||
| born | N | date | ||
| taxCode | N | String |  | |
| dateJoin | N | date | ||
| vat | N | String | ||
| work | N | String | ||
| company | N | String | ||
| zip_company | N | string | ||
| city_company | N | varchar(255) | ||
| nation_company | N | varchar(255) | ||
| town_company | N | varchar(255) | ||
| address_company | N | varchar(255) | ||
| telephone_company | N | varchar(255) | ||
| fax_company | N | varchar(255) | ||
| gender | N | varchar(30) | ||
| custom1 | N | varchar(300) | ||
| custom2 | N | varchar(300) | ||
| custom3 | N | varchar(300) | ||
| custom4 | N | varchar(300) | ||
| custom5 | N | varchar(300) | ||
| custom6 | N | varchar(300) | ||
| custom7 | N | varchar(300) | ||
| custom8 | N | varchar(300) | ||
| custom9 | N | varchar(300) | ||
| custom10 | N | varchar(300) | ||
| encryptedPassword | N | String | If set to true, password will be transmitted using MD5, othwerwise they will be tansmitted as plain text. | |
| delete or deleted | N | tinyint(1) | If set to 1, any user will be definitively deleted from VirtualNewspaper and all of his orders will be set in “delete mode”, meaning they will be invisible on VirtualNewspaper back-end, even if all of the infos will be kept stored inside VirtualNewspaper database. |