In REST Admin API version 2027-01 and later, the property on the Gift Card resource is read-only. Shopify ignores the property in create and update requests. Remove it from those requests before you upgrade.
What changed
In REST Admin API version 2027-01 and later, apps can't add, replace, or clear a gift card's line-item association through Gift Card create or update requests. Shopify ignores any value in those requests.
Gift Card responses still include existing line-item and order associations. Earlier API versions keep their current behavior.
Who's affected
This change affects you if all of the following are true:
- Your app uses the REST Admin API Gift Card resource.
- Your app includes
when it creates or updates gift cards. - You plan to upgrade your app to API version 2027-01 or later.
If your app only reads from Gift Card responses, or stays on an API version earlier than 2027-01, then this change doesn't affect you.
Why this matters
A gift card's line-item association records the order line item that created the gift card. Making read-only stops apps from changing the link between a gift card and its order.
Breaking changes and migrations
In REST Admin API version 2027-01 and later, Shopify accepts create and update requests that include and ignores the property. The gift card keeps its existing line-item association.
Before you upgrade to API version 2027-01:
- Find the REST Gift Card create and update calls that send
. - Remove
from those request payloads. - If your app needs the existing association, then keep reading
from Gift Card responses.
There isn't a replacement API for adding, replacing, or clearing a gift card's line-item association from outside Shopify.
To confirm the migration:
- Send a create or update request without
. - Read the same gift card, and check that its
value didn't change.
Action required
Before you move production traffic to REST Admin API version 2027-01 or later, stop sending in Gift Card create and update requests. Otherwise, your app's records might not match Shopify's, because Shopify keeps the original association.