VNP Output Webservices - Orders/Subscriptions
"OrderRegistration.jsp" is a VirtualNewspaper output webservice to push any collected order to an external platform. The external platform needs to provide a transaction response, providing its own internal oder ID. Each time a new order is collected by VirtualNewspaper, all of its informations are automatically transmitted to the external platform.

VirtualNewspaper calls an external platform webservice each time a new order is collected, providing a complete set of fields and informations, as stored by VirtualNewspaper.
Warning:
This POST call will be url encoded
Webservice url
Any external platform needs to provide a proper webservice url, allowing VirtualNewspaper to make its own call.
Parameters
VirtualNewspaper will transmit the complete parameters set, even if only few of them have been compiled by the end user. Any external platform needs to be ready to collect and store informations VirtualNewspaper will transmit.
Example
Parameters will be provided using this syntax:
?customerId=376387&product_id=fr34df56&and_so_on...
A different call will take place for every new order collected.
Parameters and their values, will be separated by the "equal to" char ("=").
After each parameter/value an "&" char is provided.
Any external platform, once datas will be collected, needs to reply with its own internal order ID.
Two different replies are expected by VirtualNewspaper :
01) Order has been successfully created and this is the order ID as registered by the external platform.
In this scenario a JSON reply will look like this :
{
"status": “OK”
"orderId: “23513”
}
VirtualNewspaper will link its own internal order id with the external one provided by any external platform.
02) Something went wrong and order has not been stored.
In this scenario a JSON reply will look like this :
{
“status”:“KO”
“message”:“Error message”
}
| PARAMETER NAME | VALUE FORMAT | DESCRIPTION |
|---|---|---|
| orderId | string | External platform unique order id |
| id | int(11) | VirtualNewspaper internal unique order id |
| activationDate | date | Subscription start date |
| expireDate | date | Subscription expiration date |
| customerId | int(11) | External platform unique customer id |
| [provider]_uid | String(255) | Third party provider unique customer id. In case users datas are handled by a third party this will contain the third party user ID. E.g. If the third party is Gigya the parameter will be named gigya_uid |
| product_id | String | External platform unique product id (it needs to be set in VirtualNewspaper back-end panel) |
| number | varchar(60) | VirtualNewspaper auto generated order number |
| date | date | Order registration date |
| amount | Double (10,2) | Total amount |
| discount | decimal(10,2) | Total discounted value |
| discountPerc | decimal(10,2) | Discount % |
| discountCode | varchar(30) | Coupon code applied to activate any discount |
| confirmed | int(11) | (1 or 0) if set to 1, any order will be activated |
| device | varchar(150) | End user device (e.g. web, android, ios) |
| deleted | tinyint(4) | (1 or 0) if set to 1, any order will be hide (as deleted) from VirtualNewspaper back-end |
| appId | String | |
| apple_transaction_id | varchar(20) | |
| articleCode | String | |
| articleName | String | |
| gateway_id | int(10) | |
| id_user | Int | VirtualNewspaper unique User Id |
| monthsValidity | Int |  |
| payment_Id | int(11) |  |
| paymentDate | date | |
| shipping | mediumtext | |
| shipping_administrative_area_level_1 | varchar(200) | |
| shipping_administrative_area_level_2 | varchar(200) | |
| shipping_administrative_area_level_3 | varchar(200) | |
| shipping_formatted_address | varchar(500) | |
| shipping_ordini.lat | varchar(50) | |
| shipping_ordini.lng | varchar(50) | |
| shippingAddress | mediumtext | |
| shippingCity | mediumtext | |
| shippingCompany | String | |
| shippingName | mediumtext | |
| shippingNation | mediumtext | |
| notes | mediumtext | |
| shippingPrice | String | |
| shippingSurname | mediumtext | |
| shippingTelephone | mediumtext | |
| shippingTown | mediumtext |  |
| shippingWeight | Double (7,2) | |
| shippingZip | String |  |
| transactionId | varchar(20000) |  |
| enabledIssues | String | Grant access to this edition: yyMMddTITLENAME |
| detailOrders | String(JSON) | JSon array containing all the products purchased in this transaction (e.g. detailOrders=[{"article_id":"988328","articleCode":"ART-988328","articleName":"1 month subscription","monthsValidity":"1"}, {"article_id":"513322","articleCode":"ART-513322","articleName":"1 month subscription","monthsValidity":"1"}]) where article_id is the product_id purchased mostly the only useful field in the JSON |