Skip to content

Insights API

The IBM Food Trust™ Insights API allows authorized users (human and system) to retrieve supply chain and cold chain data for registered food products.

Prerequisites

To use the IBM Food Trust Insights API, you must meet the following prerequisites:

  1. Your organization has subscribed to Insights.

  2. Your data integration experts are familiar with using REST APIs to send data programmatically. Automation of data upload is an ultimate goal to facilitate data sharing.

  3. For IBM Food Trust organizations to share supply chain data, each organization must have defined the appropriate level of data access control. For details on restricting and sharing your data, see Data entitlement mode and Data access control.

Getting started

Take the following steps to get started with the IBM Food Trust Insights API:

  1. Obtain an Authentication Token, as described in Authenticate human users and Authenticate system users.

  2. Submit an Insights API request, with the authentication token in the authorization header.

Swagger

To use the Insights API manually, use the Swagger interface for the following environments:

You must first provide a valid IBM Food Trust authorization token (human user token) on Swagger, using the Authorize button on the top right of the page.

Products endpoints

The products endpoints retrieve product, inventory and dwell time data for the specified product identifier (product ID).

Parameters

The Product ID (query string) identifies the specific product instance for which to retrieve data. The supported formats are shown in Table 1:

Table 1. Supported Product ID formats

Type Example and syntax
EPC LGTIN urn:epc:class:lgtin:0614141.107346.101
urn:epc:class:lgtin:<CompanyPrefix>.<ItemRefAndIndicator>.<Lot> (13 digits + Lot #)
EPC SGTIN urn:epc:id:sgtin:0614141.107346.2017
urn:epc:id:sgtin:<CompanyPrefix>.<ItemRefAndIndicator>.<SerialNumber> (13 Digits + Serial Number)
IBM Food Trust Product ID with Lot # urn:ibm:ift:product:lot:class:1234567890123.product-123.lot4
urn:ibm:ift:product:lot:class:<Company Prefix>.<Item Reference>.<Lot Number>
IBM Food Trust Product ID with Serial # urn:ibm:ift:product:serial:obj:1234567890123.product-123.serial-number-4567
urn:ibm:ift:product:serial:obj:<Company Prefix>.<Item Reference>.<Serial Number>

Locations endpoints

The locations endpoints retrieve product, inventory and dwell time data for the specified location identifier (facility ID).

Parameters

The facility ID (query string) identifies the specific facility (location) for which to retrieve insights data. The supported formats are shown in Table 2:

Table 2. Supported facility ID formats

Type Example and syntax
EPC-SGLN urn:epc:id:sgln:0614141.00777.0
urn:epc:id:sgln:'<CompanyPrefix>.<LocationReference>.<Extension>(12 Digits + Extension)
GS1-GLN 4098765000010
<CompanyPrefix><LocationReference><CheckDigit>(13 Digits)
Location urn:ibm:ift:location:loc:1234567890123.store_123
urn:ibm:ift:location:loc:<Company Prefix>.<Location Reference>
Location with Extension urn:ibm:ift:location:extension:loc:1234567890123.store_123.toydepartment
urn:ibm:ift:location:extension:loc:<Company Prefix>.<Location Reference>.<Extension>

At-risk configurations endpoints

The at-risk configurations endpoints retrieve insights data for the specified organization, product or facility type.

Parameters

The product ID (query string) or facility type (party role code) identifies the specific product or facility type for which to retrieve insights data. The supported formats are shown in Table 3:

Table 3. Supported at-risk configuration product ID formats

Type Example and syntax
EPC LGTIN urn:epc:class:lgtin:0614141.107346.101
urn:epc:class:lgtin:<CompanyPrefix>.<ItemRefAndIndicator>.<Lot>(13 digits + Lot #)
EPC SGTIN urn:epc:id:sgtin:0614141.107346.2017
urn:epc:id:sgtin:<CompanyPrefix>.<ItemRefAndIndicator>.<SerialNumber> (13 Digits + Serial Number)
IBM Food Trust product ID with Lot # urn:ibm:ift:product:lot:class:1234567890123.product-123.lot4
urn:ibm:ift:product:lot:class:<Company Prefix>.<Item Reference>.<Lot Number>
IBM Food Trust product ID with Serial # urn:ibm:ift:product:serial:obj:1234567890123.product-123.serial-number-4567
urn:ibm:ift:product:serial:obj:<Company Prefix>.<Item Reference>.<Serial Number>

The facility type (party role code) identifies the specific facility type for which to retrieve data. The supported formats are shown in Table 4:

Table 4. Supported at-risk configuration facility type formats

IBM Food Trust Party Role Code Name
DISTRIBUTION_CENTER Distribution Center
PROCESSING_FACILITY Processing Facility
PROCESSING_PLANT Processing Plant