Understanding Price on Purchase Orders

I noticed for purchase order UHVyY2hhc2VPcmRlcjoxNDc2ODk2 that several line items had the same SKU but different price associated. How is this possible?

Also just to confirm my understanding, does price represent the amount paid by the shiphero account to get the item shipped to the warehouse?

My query:

query {
	purchase_order (id: "UHVyY2hhc2VPcmRlcjoxNDc2ODk2")
	{
		data {
			id
			account_id
			created_at
			subtotal
			shipping_price
			line_items(first: 100) {
				edges {
					node {
						sku
						price
					}
				}
			}
		}
	}
}

Hi Paul,

I’m happy to help here.

I’ve run the query. I noticed, for example, that SKU 1475100F is duplicated, but if I look at the PO in the UI, it is okay, so it is just an issue with the request.

I’ll ask the engineering team to fix that and let you know when it is done.

Have a nice day!

1 Like

Hey @Luisperrone , this is a blocking issue for us, is there any update on the progress of the fix? Thanks

Hi Paul,

I have prioritized the ticket, but there is no assignee yet.
I’ll keep you updated.

Hi Paul,

We discovered that the receiving team managing that PO canceled the products and then modified the pending quantity. That made the products show double.
We can delete the duplicate entries from the DB. Do you want me to proceed?

Hi @Luisperrone, that was one example of a PO that we’ve seen this behavior, but we’ve seen it for many POs. Is there a programmatic way to know which products were cancelled so we can filter out duplicates?

Also, just wanted to repeat my question about the price field in case that was missed:
Does price represent the amount paid by the shiphero account to get the item shipped to the warehouse?

Thanks

Hi Paul,

More customers are suffering from this. But it is not related to Public API. The team is looking into it, and I’ll update you as soon as possible.

Is there a programmatic way to know which products were canceled so we can filter out duplicates?
In the same Purchase orders query, inside the line_items argument, you should find the status of each line item. But since I’ve seen examples where this issue occurs and there are no cancelation. The old theory is incorrect.

Does price represent the amount paid by the shiphero account to get the item shipped to the warehouse?
Sorry i missed this. The price is the cost of the product. Whatever value the manufacturer charged.

Have a nice day!