Development discussions around Shopify APIs
Hello,
I have this problem on a client store and managed to reproduce it on a development store, so I believe that it is not a store-specific problem.
Retrieving the product with variants via the product endpoint show the obsolete presentment prices
https://danteshirt.myshopify.com/admin/api/2021-01/products.json?ids=4560861921380
{
"products": [
{
"id": 4560861921380,
"title": "3 Styles Men Stretchy Ripped Skinny Biker Red",
"body_html": "<div><p><span><strong>Model Number:</strong> Jeans</span><br><span><strong>Style:</strong> Moto & Biker</span><br><span><strong>Length:</strong> Full Length</span><br><span><strong>Decoration:</strong> Scratched</span><br><span><strong>Fabric Type:</strong> Plaid</span><br><span><strong>Fit Type:</strong> Slim</span><br><span><strong>Pattern Type:</strong> Print</span><br><span><strong>Wash:</strong> Light</span><br><span><strong>Closure Type:</strong> Zipper Fly</span><br><span><strong>Waist Type:</strong> Mid</span><br><span><strong>Jeans Style:</strong> Pencil Pants</span><br><span><strong>Thickness:</strong> Midweight</span><br><span><strong>Gender:</strong> Men</span><br><span><strong>Item Type:</strong> Jeans</span><br><span><strong>Material:</strong> Denim</span></p></div>",
"vendor": "germeshirt",
"product_type": "",
"created_at": "2020-04-16T22:38:15-04:00",
"handle": "3-styles-men-stretchy-ripped-skinny-biker",
"updated_at": "2021-02-24T10:10:29-05:00",
"published_at": "2020-04-16T22:38:11-04:00",
"template_suffix": "",
"published_scope": "web",
"tags": "_wf_cus, color_Red, Men, T-Shirts",
"admin_graphql_api_id": "gid://shopify/Product/4560861921380",
"variants": [
{
"id": 31866273988708,
...
"presentment_prices": [
{
"price": {
"amount": "17.00",
"currency_code": "AUD"
},
"compare_at_price": {
"amount": "22.00",
"currency_code": "AUD"
}
},
{
"price": {
"amount": "10.95",
"currency_code": "EUR"
},
"compare_at_price": {
"amount": "14.95",
"currency_code": "EUR"
}
},
{
"price": {
"amount": "9.00",
"currency_code": "GBP"
},
"compare_at_price": {
"amount": "12.00",
"currency_code": "GBP"
}
}
],
"requires_shipping": true,
"admin_graphql_api_id": "gid://shopify/ProductVariant/31866273988708"
},
],
"image": {
"id": 16910366081124,
"product_id": 4560861921380,
"position": 1,
"created_at": "2021-02-23T04:05:29-05:00",
"updated_at": "2021-02-23T04:14:22-05:00",
"alt": null,
"width": 100,
"height": 99,
"src": "https://cdn.shopify.com/s/files/1/0013/3526/3332/products/thumb_unisex_hoodie_gray.jpg?v=1614071662",
"variant_ids": [],
"admin_graphql_api_id": "gid://shopify/ProductImage/16910366081124"
}
}
]
}
However, retrieving the variants via the variants endpoint show the updated presentment prices
{
"variants": [
{
"id": 31866273988708,
"presentment_prices": [
{
"price": {
"amount": "18.00",
"currency_code": "AUD"
},
"compare_at_price": {
"amount": "24.00",
"currency_code": "AUD"
}
},
{
"price": {
"amount": "8.95",
"currency_code": "EUR"
},
"compare_at_price": {
"amount": "10.95",
"currency_code": "EUR"
}
},
{
"price": {
"amount": "9.00",
"currency_code": "GBP"
},
"compare_at_price": {
"amount": "12.00",
"currency_code": "GBP"
}
}
]
},
...
]
}
We don't want to make another request to the variants endpoint, so can it be fixed?
Thanks and regards.
Hey @davidhoang,
Happy to help you out with this issue. I've completed some additional testing and just wanted to confirm I'm also seeing a discrepancy in presentments prices for the same variant returned via the Product Variant and Product endpoints.
I've gone ahead and created an issue on our end. I don't have a timeline when the issue will be resolved, but will follow-up when I do.
Regards,
John
John C | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
User | RANK |
---|---|
8 | |
7 | |
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