gs1 Us Data Hub Developer Api Portal User Guide
gs1 Us Data Hub Developer Api Portal User Guide
View/Use API
Developer Portal User Guide
Version 5.5
Date: July 25,
2022
Table of Contents
3
API Tools (OpenAPI, Odata)…..………………………………………………..
GS1 US APIs……………………………………………….……........................ 4
GS1 US Data Hub Developer Portal Home Page ……........................ 6
Profile Screen…............................................................................... 7
API Screen…….……………………………………………………………………… 9
API “Try It” and Search Functionality ............................................ 10
“Try It” for Product…………….......................................................... 11
Request Filters for Product API ……………...................................... 12
Usage Analytics………………………………………………........................... 13
Usage Filters ………………………………………………………………………….. 14
Health Filters …………………………………………………………………………. 15
Activity Summary ...........................................................……………. 16
Browser Considerations…………………….. ...............................……… 17
Appendix A – Sample Product API Results ............................……… 18
Appendix B – Sample Location API Results ................................…… 20
Appendix C – Sample Company API Results ................................… 21
Appendix D – Error Messages ………………………………………………….. 22
GS1 US APIs operate under the OpenAPI (or Odata) standards. Information and
tools associated with these platforms can be accessed directly from the managing
organizations as outlined below.
A list of known tools that implement the 3.0.0 specification of OpenAPI can
be found at the URL below:
https://github.com/OAI/OpenAPI-Specification/blob/master/IMPLEMENTATIONS.md
https://github.com/OAI/OpenAPI-Specification/issues
A set of code libraries for OData can be found at the URL below:
https://www.odata.org/libraries/
Product
GS1 US Product API is based on the OpenAPI standard. GS1 US is currently
supporting 2 versions of this API, with V.4 being maintained in support of legacy API
users. The Product API is a search API and is currently restricted to Data Hub
View/Use subscriptions.
Location
GS1 US Location APIs are based on the OData standard. GS1 US currently supports
a search API for Data Hub View/Use subscriptions (Location-API) and a
Create/Modify API for GLN Managers (MyLocation-API).
Company
GS1 US Company API is based on the OData standard. GS1 US is currently
supporting 2 versions of this API, with V.2 being maintained in support of legacy API
users. The Company API is a search API and is restricted to Data Hub View/Use
subscriptions.
GS1 US Data Hub Developer Portal operates under the Azure API Management
capabilities. The Developer Portal provides you with a way to test your APIs,
check usage, and manage your subscriptions.
3
2
1 Click the hyperlinked titles to display the pages in the Developer's Portal.
Alternatively, you can click the ‘APIs’ option in the menu, as described in step 1.
3 Click the down arrow on your company’s account number for a profile of the
subscription details and their status. This information includes the API Keys
associated with your account
4 Contact GS1 US if you need support:
For API Administration: direct your questions to [email protected]
For API Technical Questions: direct your questions to the
[email protected] mailbox
3 4
2 Email and Organization Name: email address for the member who is
currently signed in account (organization) name
4 Analytics Reports: Click here to view the usage analytics of your API
calls (see example on following page).
1
1 Usage/Health:
Graphic provides
overall usage
statistics for company
APIs
Top Product:
2 Top Subscription:
Top APIs:
Top Operations:
email address for the
Tabular Statistics
filtered and ordered
by specific
subscriptions
Version 2 (v2) uses the RESTful endpoint structure and exchanges data in
JSON format using standard HTTP verbs (GET, PUT, POST, DELETE). Version
2 of the API also supports a subset of the features within the Odata
specification including filtering and paging capabilities. V2 will be sunset
at the end of 2019.
Version 3 (v3) also uses the same endpoint structure and exchanges data
in multiple formats (JSON, CURL, C++, Java, JavaScript, ObjC, PHP, Python
and Ruby). Version 3 added modified date and range of date search
capabilities not available with v2.
Before you invest in building your API, use the “Try It” feature on any API
calls. With Try It, you can send an HTTP request interactively using the API
Reference and immediately see the returned HTTP Response on the
Developer Portal screen. The following pages provide highlights of each call.
Searches using the API may be performed using ODATA. Screen shots of
OpenAPI searches are included at the end of this document. More
information regarding the Odata specifications can be found
at www.odata.org
1 Click the GET button to get a single product or expand the request
url, parameters, headers, etc. This example displays the request
parameters for a multiple product search. Input parameters are
case sensitive
2 Click the “Try IT” button to test your search sample using OpenAPI.
1
2
1 Clicking the GET button will return expand the request url,
parameters, headers, etc.
Select the desired time frame: Today, Yesterday, Last 7 Days, Last 30
1 Days or Last 90 Days.
Below the Usage / Health chart, are summaries of Successful, Blocked and
Failed Calls, Other calls, Total calls, Average Response Time and
Bandwidth for each of these categories:
• Top Products
• Top Subscriptions
• Top APIs
• Top Operations
The Usage tab allows you to filter by date range, API type (product) and the
operation (Get, Post).
5
4
View Calls. This counts the number of times your application has sent a
3 request to the Data Hub API. In the example above the application
initiated a single request on February 1 between 6 and 9 am .
View Bandwidth. Hovering over the Calls graphic will also display
4 bandwidth results for that day/time.
2 Identify the subscription type (1) All Products, (2) All APIs, and (3)
All operations; by using drop down menus to focus on the specific
operation of the API.
3 Review the summary tables provided below the filter for APIs, call
requests (APIs and Operations) and Subscription Types (Products
and Subscriptions)
There is a known limitation within the Google Chrome browser for searches beyond
a 1000 record limit. This issue will result in a page freeze for Data Hub API users
who run their searches through the Developers Portal and who are using the
Chrome browser.
The issue does not restrict any API searches performed outside of the platform and
is a browser restriction (not a Data Hub platform restriction). API searches of
greater than 1000 records operate properly within the Developer’s Portal for all
other Browsers (note that IE is not supported by Data Hub).
"NetPackageContent": {
"NetContent1Count": "",
"NetContent1UnitOfMeasure": "",
"NetContent2Count": "",
"NetContent2UnitOfMeasure": "",
"NetContent3Count": "",
"NetContent3UnitOfMeasure": ""
},
"GlobalProductClassification": "",
"ImageURL": "",
"Ancestors": [],
"Descendants": [],
"IsEnhanced": "",
"ModifiedDate": "2017-10-
10T21:07:24.5700000Z"
},
"messages": [],
"responseCode": "VB0001",
"responseMessage": "Product lookup is
successful"
}
Pragma: no-cache
Cache-Control: no-cache
Date: Tue, 08 Oct 2019 17:28:29 GMT
Set-Cookie:
ApplicationGatewayAffinity=9e2f486c7acfd5cf59a5
616f300d9b6cf221101dd76920dd0124009a562c25d8;Pa
th=/;Domain=internaldh.stage.gs1us.org
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Content-Length: 735
Content-Type: application/json; charset=utf-8
Expires: -1
{
"name": "Johnson & Johnson - HCS",
"name2": "",
"gln": "0705038000007",
"parentGln": null,
"replacedGln": null,
"status": "Active",
"prefix": null,
"industry": "Healthcare",
"roleInSupplyChain": "Supplier",
"address": {
"addressLine1": "425 HOES LN",
"addressLine2": "",
"addressLine3": "",
"city": "PISCATAWAY",
"state": "NJ",
"zip": "08854-4103",
"country": "US",
"phone": "732-562-3293",
"dateUspsVerified": "2016-02-03T00:00:00",
"bypassAddressVerification": false
},
"locationTypes": ["Bill To", "Org Entity"],
"conditionalAttributes": [{
"attributeName": "Business Sector",
"attributeValue": "Health Care - Medical
Devices"
}],
"GDSNGLNLocationTypes": [],
"createDate": "2010-08-10T10:53:47",
"updateDate": "2010-08-10T10:53:47",
"reValidationDate": null,
"GPO": null,
"selfManaged": false
}
Pragma: no-cache
Cache-Control: no-cache
Date: Tue, 08 Oct 2019 17:38:04 GMT
Set-Cookie:
ApplicationGatewayAffinity=af5c790b2bd506af5f5d
e3350dad737f2bfadd050d015ae06b2a4963c1e8c943;Pa
th=/;Domain=internaldh.stage.gs1us.org
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Content-Length: 439
Content-Type: application/json; charset=utf-8
Expires: -1
[{
"Source": "GS1 US, INC.",
"EntityGLN": "0705038000007",
"CompanyName": "Johnson & Johnson Health Care
Systems, Inc.",
"StreetAddress1": "PO BOX 6800",
"StreetAddress2": "",
"StreetAddress3": "",
"City": "PISCATAWAY",
"StateProvince": "NJ",
"ZipCode": "08855-6800",
"Country": "USA",
"GSRN": "101234500011954334",
"ModifiedDate": "2014-10-18",
"Prefixes": {
"UPCPrefix": "705038",
"GS1Prefix": "0705038",
"PrefixStatus": "Active",
"ModifiedDate": "2014-10-18T00:00:00"
}
}]
GS1 US error messaging for API services generally follow REST HTTP Status
Code standards using the below table.
200 OK Successful.
400 Bad Request Bad input parameter. Error message should indicate
which one and why.
401 Unauthorized The client passed in the invalid Auth token. Client
should refresh the token and then try again.
405 Method Not Allowed The resource doesn't support the specified HTTP
verb.
500 Internal Server Error Servers are not working as expected. The request is
probably valid but needs to be requested again later.
Business Terms
BrandName: Indicates the name of the product line used with consumers
Entity GLN: A GLN that uniquely identifies a company that has a business
relationship with GS1 US or another GS1 Member Organization. A single entity GLN
can be associated with other GLNs or with one or more GS1 Company Prefixes.
GLN: Global Location Numbers are used to identify parties to business transactions;
functional groups within a company; or real, physical “places” that might ship,
receive, process, or hold inventories.
GS1 Company Prefix: The GS1 Company Prefix is at the heart of the GS1 system
of identifiers. It forms the base for a family of identifiers that are globally unique
and can be used for a host of different applications. GS1 assigns GS1 Company
Prefixes to entities that administer the allocation of GS1 System identification
numbers. GS1 Company Prefixes are between 7 and 11 digits in length. The GS1
Company Prefix is located on your prefix certificate, and it begins with a zero “0.”
GTIN: Global Trade Item Numbers uniquely identify trade items at all item and
package levels, ensuring that they are always identified correctly anywhere in the
world. Each trade item that is different from another is allocated a separate, unique
GTIN. GTINs are encountered most frequently at retail point of sale and on inner
packs, cases, and pallets of products in a distribution/warehouse environment. They
are commonly used on purchase orders and in delivery and payment documents.
Technical Terms
AI: Application Identifier. AIs identify the meaning and format of data within a
barcode.
API: Application Programming Interface. The API provided by GS1 US in the form
of a web service exposing GS1 US certified data to licensed parties. GS1 US is the
API provider. The licensed parties are the API consumers. API consumers create
the end user product or service that retrieves GS1 US certified data in real-time,
seamlessly integrated into licensed parties’ business applications.
APIM: API Management. Tools to help publish APIs to external, partner, and
employee developers securely and at scale.
GRP: GS1 Registry Platform. A "primary node" of authoritative data about all
GS1 identifiers on the web.
JSON: JavaScript Object Notation. JSON is the Internet media type returned by the
API provider within the HTTP response.