Message Exchange

Onetrail 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 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 Message exchange API for Buyers supports sending orders.

Design

The 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. The API supports JSON, XML and EDIFACT.

The Message exchange API Service for Buyers is payload agnostic and supports JSON and XML.

Message definitions

Onetrail supports JSON, XML and EDIFACT for the Message 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}

Example: https://acc-rest.onetrail.net/exchange/rest/tradingpartner/8714253023366/msgtype/OrderResponse/msg/OrdRspTest001

  • 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

From Onetrail to Seller

This API needs to be implemented by the seller.

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

Example: https://rest.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
    • {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}

Example: https://acc-rest.onetrail.net/exchange/rest/tradingpartner/8714253023236/msgtype/Order/msg/OrdReqTest001

  • base_url:
    • Acceptance: acc-rest.onetrail.net
    • Production: rest.onetrail.net
  • Variables:
    • {toGLN} = provide the GLN for the Seller, or use fixed value unknown otherwise
    • {msgType} = Order
    • {msgID} = the unique messageID (Can be used for duplicate checking)
  • 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}

Example: https://rest.buyer.com/exchange/rest/tradingpartner/8714253023366/msgtype/OrderResponse/msg/OrdRspTest001

  • 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

  • No labels