What is a Supply Chain

GS1 US Data Hub Help Center

Location API - Get All GLNs

The Location API allows users to search both by a specific Global Location Number (GLN) as well as by the various attributes associated with each GLN. 

If you need to download all shared GLNs, follow the steps below.

Note: for this GetAll workaround, you can use the Post call, which allows you to  search by attribute. This functionality is not a true GetAll. You cannot download every GLN inside GS1 US Data Hub | Location with a single call. 

1. Using the Post call, search for the industry of choice. To download all GLNs, at least one search criteria must be applied. In this example, "Healthcare" is selected as the industry. Each individual call can return up to 1,000 GLNs. 

Note: specify the number of GLNs up to the maximum 1,000 by using the "count" element.

API Count Example

2. After the first call, leverage the "skip" element to call for the next set of records.

For example, “skip”: 1,000 will bypass the first 1,000 records and download the next 1,000 (assuming “count”: 1000 remains). 

Count

Skip

Record Number Returned

Count 1000

 

1-1000 returned

Count 1000

Skip 1000

1-1000 skipped
1001 to 2000 returned

Count 1000

Skip 2000

1-2000 skipped
2001 to 3000 returned

Count 1000

Skip 3000

1-3000 skipped
3001 to 4000 returned
Use the skip and count call until all GLNs are returned.

 

With development and automation, increasing the "skip" amount by any increment will continue calling the tool until no more GLNs are returned.

API Skip Example