Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Onetrail

...

TPN REST Communication

Onetrail TPN™ TPN is providing services in order to trade electronically by using REST. This page describes the specifications for these REST services. Onetrail TPN™ TPN REST solution 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™ 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™ TPN REST for Buyers supports the real time price and availability.

Design

The Onetrail TPN™ 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.

...

Message definitions

Onetrail TPN™ TPN supports JSON (P&A only), XML and EDIFACT for the REST services. The documentation and definitions can be found here: Message Types

Communication

From Seller to Onetrail

...

TPN

https://$base_url/exchange/rest/tradingpartner/{toGLN}/msgtype/{msgType}/msg/{msgID}

...

  • Method: POST
  • Body: XML or EDIFACT content

From Onetrail

...

TPN to Seller

https://$base_url/tradingpartner/{fromGLN}/msgtype/{msgType}/msg/{msgID}

...

  • 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 or EDIFACT content

From Buyer to Onetrail

...

TPN (Order)

https://$base_url/exchange/rest/tradingpartner/{toGLN}/msgtype/{msgType}/msg/{msgID}

...