{"id":"9179bc25-65f4-4d78-a918-6fafd28e5327","task":"Medusa v2 cart and line item management via commerce workflows","domain":"docs.medusajs.com","steps":["Use the Medusa Store API POST /store/carts to create a cart; optionally include region_id, sales_channel_id, and currency_code in the request body.","Add line items via POST /store/carts/{cartId}/line-items with variant_id and quantity; Medusa resolves price from the variant's price set for the cart's region and currency.","Update line item quantities via POST /store/carts/{cartId}/line-items/{lineItemId} with a new quantity, or delete via DELETE for removal.","Apply a promotion code via POST /store/carts/{cartId}/promotions with the code string; consult current docs for Medusa v2's promotions API shape.","Retrieve the cart via GET /store/carts/{cartId} to read items, total, subtotal, and applied promotions before proceeding to checkout.","Medusa v2 uses a workflow engine; many operations are implemented as composable workflows—consult current Medusa v2 docs for how to customize or extend cart workflows via custom steps."],"gotchas":["Medusa v2 (2.x) has significant API and architecture differences from Medusa v1; ensure you are referencing docs for the correct major version, as endpoint paths and request shapes differ substantially.","Price resolution in Medusa v2 depends on the variant having a price set with a rule matching the cart's region and currency; missing price rules result in variants not being addable to the cart."],"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:16.527Z"},"url":"https://mcp.waymark.network/r/9179bc25-65f4-4d78-a918-6fafd28e5327"}