Development discussions around Shopify APIs
Hi Shopify Team,
Could you please confirm if the API calls made below are correct for getting the Product Cost. While comparing the product cost extracted from the calls below to the "Cost" field in the Shopify UI, they are not aligning.
Please the urls of the calls made for getting cost currently
Call 1 - "/admin/api/2019-04/orders.json " - We get the product id and variant id from this call at line item level
Call 2 - "/admin/api/2019-04/products.json" – We make this call using the productid. Then once we receive json object, we extract inventory id using variant id.
Call3 - " /admin/api/2019-04/inventory_items/{inventory_item_id}.json" We make this call using the inventory item id, and extract cost.
Is there something wrong with this approach ?
Solved! Go to the solution
This is an accepted solution.
Hi,
I am not able to see any "cost" present with lineItem's object. But, there is "price" present with lineItem. So, is this "price" same as the "cost" which we get from
/admin/api/2019-04/inventory_items/#{inventory_item_id}.json
Thanks.
Hey there,
Why wouldn't you just get the cost you have at the line item level (you also have discounts and tax information)? Would you shed some light on what you are trying to achieve.
This is an accepted solution.
Hi,
I am not able to see any "cost" present with lineItem's object. But, there is "price" present with lineItem. So, is this "price" same as the "cost" which we get from
/admin/api/2019-04/inventory_items/#{inventory_item_id}.json
Thanks.
User | RANK |
---|---|
8 | |
5 | |
3 | |
3 | |
3 |
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...
ByYour online store speed can enhance your store’s discoverability, boost conversion rates a...
ByShopping is at our fingertips with mobile devices. Is your theme optimized to be user-frie...
By