Skip to main content
Home
  • AI Mode
  • Supply Chain Orchestration
    fast
    Supply Chain Orchestration
    • Life Sciences Company
    • Direct Material Supplier
    • Contract Manufacturer
    • Third Party Logistics
    • Wholesale Distributor
    • Healthcare Provider
    • Retail Pharmacy
  • Network
  • Products
    fast
    Products
    • Multienterprise Information Network Tower (MINT)
    • Process Orchestration for Empowered Teams (POET)
    • Track-and-Trace
  • Resources
    fast
    Resources
    • Resource Center
    • TraceLink University
    • Partners
    • Community
    • Events
  • About
    fast
    About
    • Our Story
    • Newsroom
    • Culture and Careers
    • Leadership
    • Our Values
    • Corporate Social Responsibility
    • Contact Sales
  • Log In
    • Tracelink Classic
      TraceLink Classic app.tracelink.com
      Redirect
    • Opus Platform
      Opus Platform opus.tracelink.com
      Redirect
Log In
  • Tracelink Classic
    TraceLink Classic app.tracelink.com
    Redirect
  • Opus Platform
    Opus Platform opus.tracelink.com
    Redirect
Tracelink University

Breadcrumb

  1. Home
  2. Resources
  3. TraceLink University

Intro to APIs

  • Download PDF
  • Share
    • LinkedIn
    • Facebook
    • Mail
    • Twitter

Table of contents

Before referring to the API portion of this guide, users that might integrate via API should work with their TraceLink implementation team to help configure their system and receive the appropriate endpoints and authentication information.

Learn the basics about integrating with the Opus Platform through TraceLink's event-driven APIs:

Event-driven APIs

ClosedIntroduction

The OPUS Platform accepts all APIs through one exposed /api/events endpoint per environment using the POST HTTP method regardless of the operation being performed or the object being operated upon. This is unlike a traditional RESTful Web service, which exposes multiple endpoints where users can perform operations with HTTP methods (e.g. GET, POST, PUT, etc.). The app that handles the request and the objects affected by the request are determined based on the contents of the header section of the request body.These event-driven APIs can be used to integrate the TraceLink app with your company's internal systems (e.g. enterprise resource planning system, warehouse management system).

Request header

The request header contains the metadata associated with the API request. All API calls to the OPUS Platform must include the following key-value pairs in the request header:

  • Content-Type – The media type for the message. Valid value is application/json.
  • Authorization – The authorization token required to connect to the platform and environment.

Request body

The request body contains the message routing and handler information as well as the contents of the request. All API requests submitted to the OPUS Platform must include the following header and payload elements:

  • header – Specifies the event type of the request and the app that will receive the request. This must include the following parameters:
    • headerVersion –The header version. Valid value is 1.
    • eventName – The fully qualified name of the event that will be triggered by the request. This is typically formatted as [app-name]:[event-name]:[version] (e.g. agile-process-teams:add-incident:v1).
    • appName – The application that owns the event (e.g. agile-process-teams).
    • ownerId – The identifier for the company that is providing the app.
    • dataspace – The dataspace within the environment that the request call is being made. Valid value is default.
  • payload– Includes the contents of the request.
ClosedAuthorization

Users are granted authorization to the OPUS Platform through an API token. The users need to generate an API token prior to sending an API request in order to identify a username (an API key) and password (an API secret). A valid username and password must be included in the headers to process the API request successfully. This username and password does not expire, and it can be used in all API calls.

