Product Now
The Onetrail Product Now service 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 Product Now version.
Benefits
These are advantages of using the Product Now:
- 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.
- On daily bases you can retrieve a list of changed products and via the bulk request, retrieve the updated products.
Syntax
https://$base_url?{SellerGLN}&{PDINumber}&{SellerVPN}&{GTIN}&{Quantity}&{BidID}
- The API supports basic authentication only, for this you need a service user created in TPN Manager.
Syntax
ProductAPI - v1
API for retrieving product data.
Endpoint: productApi/rest/public
...
/v1/products
...
Method: GET
Summary: Provides product data to buyers. The buyer GLN is determined based on the username
Operation ID: route7
Parameters:
- PDINumber (query): PDI number
- SellerVPN (query): Manufacturer Part Number
- GTIN (query): GTIN
- Quantity (query):
- ACC: https://acc-rest.onetrail.net/productApi/v1/products
- PRD: https://rest.onetrail.net/productApi/v1/products 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 (only supported by a limited number of suppliers)
- BidID (query): BidID = Contract ID for the price of a contract product (not supported by suppliers yet)Remarks:
- At least one of the product numbers is mandatory; Can now handle bulk requests as well as the usual single requests. (For bulk requests the URL is: https://rest.onetrail.net/productApi
- SellerGLN (query): Seller GLN
- RealTime (query): Real time
Responses:
- 200 :
Endpoint: productApi/rest/public/v1/products/bulk
Method: POST
Summary: Get multiple products
Operation ID: route9
Parameters:
- body (body)
Uses basic authentication and user managed in the TPN Manager.
It's now RESTful, no longer SOAP.- Request Types:
For retrieving the list of changed products or single product request, the GET request type is used.
- For retrieving a list of products (bulk) the POST request type is used.
- 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
- : List of requested items
Responses:
- 200 : success
- 204 : no items were found
- 207 : success
- 400 : bad request
- 401 : user not authorized
- 500 : internal server error
- 501 : not supported yet
Endpoint: productApi/rest/public/v1/products/index
Method: GET
Summary: Get product index
Operation ID: route11
Parameters:
- onlyModified (query): Return only modified products
- onlySubscribed (query): Return only subscribed products. Currently only value 'true' is supported.
- SellerGLN (query): Return only products from a particular seller.
Responses:
- 200 : success
- 204 : no items were found
- 400 : bad request
- 401 : user not authorized
- 500 : internal server error
- 501 : not supported yet
Endpoint: productApi/rest/internal/v1/products/buyer/{BuyerGLN}/seller/{SellerGLN}/pdi/{PDINumber}
Method: GET
Summary: An internal endpoint used for fetching product data by the Product Guide
Operation ID: route13
Parameters:
- BuyerGLN (path): Buyer GLN
- SellerGLN (path): Seller GLN
- PDINumber (path): PDI number
Responses:
- 200 :
Endpoint: productApi/rest/internal/v1/healthCheck
Method: GET
Summary: Get full internal health check
Operation ID: route15
Responses:
- 200 :
Endpoint: productApi/rest/public/v1/healthCheck
Method: GET
Summary: Get limited customer health check
Operation ID: route17
Responses:
- 200 :
Endpoint: productApi/rest/public/v1/ping
Method: GET
Summary: Ping endpoint
Operation ID: route18
Responses:
- 200 :
- Body: JSON/XML content. To set the content type you can use the following in your HTTP header:
- application/json
- application/xml
Authentication:
With our update to Product Now, it 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 Product Now requests.
Downloads
Please find below the OpenApi definition for Product Now.
...