question

robert910122 avatar image
robert910122 asked Emily L answered

Rest api how to get all inventory using offset

Hi, anyone can help me with how am I going to get all the inventory from clover if I have 2k products? Thank you

REST API
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Emily L avatar image
Emily L answered

You can paginate your requests with the limit and offset query parameters: https://docs.clover.com/docs/paginating-elements

Continue incrementing the offset until your request retrieves fewer elements than your limit. If you're retrieving 100 items at a time, for example, your first couple calls would look like:

GET {
                 {baseUrl}}/v3/merchants/{
                 {merchantId}}/items?limit=100&offset=0
GET {
                 {baseUrl}}/v3/merchants/{
                 {merchantId}}/items?limit=100&offset=100
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community