Metafield API - Limit

Metafield API - Limit

pcvasconcellos
Shopify Partner
3 0 0

Hi 

 

I've been working with Shopify API and all works perfect, but I've a problem. I can't increase limit of metafield(GET), limit default is 50. Can everyone help me with?

 

/admin/api/2022-10/products/$Product_ID/metafields.json?metafields[limits]=250

 

Thanks

Replies 2 (2)

wbenjamin
New Member
10 0 0

it's not 'limits', it's 'limit'

/admin/api/2022-10/products/$Product_ID/metafields.json?limit=250

If your result set comes back with a count of 250 it means you reached the limit of that request.

To get additional records you need to send the id of the last record you received and include 'since_id' in your next request

 

/admin/api/2022-10/products/$Product_ID/metafields.json?limit=250&since_id=[id]

 

If you set since_id to 0 when you make your call it will start at the beginning of the result set.

pcvasconcellos
Shopify Partner
3 0 0

Thanks, wbenjamin

 

But when I use url in this formt /admin/api/2022-10/products/$Product_ID/metafields.json?limit=250&since_id=[id] return nothing.  Just return in this format /admin/api/2022-10/products/$Product_ID/metafields.json?metafields[limit]=250, but just 50  metafields.

 

Thanks