Unable to reset compare at price

Highlighted
New Member
3 1 1

I used to be able to set compare_at_price to null after a product was on sale but now I get an error

Example:

Price was: 1000, Compare at 1200

I want to reset it the Price to 1200, with compare at 0.

(422 Unprocessable Entity) compare_at_price: Compare at price needs to be higher than Price

I can neither set it to 0, so how will I disable the compare_at_price to 0 or null or remove it?

ProductVariant.PUT

https://shopify.dev/docs/admin-api/rest/reference/products/product-variant

0 Likes
Highlighted
New Member
3 0 0

Hello,

If you want to update compareAtPrice with 0 you must put nil (in ruby) or null in value.

All the best.

Thomas

0 Likes