open-api
open-api copied to clipboard
[ENDPOINT] Proposed design change for getListings - add filtering options
Current Endpoint Design Currently there is no way to retrieve only listings that have been recently updated. This means that API user is forced to loop trough all listings and check their updated timestamps. This results in the need to make significantly more API calls than would otherwise be necessary.
Proposed Endpoint Design Change a) (best case) ability to only request listings with last_modified_timestamp larger than X;
b) (still would help a lot) ability to sort listings by their last_modified_timestamp in descending order;
Why are you proposing this change? Our app needs to sync listings on regular intervals on behalf of our users. Since there is no efficient way to find only listings modified since last sync, all listings needs to be queried and their timestamps checked. This is our biggest single issue with current Etsy API and is a source of significant, avoidable IT resource drain for both parties.
Another way in which this could be avoided is creating webhooks. This would eliminate the need to perform frequent syncs all-together.
+1
@kievins We have added the ability to sort by last_modified_timestamp (use "updated" as the input value for "sort_on" parameter).
We have not had an opportunity to address the ability to filter by last_modified_timestamp. Will update the ticket name and add it to our log for review.
Hey @etsyachristensen !
Using sort_on
as 'updated' and sort_order
as 'desc' doesn't solve the problem completely of getting all the updated listings.
Here is an example: Imagine we have a listing that was on position 60 when I first requested updated listings:
Step 1: I request listings with sort_on
as 'updated' && sort_order
as 'desc' AND limit = 50
. The required listing is still on position 60.
Step 2: The listing on position 60 was updated, so that it became on position 1
Step 3: I request "2nd page" of listings with sort_on
as 'updated' && sort_order
as 'desc' && limit = 50
AND offset = 50
.
As a result I will never receive the required listing which was on position 60 when I requested first time.
Any suggestions how to avoid such cases?
Having a parameter like last_modified_timestamp larger than X
would be very helpful, so that we can combine it with sort_on = created
and won't miss any updated listings.
This will contribute for apps to make less requests, so the load to Etsy API will reduce drastically.
Kind regards!