Retrive order data without order_id

We are in the process of setting up a connection between Microsoft Business Central and our logistical partner that usage ShipHero.

Sales orders are created in Shopify and through a ShipHero plugin in Shopify the information is send to the logistical partner. But that same information need to land in Business Central.

The issue with this is that we cannot retrieve the sales orders because we don’t know the order_id that is necessary to get data that belongs to a give sales order. Our developer tried to get a list of all open sales orders from Shiphero, but without luck, this would have been the option as we would then get all the order_id’s so we could retrieve the data that we need to get the orders in BC.

Is there a way to retrieve a list of order_id’s or retrieve the order based on other fields?

Thanks in advance!
RJ

Hey @RWA,

Thanks for reaching out and welcome to our Developer Community!

If you need to grab order information without having access to the order IDs, you could run an orders query with the date filters. A base example is shown below:

{
  orders(order_date_from: "_____", order_date_to: "_____") {
    request_id
    complexity
    data(first: 10) {
      edges {
        node {
          id
          legacy_id
        }
      }
    }
  }
}

Our schema and docs can be found here, I recommend looking at them to see the filters and fields returned by the orders query.

Please let me know if you have any questions or concerns.

Best,
RayanP