Onetrail TPN™ is providing services in order to trade electronically by using REST. This page describes the specifications for these REST services.
The Onetrail TPN™ REST for Sellers supports receiving orders, sending order status, despatch advice and invoice messages as well as handling of real-time price and availability requests. The provisioning of product-, price-, and stock data (batch) is not supported via REST, but via SOAP, FTP or email only.
The Onetrail TPN™ REST for Buyers supports the real time price and availability.
The Onetrail TPN™ REST ODE Service for Sellers is payload agnostic, meaning the service is generic for all order related message types and thus not aware of the content of the message. Message validation (schema validation in case of XML) needs to be performed outside of the service. At this moment Onetrail TPN™ is not supporting JSON formatted messages, but only XML and EDIFACT.
The Onetrail TPN™ REST Service for Buyers supports JSON and XML.
Onetrail TPN™ supports JSON (P&A only), XML and EDIFACT for the REST services. The documentation and definitions can be found here: Message Types
https://$base_url/exchange/rest/tradingpartner/{toGLN}/msgtype/{msgType}/msg/{msgID}
https://$base_url/tradingpartner/{fromGLN}/msgtype/{msgType}/msg/{msgID}
Example: https://test.seller.com/tradingpartner/8714253023366/msgtype/Order/msg/OrdReqTest001
Product API
The new version of the Onetrail Product API allows for much faster and more efficient connection to the Onetrail services. It has been developed in order to reduce our footprint and maximize efficiency. Here are the ins and outs of this new Product API version.
Benefits
These are advantages of using the PnA5:
Syntax
https://$base_url/pde/rest/v5/products?{SellerGLN}&{PDINumber}&{SellerVPN}&{GTIN}&{Quantity}&{BidID}
Example: http://prd-tpn-pna-5.cloud.onetrail.net:8088/pde/rest/v5/products?SellerGLN=8714253023236&PDINumber=C7978A
Can now handle bulk requests as well as the usual single requests. (For bulk requests the URL is: https://rest.onetrail.net/productApi/v1/products/bulk
Uses basic authentication and user managed in the TPN Manager.
It's now RESTful, no longer SOAP.
In previous versions of Onetrail PnA, HTTP-GET, REST and SOAP requests were all valid request types. With the current version we've streamlined to accept REST requests only. There are many reasons why, but the main benefits of REST over other request types are as mentioned above: It has a smaller footprint that SOAP, can handle JSON and XML as well as other data types, it's also generally faster, more efficient and requires less bandwidth.
Authentication:
With our update to PnA5 also comes new improved authentication and user management. Every buyer and seller who is set up in the Onetrail TPN Manager will automatically have the rights to submit PnA requests. Previously Onetrail required Buyer credentials for a specific seller, but now it's not necessary.
https://$base_url/exchange/rest/tradingpartner/{toGLN}/msgtype/{msgType}/msg/{msgID}
The REST service uses basic authentication and TLS 1.2 security settings. Credentials will be provided by Onetrail.