Adobe Commerce only. Learn more.

addGiftRegistryRegistrants mutation

The addGiftRegistryRegistrants mutation adds a registrant to the specified gift registry.

This mutation requires a valid customer authentication token.

Syntax

1
2
3
4
5
6
7
8
mutation {
  addGiftRegistryRegistrants(
    giftRegistryUid: ID!,
    registrants: [AddGiftRegistryRegistrantInput!]!
  ) {
    AddGiftRegistryRegistrantsOutput
  }
}

Example usage

The following example adds a registrant to the specified gift registry.

Request:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
mutation {
  addGiftRegistryRegistrants (
    giftRegistryUid: "W9YcRai9JmzGglqP3p0USodTTM3BmjjY",
    registrants: {
        firstname: "Monica"
        lastname: "Resendez"
        email: "monica@example.com"
    }
  ){
    gift_registry {
      uid
      event_name
      registrants {
        uid
        firstname
        lastname
      }
    }
  }
}

Response:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
  "data": {
    "addGiftRegistryRegistrants": {
      "gift_registry": {
        "uid": "W9YcRai9JmzGglqP3p0USodTTM3BmjjY",
        "event_name": "Theo's 45th Birthday",
        "registrants": [
          {
            "uid": "Mg==",
            "firstname": "Stacey",
            "lastname": "Gaines"
          },
          {
            "uid": "OA==",
            "firstname": "Monica",
            "lastname": "Resendez"
          }
        ]
      }
    }
  }
}

Input attributes

The addGiftRegistryRegistrants mutation requires the following input.

Attribute Data Type Description
dynamic_attributes [GiftRegistryDynamicAttributeInput] An array of attributes that define elements of the gift registry. Each attribute is specified as a code-value pair
email String! The email address of the registrant
firstname String! The first name of the registrant
lastname String! The last name of the registrant

GiftRegistryDynamicAttributeInput attributes

The GiftRegistryDynamicAttributeInput object contains the following attributes:

Attribute Data Type Description
code ID! A unique key for an additional attribute of the event
value String! A corresponding value for the code

Output attributes

The AddGiftRegistryRegistrantsOutput output object contains the following attribute.

Attribute Data Type Description
gift_registry GiftRegistry The gift registry after adding registrants

GiftRegistry attributes

The GiftRegistry object returns the following attributes:

Attribute Data Type Description
created_at String! The date on which the gift registry was created. Only the registry owner can access this attribute
dynamic_attributes [GiftRegistryDynamicAttribute] An array of attributes that define elements of the gift registry. Each attribute is specified as a code-value pair
event_name String! The name the customer assigned to the event
items [GiftRegistryItemInterface] An array of products added to the gift registry
message String! The message text the customer entered to describe the event
owner_name String! The customer who created the gift registry
privacy_settings GiftRegistryPrivacySettings! An enum that states whether the gift registry is PRIVATE or PUBLIC. Only the registry owner can access this attribute
registrants [GiftRegistryRegistrant] Contains details about each registrant for the event
shipping_address CustomerAddress Contains the customer’s shipping address. Only the registry owner can access this attribute
status GiftRegistryStatus! An enum that states whether the gift registry is ACTIVE or INACTIVE. Only the registry owner can access this attribute
type [GiftRegistryType] Contains details about the type of gift registry
uid ID! The unique ID assigned to the gift registry

GiftRegistryDynamicAttribute attributes

The GiftRegistryDynamicAttribute object implements GiftRegistryDynamicAttributeInterface. It also defines the following attribute.

Attribute Data Type Description
group GiftRegistryDynamicAttributeGroup! An enum that categorizes the dynamic attribute set. The possible values are EVENT_INFORMATION, PRIVACY_SETTINGS, REGISTRANT, GENERAL_INFORMATION, DETAILED_INFORMATION, and SHIPPING_ADDRESS.

GiftRegistryDynamicAttributeInterface attributes

The GiftRegistryDynamicAttribute and GiftRegistryRegistrantDynamicAttribute data types implement the GiftRegistryDynamicAttributeInterface.

This interface contains the following attributes:

Attribute Data type Description
code ID! The internal ID of the dynamic attribute
label String! The display name of the dynamic attribute
value String! A corresponding value for the code

GiftRegistryDynamicAttributeMetadataInterface

The GiftRegistryDynamicAttributeMetadata data type implements the GiftRegistryDynamicAttributeMetadataInterface.

This interface contains the following attributes:

Attribute Data Type Description
attribute_group String! Indicates which group of the dynamic attribute a member of
code ID! The internal ID of the dynamic attribute
input_type String! The input type of the dynamic attribute
is_required Boolean! Indicates whether the dynamic attribute is required
label String! The display name of the dynamic attribute
sort_order Int The order in which to display the dynamic attribute

GiftRegistryItemInterface attributes

This GiftRegistryItemInterface contains the following attributes:

Attribute Data Type Description
created_at String! The date the product was added to the gift registry
note String A brief message about the gift registry item
product ProductInterface The details about the product
quantity Float! The requested quantity of the product
quantity_fulfilled Float! The fulfilled quantity of the product
uid ID! The unique ID assigned to the gift registry item

GiftRegistryRegistrant attributes

The GiftRegistryRegistrant object contains the following attributes:

Attribute Data type Description
dynamic_attributes [GiftRegistryRegistrantDynamicAttribute] An array of attributes that define elements of the gift registry. Each attribute is specified as a code-value pair
email String! The email address of the registrant. Only the registry owner can access this attribute
firstname String! The first name of the registrant
lastname String! The last name of the registrant
uid ID! The unique ID assigned to the registrant

GiftRegistryRegistrantDynamicAttribute attributes

The GiftRegistryRegistrantDynamicAttribute data type implements the GiftRegistryDynamicAttributeInterface. It does not introduce any additional attributes.

GiftRegistryType attributes

The GiftRegistryType object contains the following attributes:

Attribute Data type Description
dynamic_attributes_metadata [GiftRegistryDynamicAttributeMetadataInterface] An array of attributes that define elements of the gift registry. Each attribute is specified as a code-value pair
label String! The display name of the gift registry type
uid ID! The unique ID assigned to the gift registry type