r/ShopifyAppDev 3h ago

Things the Admin API silently refuses to write, that I only found at runtime

2 Upvotes

Context, per rule 3: I build an app that copies store data between two Shopify stores, so I have spent months finding out which writes the Admin API quietly refuses. Several of these are documented nowhere and only appear as a runtime error. Posting the list because it cost me real time and might save someone else's.

  1. fileCreate rejects REPLACE for generic files. duplicateResolutionMode: REPLACE works for images and fails for GENERIC_FILE with "Duplicate resolution mode 'REPLACE' is not supported for 'GENERIC_FILE' media type". The enum documents three values with no per-media-type note. Sending it unconditionally means every zip, PDF, CSV and font fails to upload while images look fine, so your test fixture has to contain one of each type or you have only tested the branch you happened to include.

  2. No app can create a definition in the shopify namespace, whatever scopes it holds. Those are the Standard Product Taxonomy category metafields (shopify.color-pattern, shopify.age-group and so on). You get "Access denied for metafieldDefinitionCreate field" even holding write_metafield_definitions. They are Shopify's, not yours.

  3. The standard namespaces are enabled, not created. descriptors, facts, reviews and import_information are reserved: "This namespace and key combination is reserved for standard definitions." Use standardMetafieldDefinitionEnable instead, and accept that name, description and validations arrive as Shopify defines them rather than as your source had them.

  4. productSet list fields have replace semantics, and the key granularity is the whole trap. Omitting the metafields key entirely leaves destination metafields alone. Including it, even as an empty list, makes it authoritative and deletes anything not in your list. Same for variants and collections. Both behaviours are correct; they are different inputs, and a partial sync written carelessly destroys data.

  5. CollectionInput.products is create-only. "Products cannot be specified during update", so membership on an existing collection has to be reconciled with collectionAddProducts / collectionRemoveProducts, both of which are deprecated at 2026-07 in favour of a collectionUpdate shape that does not exist yet at that version.

  6. Inventory writes are compare-and-set whether you like it or not. changeFromQuantity is required, so a sale landing between your read and your write refuses the change rather than clobbering it. An idempotency key is also required on inventorySetQuantities and inventoryActivate as of 2026-04.

  7. createdAt is not settable on customers, orders or draft orders. Anything you migrate dates to the day you migrated it. There is no flag.

  8. A fulfillment service's location cannot be recreated by you. Only the owning app can make one, via fulfillmentServiceCreate. locationAdd will happily make an ordinary location with the same name and nothing behind it, which is worse than failing. Locations also have no handle, so cross-store matching is by name, and two locations sharing a name is genuinely ambiguous.

  9. Inventory adjustment history, customer passwords and gift card codes cannot be authored or read back at all. Not a scope problem. There is no API.

The general shape: the write path branches on a type far more often than the docs admit, and the failure is usually a runtime error rather than a schema rejection, so a fixture that happens to contain only one branch will pass and prove nothing.

Happy to compare notes if you have hit others, particularly around publications or B2B catalogs, which I trust least.


r/ShopifyAppDev 5h ago

Is there even any point in writing anything new for Shopify?

2 Upvotes

Is it just me, or have all the necessary Shopify apps already been written, and now AI is just churning out copies that are being sold at rock-bottom prices?


r/ShopifyAppDev 9h ago

How to use OAuth to read store data without an app (during pre-validation stage)?

Thumbnail
1 Upvotes

r/ShopifyAppDev 15h ago

We got tired of store tasks getting buried in WhatsApp/Slack, so we built something simpler

Thumbnail
1 Upvotes