VNP Input Webservices - Orders/Subscriptions

WS Input Update Order

"wsUpdateOrder.jsp" is a VirtualNewspaper input webservice to collect any order update, as transmitted by an external platform. This webservice needs to be provided with a complete order informations set, even if only few infos have been updated on the external platform.

WS: wsUpdateOrder.jsp

How to invoke this webservice

An external platform informs VirtualNewspaper that an order has been updated. All order details are submitted to VirtualNewspaper.

Warning:
This POST call needs to be url encoded

Webservice url
http://[wwx].virtualnewspaper.it/title_or_platform_name/webservice/wsUpdateOrder.jsp+parameters

Webservice Mandatory Parameters
Mandatory parameters are : orderId and authCode.

Example
Parameters need to be provided using this syntax:
?orderId=536752&authCode=4376527k647358

A new webservice call is needed for every updated order.
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".

Webservice reply

This VirtualNewspaper webservice is able to provide two different replies :

01) Order has been found and its informations have been updated.
In this scenario VirtualNewspaper JSON reply will look like this :

{
“order”:{
internalId: “88261”
productDescription: “1 month subscription”
orderNumber: "VNP-136446314182261"
orderId: "orderExternalId"
}


“status”:”OK”
“request”:“Request parameters”
}

02) Something went wrong and order has not been updated.
In this scenario VirtualNewspaper JSON reply will look like this :

{
“status”:“KO”,
“error”:“Error message”
“request”:“Request parameters”
}

PARAMETERS REFERENCE TABLE

PARAMETER NAME MANDATORY VALUE FORMAT DESCRIPTION
orderId Y string External platform unique order id.
authCode Y string
amount N Double(10,2) Total amount paid by the end user (currency is set within the product)
zip N String ZIP Code
town N String Zone or Locality
city N String City
address N String
nation N String
telephone N String
surname N String
name N String
notes N String
confirmed N int(10)
deleted N tinyint(4)
activationDate N date
expireDate N date
paymentDate N date
gracePeriod N date
paymentCode N String
idGateway or gateway_id N Int
enabledIssues N String Grant access to an edition : yyMMddTITLENAME
custom1 N String Your reference field, can contain anything you need
custom2 N String Your reference field, can contain anything you need
custom3 N String Your reference field, can contain anything you need
custom4 N String Your reference field, can contain anything you need
custom5 N String Your reference field, can contain anything you need
mobile N Strjng
shipping_amount N Double(10,2) Paid by the user for the shipping
company_name N String