ClosedHTTP response status codes
TraceLink APIs use standard response codes to indicate whether an HTTP request was successful. Response status codes may include, but are not limited to, the following:
ClosedSuccessful response
CodeDescription
200OK. The request was successful.
ClosedRedirect message
CodeDescription
307Temporary Redirect. The client must get the requested resource at another URI with the same HTTP method that was used in the prior request.
ClosedClient error status codes
CodeDescription
400Bad Request. The server could not understand the request due to invalid syntax.
401Unauthorized. The client is unauthenticated, not allowed access, and should re-request credentials.
403Forbidden. The request is valid and the client is authenticated, but the client is not allowed access rights to the content for any reason.
404Not Found. The server cannot find the requested item. This can also mean that the endpoint is valid but the resource does not exist.
ClosedServer error status codes
CodeDescription
500Internal Server Error. The server has encountered an unknown error.
502Bad Gateway. The server is working as a gateway to handle the request and received an invalid response.
503Service Unavailable. The server is not ready to handle the request.
504Gateway Timeout. The server is acting as a gateway and cannot get a response in time.

How to use this guide

ClosedRead the guidelines table

A guidelines table contains element requirements for a message:

Element Type Description
Header

Required. The response header.

headerVersion Integer Required.The version identifier for the call. Valid value is 1.
eventName String Required.The fully qualified name of the add event response. Valid value is agile-process-teams:add-(Undefined variable: local_variables.event name)-response:v1.
ownerId String Required. The identifier for the Owner company associated with the request.
isErr String

Required. Indicates whether the request was successful. Valid values:

  • true – The call was successful.
  • false – The call was not successful. The errCode and errMsg fields provide error information for troubleshooting.
errCode String

Required. The status code of the response.

errMsg String Conditionally required if the call is unsuccessful. The message associated with the error code (e.g. "Process Type is required.").
licensePlate String Required. The unique identifier for the message instance.
exceptionName String

The exception thrown based on the error code.

Valid values:
  • 400 BadRequestException – The request is missing fields or has invalid data.
  • 404 NotFoundException – The request is referencing an object that APT cannot find.
Payload –

Required.(missing or bad snippet)

commentId String Conditionally required if the call is successful. The identifier for the added comment.
ClosedElement

This column indicates the source/element name included in the API call.

ClosedType

This column indicates the element's data format type (e.g. String, Integer, Boolean, Date, or Time).

ClosedDescription

This column indicates whether the element is required for the message and provides a brief description of the element, including any relevant notes (e.g. country requirements, formatting notes, etc.).

Hover over a footnote to display the data input sample for that Data Element. If using the printed version of the document, refer to the matching footnote at the bottom of the table.
ClosedExport a guidelines table to Excel
  1. Navigate to the guidelines table for the message you want to export.
  2. Select the Download icon.
  3. The file downloads locally.

In the Excel output of the API Guidelines:

  • When you open the file in Excel, the following dialog box might display: "The file format and extension of [file name] don't match. The file could be corrupted or unsafe. Unless you trust its source, don't open it. Do you want to open it anyway?" This message is expected. Select Yes to open the file.
  • The Occurs and Length values will be enclosed by square brackets (i.e. [1...1] or [1/20]). These brackets do not change the value of the data and are present to prevent Excel from interpreting the Occurs and Length values as dates or fractions.
ClosedRead the message example

Sample requests and responses, where relevant, are provided for each message.

Below is a Copy Indirect Supplier Incident request example:

