Our stores have enabled the API access for gift cards. Authorized the app and Account manager has approved access. I am able to successfully query the gift_cards API to see all gift cards.
We would like to get a list of gift cards that have been updated since a particular date. Similar to how we would query the orders with updated_at_min. I apologize, as it is not clear to me when reading the gift card API docs.
https://help.shopify.com/en/api/reference/plus/giftcard#index -- doesn't have a date filter
https://help.shopify.com/en/api/reference/plus/giftcard#search -- not clear to me
Any guidance would be appreciated.
Solved! Go to the solution
Our search syntax documentation includes all information about how to construct your queries for the "/search.json" endpoints on the Customer and Gift Card resources.
If you are looking to search for all gift cards which have been updated after a certain point, you would use the "query" parameter in conjunction with the "updated_at" field.
For example, if you are looking to construct a search for all gift cards which have been updated in 2019 (EST), your query would look like:
The :< operator is used for less-than and the :> operator is used for greater-than. It's also important to note that the date value needs to be a string surrounded by quotation marks.
I'm trying this
Which returns Invoke-RestMethod : The remote server returned an error: (500) Internal Server Error.
This returns no gift cards and no error.
Can you help please, I'm using Invoke-RestMethod within powershell.
Are you still receiving the 500 error? Typically, we recommend that you retry the query after some sort of set time period in case the issue is database related.
The syntax with the quotation marks is the correct syntax.
If you're also able to provide me with the 'X-Request-Id' header for the failing query I can dig in deeper.
|2 hours ago|