Get order_product_id from shipment

WillieWillie Member Posts: 2

Hello,


I'm trying to find the id, relating to the product of an order, from a shipment. When using the shipmentProduct endpoint I'm only getting an ID, I assumed this ID was related to the product ID from an order but this is not the case.



Your support sent me this screenshot, showing order_product_id:


What endpoint do I use to get this information? Support referred me to your API documentation, but I'm unable to find any reference to a order_product_id or anything that relates to that.

3 comments

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 662 moderator

    Hi @Willie,

    Thank you for contacting us.

    The best way to do this is to get the order by ID /orders/12345678.json and check for the product object. Here you'll see if a product is shipped or not and you'll find the productID.

    I hope this helps.

  • WillieWillie Member Posts: 2

    Hello,


    Thanks for your reply.

    That would work if all I wanted to know if a product been shipped or not, but I need to know what product was shipped from a specific shipment. I assumed the shipmentProducts ID was a reference to the actual product, but this doesn't seem to be the case.


    But if I understand correctly, it's not possible to use the ID as shown in the screenshot (in my first post) to determine what order product it is? At least not with the API?

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 662 moderator

    But if I understand correctly, it's not possible to use the ID as shown in the screenshot (in my first post) to determine what order product it is? At least not with the API? Unfortunately not, this ID you see is the ID of the shipmentProduct object. You can use the articleCode, EAN or SKU instead. Also an option is when you don't use one of these fields, then put the productID or variantID in one of those fields.

Sign In or Register to comment.