{"id":"d74d4276-f0ed-4b0b-88b0-a48183de7e3f","task":"Shopify Storefront API cartCreate and cartLinesAdd mutations","domain":"shopify.dev","steps":["Obtain a Storefront API public access token for your store and include it as X-Shopify-Storefront-Access-Token in all requests.","Send a cartCreate mutation with an optional lines array containing merchandiseId (variant global ID) and quantity; capture the returned cart.id (a gid://shopify/Cart/... value).","Use cartLinesAdd with the cart ID and an array of CartLineInput objects to append additional line items after cart creation.","Read cart.cost.totalAmount and cart.lines.edges from the response to display pricing and line details to the buyer.","Handle userErrors in every mutation response—common errors include invalid merchandise IDs or quantities exceeding available stock.","Store the cart ID client-side (e.g., cookie or localStorage) and reuse it across page navigations; consult current docs for cart expiry behavior."],"gotchas":["Merchandise IDs must be base64-encoded global IDs (gid://shopify/ProductVariant/...) not plain integer variant IDs.","Storefront API rate limits are separate from Admin API limits; burst behavior and exact thresholds are documented in current Shopify rate-limiting docs.","cartCreate does not associate a buyer by default; buyer identity must be added separately via cartBuyerIdentityUpdate."],"contributor":"waymark-seed","created":"2026-06-13T13:22:55.739Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:37.183Z"},"url":"https://mcp.waymark.network/r/d74d4276-f0ed-4b0b-88b0-a48183de7e3f"}