cancel
Showing results for 
Search instead for 
Did you mean: 
CommunityJedi22
Community Manager
Community Manager

This document describes how to use the APIs to access product data from 1WorldSync Content1 API. It details the various parameters required to access and use the service, such as web service URLs, and request and response formats.

Comments
ArturZ
New Contributor

Hi!

Where can I get â€œitemReferenceId" for the items that I want to fetch the details for via the API? Looked in the IM but nothing there.

 

Thanks,

Artur

CommunityJedi22
Community Manager
Community Manager

Hello, Artur.  Thank you for reaching out to us via our community platform.  Please make sure to review the API docs on the Developer Website as well. 

To answer your question, this is the location for the FIRST item in the json response.  It is the itemIdentificationInformation section near the top of each item.  If you are looking at document json formatted (so it is not all on 1 line), depending on the font size, it will be at the bottom of the first page, or if you page down once it should be visible

tduncan
New Contributor

Hello, I have written a system that loops through a list of GLNs and fetches all the GLN's items. Then it compares the newly fetched items to my database of items saved from the last fetch. Changed items are updated, new ones are added.

This system may be a lot of unnecessary work, so I am considering using the lastModifiedDate (from and to) in the fetch request. With this I can request only items from a GLN that have been modified since the system last run. However there are scenarios that would easily miss item data like this:

  • We subscribe to a GLN that hasn't published items to us yet
  • The system runs and finds no items for the GLN; the last fetch date is set to today
  • Tomorrow the new GLN publishes its items to us, all the item's lastModifiedDates are from last year
  • We fail to retrieve any items on the next execution because none were modified since yesterday

Similarly a GLN that we receive item data from publishes a new item to us that has an old lastModifiedDate. This item would not be sent to us if we used the lastModifiedDate in the fetch request.

This problem is much bigger when fetching items from the "public" GDSN where the fetch returns millions of items. If an item is added to the public network with an old lastModifiedDate we would not retrieve it if we used the lastModifiedDate in the fetch request.

Is there a solution here that doesn't require a full GLN fetch?

DanV
Moderator
Moderator

Thank you for reaching out to our customer community.  Welcome.

I'll discuss this with our API escalation teams and circle back with an update later today.

tduncan
New Contributor

Thank you DanV.

It's been a week, do you have any updates?

DanV
Moderator
Moderator

Hi @tduncan 

Apologies for the delay. You would need to pull all items on the first fetch then after, depending on how often you pull data, fetch deltas using lastmodifieddate>= previous date (delta fetch on 04/25 would use lastmodifieddate>=04/24, delta fetch on 04/26 would use lastmodifieddate>= 04/25, etc) if pulling deltas daily, or if skipping days in between delta fetch you would use the lastmodifieddate>= date of last fetch.

 

tduncan
New Contributor

Hi @DanV , thanks for getting back to me.

That doesn't address the problem I described in the original post. Perhaps an example would help:

Nestle publishes 3 items to me, GTINs 1, 2, & 3 for simplicity, all with lastModifiedDates of 04/01. I fetch them successfully using lastModifiedDate>=previous date. Things break when Nestle publishes an old item to me with an older lastModifiedDate. Today Nestle publishes GTIN 4 with a lastModifiedDate of 01/01. When Nestle publishes that item on 04/26, and I fetch >=04/25, I don't receive GTIN 4 because it's lastModifiedDate is earlier. I will never receive GTIN 4 using this algorithm until Nestle modifies GTIN 4 in the future.

Does that help clarify the problem? Given the above, I conclude that I must always fetch all items (which is quite a lot in the public case) and filter out the new/updated ones. Is there a better way?

ana_neamtu
Community Support

Hello @tduncan and welcome back to the customer community!

Thank you for sharing the above details to help clarify the problem. I will escalate this to our API team for further discussion and you should receive a ticket number via email shortly.

Version history
Revision #:
3 of 3
Last update:
‎07-22-2021 03:23 PM
Updated by:
 
Contributors