Edit in GitHubLog an issue
Adobe Commerce only. Learn more
Thanks to Atwix for contributing this topic!

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 clipboard
mutation {
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 clipboard
mutation {
moveCartItemsToGiftRegistry (
cartUid:"8k0Q4MpH2IGahWrTRtqM61YV2MtLPApz",
giftRegistryUid:"Owu5mdQ3uyfOAWzj8lFlHZW4uCDaMWC6"
) {
gift_registry {
uid
created_at
owner_name
status
type {
label
}
message
items {
product {
sku
name
}
}
}
status
user_errors {
code
message
product_uid
gift_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": []
}
}
}
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.