Adobe Commerce only. Learn more
moveCartItemsToGiftRegistry mutation
The moveCartItemsToGiftRegistry
mutation moves all items from the cart to a gift registry.
This mutation requires a valid customer authentication token.
Syntax
Copied to your clipboardmutation {moveCartItemsToGiftRegistry (cartUid: ID!,giftRegistryUid: ID!) {MoveCartItemsToGiftRegistryOutput}}
Reference
The moveCartItemsToGiftRegistry
reference provides detailed information about the types and fields defined in this mutation.
Example usage
The following example moves all items from the cart to a gift registry.
Request:
Copied to your clipboardmutation {moveCartItemsToGiftRegistry (cartUid:"8k0Q4MpH2IGahWrTRtqM61YV2MtLPApz",giftRegistryUid:"Owu5mdQ3uyfOAWzj8lFlHZW4uCDaMWC6") {gift_registry {uidcreated_atowner_namestatustype {label}messageitems {product {skuname}}}statususer_errors {codemessageproduct_uidgift_registry_uid}}}
Response:
Copied to your clipboard{"data": {"moveCartItemsToGiftRegistry": {"gift_registry": {"uid": "Owu5mdQ3uyfOAWzj8lFlHZW4uCDaMWC6","status": "ACTIVE","created_at": "2021-05-06 21:19:05","owner_name": "Veronica Costello","type": {"label": "Birthday"},"message": "Birthday","items": [{"product": {"sku": "24-UG06","name": "Affirm Water Bottle "}}]},"status": true,"user_errors": []}}}