Lightspeed API integration OMS

WinstonWinston Member Posts: 1

We currently have an order integration with a high volume customer. Since the embedded objects aren't included in the get all orders response I've decided to retrieve all the orders with the Id field only and retrieve all the specific orders.

Is there a more efficient way of doing so?

We require:

* Customer data (Always in order data)

* Order rows (OrderProducts)

* Shipments (For the tracking).

* Shop data for the currency code

We first retrieved all the orders and did 2 calls for the products and the shipments.

This has been reduced to 1 extra call per order.

Is there a way except for using the webhooks or reducing the updatedAt from- and tillDate to get all these embedded order data? Customer info is by default already included in the order data, just not the order products and the shipments. If these data would be included we could lower the requests even more. We do implement rate limiting, but we were curious if there was another way to optimize it even further.

Is there a reason why the orders do not contain the embedded data or why there's no parameter that allows the embedded data to be also loaded? Is it due to load balancing? Out of curiosity.

Thanks in advance!


1 comment

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 878 moderator

    Hi @Winston,

    Thank you for reaching out to us.

    Is there a more efficient way of doing so?

    We require:

    * Customer data (Always in order data) This is in order data

    * Order rows (OrderProducts) This is in order data(same information as in OrderProducts)

    * Shipments (For the tracking). This is in order data (same information as in Shipment)

    * Shop data for the currency code. The currency code is the default code in the shop. There is no way that customers can pay in a different currency than the default. You can find it when you do "/shop.json"

    So you need 2 calls to get the data you want.

    Did you use the eCom Collection for Postman to check this?

Sign In or Register to comment.