Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search

Doug_Nelson

Member
  • Content Count

    1
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hey farski, I've been able to tackle this issue through API automation. To extract the Inventory ID for the specific products ordered, you need to pull the Order from the Order API and parse the result, specifically (per order row), look at '{lineItems}{<index>}{id}'. I use Python to loop through the products and flatten the structure before import into our backend system, so i do not use the <index> field, I just throw it into a loop that hands me the list of items and I parse the fields I want. Once you have the lineItem ID, you can send that through the Inventory API, and you should get the inventory record you are looking for. Alternatively, as a business process, as I upload or create new inventory on the site, I do a full pull from the Inventory API and then match the internal DB SKU to the SKU connected to the VariantId. I then retain this and when I want to query the inventory item (or change quantity, and hopefully price soon), I can easily extract the ID from my db and submit the right call. Hope that helps.
×
×
  • Create New...