Any way to have separate API for each shop on a multistore setup?

bonitabonita Member Posts: 1
We have 5 shops. We use API to pull orders into a warehouse manage system. However since the API is all connected, it get orders from all 5 shops. Our goal is to be able to separate all sales from each shops from the API level and be able to use reorder reports. Any suggestion on how these can be accomplished? Maybe if we use different username (that is locked to one shop only) to get the API, it will generate different token keys?

Thank you very much for the help.


  • Adrian SamuelAdrian Samuel Moderator, Lightspeed Staff Posts: 653 moderator
    edited November 2018
    Hey @bonita! We don't have a separate API thread per shop, as you can imagine, having a separate thread per shop would be a lot of overhead and would translate into a lot of development time.

    A simple workaround this would be to sort and group your data.

    I've written a live example in Node.js for you to explore. Simply enter in your accountID and your Access_Token in the fields at the top and then you'll be able to try the script with your live data. You'll see the final response groups the data from the Order endpoint by shopID.

    You can also add a query parameter to the request to specify the shopID

    Here's an example:{{accountID}}/Order.json?shopID={{shopID}}

    I hope this helps!
    Post edited by Adrian Samuel on

    Adrian Samuel

    Software Developer

    Lightspeed HQ

Sign In or Register to comment.