Versions Compared

Key

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

...

Onetrail 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™

...

  • 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™ (

...

PnA5)

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:

  • RESTful services have a smaller footprint than SOAP, Parsing JSON is less computationally heavy and memory intensive then XML, however we can still support XML as well.
  • Improved efficiency allows us to support bulk requests as well as single requests, this will allow buyers to retrieve multiple items with 1 request rather than multiple single requests.
  • The health check will allow you to monitor the availability and uptime of the service.

Syntax

https://$base_url/pde/rest/v5/products?{SellerGLN}&{PDINumber}&{SellerVPN}&{GTIN}&{Quantity}&{BidID}

Example: httpshttp://servicesprd-tpn-pna-5.cloud.onetrail.net:8088/pde/rest/v5/products?SellerGLN=8714253023236&PDINumber=C7978A

  • base_url:
    • Acceptance: acc-servicesprd-tpn-pna-5.cloud.onetrail.netProduction: services.onetrail.net:8088
  • Variables:
    • SellerGLN (multiple ; separated)= provide the GLN from the Seller
    • PDINumber = Onetrail TPN™ PDI number
    • SellerVPN = Seller Vendor part number
    • GTIN = Seller Global Trade Item Number (EAN)
    • Quantity = Quantity for which you want the price and availability
    • BidID = Contract ID for the price of a contract product
  • Remarks:
    • At least one of the product numbers is mandatory;
    • Multiple product number types can be specified and will be used in the query independent of the other, so they will be performed individually. If the results relates to the same product, only that product will be returned.
    • Buyer GLN is identified by basic authentication
    • 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.

  • Request Types:
    • 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.

  • Response:
    • If no Seller GLN is specified, the response will contain all products from Sellers that matches the Request of which the buyer has prices
  • Remarks:
    • The JSON response is based on the PRD version 3.1 output
    • The result can contain multiple Onetrail PDI items. In that case the response will contain n-times an ns2:product element
    • The result can contain multiple Seller items per Onetrail PDI item. In that case the response will contain n-time an ns2:sellerInfo element
  • Method: GET
  • Body: JSON/XML content
  • 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.

From Buyer to Onetrail TPN™ (Order)

...