Querying Multiple Orders

Discussion in 'Shapeways API' started by Lenna, Mar 7, 2017.

  1. Lenna
    Lenna New Member
    I've been working with the API for a while now but I haven't seen a way to do this, can you query the /orders/ endpoint with multiple order-ids and get all their statuses back? In the API it is a dictionary of { orderid => <string> } so I can't give it a list of ids and I can't have multiple orderids.
    I know the API is designed to return multiple orders based on other search criteria but I can't see a way to get the ten specific orders I'd want at a moment.
    any thoughts?
     
  2. imdaveho
    imdaveho Shapeways Employee Product Team
    Hey @Lenna this is an interesting consideration with GETting orders. What's the use case you're thinking of?
     
  3. Lenna
    Lenna New Member
    Currently if I want to get the status of orders I need to query the API one order at a time. Our site tries to show users their shapeways status based on that but as our order numbers are growing we're often running up against the API request limits. It's also much slower for heavy users.
    It would be much more efficient and limit our requests if I could request multiple orders.
    We're also trying to work in a system of notifying users of shapeways shipments but it's been impossible so far because the number of requests we have to make to the API to check for newly shipped orders hits our requests limit very quickly.
    I'd like to just be able to have the json parameter be a list rather than a string or failing that a string of comma separated values. This would reduce our request number by 5-10x and make our systems faster since we wouldn't need to wait for API responses in our site.
     
  4. imdaveho
    imdaveho Shapeways Employee Product Team
    @Lenna this is the next thing we're going to tackle after updating some of our API docs :) I'd also like to see if we can hop on a bi weekly or monthly call to understand your business needs and hear your suggestions around development that can both impact your and our growth
     
  5. Lenna
    Lenna New Member
    That sounds great. We spoke with a couple members of your team yesterday and had some similar ideas.
    I'm more than happy to offer additional thoughts though I think now that we're fully integrated with the reship API and orders seem pretty steady this multiple request system is our last ask.
    It's mostly just a volume question at this point since we need to be able to get more out of the API than it was originally designed to offer.
     
  6. imdaveho
    imdaveho Shapeways Employee Product Team
    @Lenna we just released this feature.

    In order to use it, simply pass in a list of order ids to a GET param orderIds=

    eg. GET api.shapeways.com/orders/v1?orderIds=111111,222222,333333

    Let me know if you have any issue :)