Skip to content

Shopify Dude Fix

Shopify Gift Card line_item_id Stops Updating in 2027-01: Remove the Write Before It Silently Fails

REST Gift Card line_item_id becomes read-only in Shopify 2027-01. Requests may succeed while ignoring the association field.

Quick answer: Starting with REST Admin API 2027-01, Shopify ignores line_item_id in Gift Card create and update requests. You can still read an existing association, but cannot add, replace, or clear it through this REST property. Remove it from write payloads and stop treating a successful response as proof that the association changed.
On this page

Why a successful API call can be misleading

Shopify announced the change October 30, 2026. A gift card’s line-item association identifies the order line that created it. Older integrations sometimes attempted to backfill or correct this association by sending line_item_id to the Gift Card resource. In 2027-01 Shopify does not reject the entire request for this field; it ignores that part of the payload. That creates a reconciliation risk when an ERP or gift-card service trusts its outgoing request instead of reading the result.

Audit the write path, not just the response parser

Search code, jobs, retry queues, and integration mappings for line_item_id in REST gift card POST and PUT bodies. Remove the field from those writes. Preserve it in response parsing if you need to display or reconcile an existing order association. Earlier API versions retain their prior behavior; this is specifically a versioned change.

// Do not include line_item_id in a 2027-01 Gift Card write.
const giftCardPayload = {
  gift_card: {
    // Include only supported writable Gift Card properties.
    note: 'Issued by support'
  }
};
// After writing, GET the gift card and verify the actual fields.

Do not invent a replacement mutation for this association. Shopify explicitly says there is no replacement API to set, replace, or clear a gift card’s line-item association externally. If your workflow needs that link, preserve the source order and line item in your own integration records, and separately determine whether Shopify already has an association.

Reconcile what Shopify stored

Compare the original gift card record, the request, and the fetched record. Distinguish a gift card issued from an order line from one created independently. Document any assumptions in reporting that equate a non-null line-item ID with a particular issuance process.

Common misunderstanding: A 2xx response proves Shopify accepted the request, so every supplied field must have been saved. In 2027-01, line_item_id is explicitly ignored in Gift Card writes.

How to test this

  1. Identify all Gift Card REST create/update calls and remove line_item_id from their request bodies.
  2. In a development environment, read an existing gift card’s association before making a permitted update.
  3. Make an update without line_item_id; fetch the gift card again and confirm the association did not change.
  4. Check that reconciliation uses the fetched Shopify record rather than the outbound request body.
  5. Run the test on 2027-01 before upgrading production integrations.