Message Exchange
...
Onetrail TPN is providing services in order to trade electronically by using API's. This page describes the specifications for these API's. Onetrail API's requires no 'Pulling' of messages. Choosing this communication, Suppliers and Buyers can POST messages to a Onetrail endpoint, and Onetrail will provide responses back to customer endpoint. It's not yet supported to collect messages from a Onetrail endpoint via REST.
Scope
The Onetrail TPN REST Message exchange API 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 Message exchange API for Buyers supports the real time price and availabilitysending orders.
Design
The Onetrail TPN REST ODE Service Message exchange API 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 The API supports JSON, XML and EDIFACT.
The Onetrail TPN REST Message exchange API Service for Buyers is payload agnostic and supports JSON and XML.
Message definitions
Onetrail TPN supports JSON (P&A only), XML and EDIFACT for the REST servicesMessage exchange API. The message documentation and definitions can be found here: Message Types
Communication
From Seller to Onetrail
...
https://$base_url/exchange/rest/tradingpartner/{toGLN}/msgtype/{msgType}/msg/{msgID}
...
- Method: POST
- Body: XML or EDIFACT content
From Onetrail
...
to Seller
This API needs to be implemented by the seller.
https://$base_url/tradingpartner/{fromGLN}/msgtype/{msgType}/msg/{msgID}
Example: https://testrest.seller.com/tradingpartner/8714253023366/msgtype/Order/msg/OrdReqTest001
- base_url:
- Acceptance: to be provided by the Seller
- Production: to be provided by the Seller
- Variables:
- {fromGLN} = GLN for the buyer sending the message
- {msgType} = Order
- {msgID} = the unique messageID
- Method: POST
- Body: XML, JSON or EDIFACT content
From Buyer to Onetrail
...
https://$base_url/exchange/rest/tradingpartner/{toGLN}/msgtype/{msgType}/msg/{msgID}
...
- Method: POST
- Body: XML, EDIFACT or JSON content
- for JSON, please contact your consultant for additional requirements like namespaces.
From Onetrail to Buyer
The buyer needs to implement a REST API that matches the below definition.
https://$base_url/exchange/rest/tradingpartner/{toGLN}/msgtype/{msgType}/msg/{msgID}
- base_url:
- Acceptance: acc-rest.onetrail.net
- Production: rest.onetrail.net
- Variables:
- {toGLN} = provide the GLN for the buyer, or use fixed value unknown otherwise
- {msgType} = OrderResponse, DespatchAdvice or Invoice
- {msgID} = the unique messageID
- Method: POST
- Body: XML or EDIFACT content
Security
The REST service uses basic authentication and TLS 1.2 security settings. Credentials will be provided by Onetrail., Seller or Buyer.
Downloads
Please find below the OpenApi definition,
Download: MessageExchangeAPI.json