{ "header": { "headerVersion": 1, "eventName": "agile-process-teams:copy-indirect-supplier-incident:v1", "ownerId": "94f94f37-2772-4b39-8041-9c2dcfcfff82", "appName": "agile-process-teams", "dataspace": "default", "processNetworkId": "a70ca41a-ef4d-4b5a-b243-26cff72434ce" }, "payload": { "processId": "4ec1229a-d46f-4fc0-878f-188d318db55a", "aptBusinessObjectSummary": "Label misprint", "copyGeneralInfo": true, "copyPartnerInfo": true, "copyImpactInfo": false, "copyReferenceIds": false, "copyRelatedProceses": false }

Sample requests and responses, where relevant, are provided for each message.

ClosedCopy and paste a message example

API examples can be easily copied and pasted into a text editor by selecting Copy.

  1. Create a blank text file and save it locally.
  2. Navigate to the API example that you want to copy.
  3. Select Copy.
  4. Navigate to the first row of the saved text file, right-click, and select Paste.

    The API example's structure is maintained.

    Syntax highlights will not reflect unless enabled in the file editor.

    There is a known issue in the documentation where the example might have extra spaces or quotation marks added if copied through a Chromium-based browser (e.g. Google Chrome, Microsoft Edge). This issue will be fixed in a future revision. For now, if this problem results in a validation error, either:

    • Manually copy the example by highlighting the full text, right-clicking, and selecting Copy.

      or

    • Use a non-Chromium-based browser (e.g. Mozilla Firefox, Apple Safari) to copy the example.

Table of contents

Related Content
Related content
Forecast plan (IDoc)
Forecasting APIs allow companies to exchange data about anticipated product demand and supply availability with upstream supply chain Partners without giving these Partners access to their serialization system of record.
View More
Related content
Forecast plan (X12)
Forecasting APIs allow companies to exchange data about anticipated product demand and supply availability with upstream supply chain Partners without giving these Partners access to their serialization system of record.
View More
Related content
Forecast plan response (IDoc)
Forecasting APIs allow companies to exchange data about anticipated product demand and supply availability with downstream supply chain Partners without giving these Partners access to their serialization system of record.
View More

Cookie Settings

When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies or similar tracking technologies. Please see below for an overview of the categories of cookies and similar technologies used on this site. You can allow or deny some of all of them, except Strictly Necessary Cookies which are required to provide the site to you. However, blocking some types of cookies may impact your experience of the site and services we are able to offer.

Please see our Cookie Policy for more details, including a list of the cookies we use. You can change your consent options at any time by following the “Cookie Settings” link in the Cookie Policy.
'Strictly Necessary' cookies let you move around the Site and use essential features like secure areas, shopping baskets and online billing. Without these cookies you would not be able to navigate between pages or use certain vital features of our Site, so we do not require your consent for their use. These cookies don't gather any information about you that could be used for marketing or remembering where you've been on the internet. For example, we use these Strictly Necessary cookies to identify you as being logged in to the Site. You can set your browser to block or alert you about these cookies, but if you do so, some parts of the Site will not work.
'Performance' cookies collect information about how you use the Site, such as which pages you visit, the time spent on the Site and if you experience any errors. We use performance cookies to provide aggregated statistics on how the Site is used and help us improve the Site including by measuring any errors that occur.
'Functional' cookies are used to provide services or to remember settings to improve your visit. We use 'Functionality' cookies to remember your settings and choices and show you when you're logged in to the Site.
‘Targeting' cookies are linked to services provided by third parties, such as 'Like' buttons and 'Share' buttons. The third party provides these services in return for recognizing that you have visited the Site. We also use 'Targeting' cookies to gather information that could be used to display content that we think may interest you.

Footer

  • Quick Links
    Get a Demo
    TraceLink Network Directory
    The Network
    OPUS Platform
    Technical Support
    Open Jobs
    API: Terms of Use
  • Products
    Multienterprise Information Network Tower
    U.S. DSCSA Compliance
    Targeted Recalls
    Process Orchestration for Empowered Teams
    Serialization
    Global Compliance
  • Resources
    Resource Center
    Events
    TraceLink University
    Partners
    Community
  • About TraceLink
    Our Story
    Newsroom
    Culture & Careers
    Leadership
    Our Values
    Corporate Social Responsibility
  • Hot Topics
    Transaction Integration
    Supply Chain Visibility
    DSCSA Compliance
    Process Orchestration
    Kazakhstan Compliance for Pharmaceuticals
    Kyrgyzstan Compliance for Pharmaceuticals
Follow Us on Social
Facebook
Linkedin
X
Legal & Trust.
© TraceLink Inc. 2009-2026 All Rights Reserved
Contact Us Today
Contact us today to begin your journey toward agentic supply chain orchestration — digitalize your end-to-end supply chain with intelligence, flexibility, and collaborative orchestration.
Contact Us
Stay Up-to-Date
Subscribe to receive industry insights and stay at the forefront of evolving trends.
Subscribe