Solved

API call to list products does not give any return information

nocool
Visitor
3 1 2

Hello all. I am Ray and 2 days new to shopify.

I am trying to query a full list of products in my store. My store is not published yet because I am trying to understand the api calls that i need to make to list, update, change, and delete product information.

I have uploaded several products with a CSV file and now I am trying to list them.

 

This is what i am using right now for testing before I spend the time writing a python script to handle all of this.

I have made an app in my store and gave it proper permissions to query and update products..

The funky URL is the test url I get when I "view" my store that isn't published yet.

 

My access scope information:

 

Admin API access scopeswrite_inventory, read_inventory, write_products, read_products, write_publications, read_publications, read_analytics, write_product_listings, read_product_listings
Webhook version2024-04
 
 
 
--
What I am calling...

curl -X POST https://7b1e32-be.myshopify.com/admin/api/2024-4/products.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: XXX-Removed-My-Token

 

 

Thanks in advanced for any help.

 

Accepted Solution (1)

nocool
Visitor
3 1 2

This is an accepted solution.

Found my answer.

First.. I changed the URL:

curl -X GET https://7b1e32-be.myshopify.com/admin/api/2024-04/products.json?since_id=0 \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token:

 

I added the "since_id=0" and I got what I was looking for. Per the person who gave this information, you can only get 250 products in your API call.

I am not sure if that is true or not, but I am about to find out...

 

Another thing that sort of got me:

I had removed my products from the store earlier today trying to clear everything out. Apparently that took over 6 hours.

I didn't realize that the product removal from the store completed. Once I saw that I didn't have any products (the url I called was giving the correct information )

I added a test product and tried the API again.

 

When I tried the API it took about 30 minutes to get my 1 little product to show up in my store when I run the API to list the product.

In short,

I was having my issue because of the updates in shopify taking longer than I had expected. Waiting is sometimes a solution 🙂 HAHAHA!!!

AND the missing "since_id" in my call to the url..

View solution in original post

Reply 1 (1)

nocool
Visitor
3 1 2

This is an accepted solution.

Found my answer.

First.. I changed the URL:

curl -X GET https://7b1e32-be.myshopify.com/admin/api/2024-04/products.json?since_id=0 \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token:

 

I added the "since_id=0" and I got what I was looking for. Per the person who gave this information, you can only get 250 products in your API call.

I am not sure if that is true or not, but I am about to find out...

 

Another thing that sort of got me:

I had removed my products from the store earlier today trying to clear everything out. Apparently that took over 6 hours.

I didn't realize that the product removal from the store completed. Once I saw that I didn't have any products (the url I called was giving the correct information )

I added a test product and tried the API again.

 

When I tried the API it took about 30 minutes to get my 1 little product to show up in my store when I run the API to list the product.

In short,

I was having my issue because of the updates in shopify taking longer than I had expected. Waiting is sometimes a solution 🙂 HAHAHA!!!

AND the missing "since_id" in my call to the url..