Get product with the kit to which it belongs

Hi, I am new to shiphero.

I have been developing a software with php where the only data known is the order number. From there I do a query to Order and then get the product with the sku from the line_item. I want to get the variants of this product and researching and reading documentation is with kit_components.

For example, I have a product with sku “AB-123-60”. This product belongs to a kit with sku “AB-60”, but if I do a product query including kit and kit_components I get false and an empty array.

"kit": false,
"kit_components": []

But this does not happen if I do a product query with sku “AB-60” because it is a kit and it would give me an array with the sku’s.

"kit": true,
 "kit_components": [
           {
               "sku": "AB-123-60"
           },
           {
               "sku": "AB-456-60"
           },
           {
               "sku": "AB-789-60"
           }
]

Is there any way to get which kit this product belongs to? Remember that the only data known is the order number and then we get product sku.

If not, would it be possible to add an attribute that returns to which kit this product belongs. For the moment our solution has been to add that sku in product_notes.

1 Like

Hey @egalindo,

Thanks for reaching out and welcome to our Developer Community!
I’ll take a look at this and get back to you shortly.

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

Best,
RayanP

1 Like

Hey @egalindo,

Thanks for hanging in there!

It is currently impossible to tell which kit a product belongs to directly. A replacement for inputting the SKU into product notes could be to add that information as a tag if that works better for you.

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

Best,
RayanP

1 Like

Hey @egalindo,

Hope you’re doing well!

I also wanted to let you know I’ve passed this feedback along to the team regarding finding the SKU connection to a kit. I’ll update you here as the updates come in.

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

Best,
RayanP

1 Like