Adobe Commerce only. Learn more.

giftRegistry query

The giftRegistry query retrieves details about the specified gift registry. Use the customer query to return a list of valid uid values.

This query requires a valid customer authentication token.

Syntax

1
giftRegistry(uid: ID!): GiftRegistry

Example usage

The following example returns information about the gift registry with the ID of 1.

Request:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
query{
  giftRegistry(giftRegistryUid: "W9YcRai9JmzGglqP3p0USodTTM3BmjjY"){
    uid
    type {
      uid
      label
    }
    event_name
    owner_name
    status
    privacy_settings
    registrants {
     uid
      firstname
      lastname
    }
    shipping_address {
      street
      city
      region {
        region
      }
      postcode
      country_code
    }
    dynamic_attributes {
      code
      group
      label
      value
    }
    event_name
    items {
      uid
      quantity
      quantity_fulfilled
      product {
        uid
        name
        sku
      }
    }
    message
  }
}

Response:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
{
  "data": {
    "giftRegistry": {
      "uid": "W9YcRai9JmzGglqP3p0USodTTM3BmjjY",
      "type": {
        "uid": "MQ==",
        "label": "Birthday"
      },
      "event_name": "Theo's 45th Birthday",
      "owner_name": "Veronica Costello",
      "status": "ACTIVE",
      "privacy_settings": "PUBLIC",
      "registrants": [
        {
          "uid": "Mg==",
          "firstname": "Stacey",
          "lastname": "Gaines"
        }
      ],
      "shipping_address": {
        "street": [
          "6146 Honey Bluff Parkway"
        ],
        "city": "Calder",
        "region": {
          "region": "Michigan"
        },
        "postcode": "49628-7978",
        "country_code": "US"
      },
      "dynamic_attributes": [
        {
          "code": "event_country",
          "group": "EVENT_INFORMATION",
          "label": "Country",
          "value": "US"
        },
        {
          "code": "event_date",
          "group": "EVENT_INFORMATION",
          "label": "Event Date",
          "value": "2021-01-28"
        }
      ],
      "items": [
        {
          "uid": "MQ==",
          "quantity": 1,
          "quantity_fulfilled": 0,
          "product": {
            "uid": "Nw==",
            "name": "Impulse Duffle",
            "sku": "24-UB02"
          }
        },
        {
          "uid": "Mg==",
          "quantity": 1,
          "quantity_fulfilled": 0,
          "product": {
            "uid": "Mg==",
            "name": "Strive Shoulder Pack",
            "sku": "24-MB04"
          }
        },
        {
          "uid": "Mw==",
          "quantity": 1,
          "quantity_fulfilled": 0,
          "product": {
            "uid": "Nzg0",
            "name": "Supernova Sport Pant",
            "sku": "MP04"
          }
        },
        {
          "uid": "NA==",
          "quantity": 1,
          "quantity_fulfilled": 0,
          "product": {
            "uid": "OTcx",
            "name": "Rapha  Sports Short",
            "sku": "MSH07"
          }
        },
        {
          "uid": "NQ==",
          "quantity": 1,
          "quantity_fulfilled": 0,
          "product": {
            "uid": "OTQ1",
            "name": "Hawkeye Yoga Short",
            "sku": "MSH05"
          }
        },
        {
          "uid": "Ng==",
          "quantity": 1,
          "quantity_fulfilled": 0,
          "product": {
            "uid": "NDk=",
            "name": "Yoga Adventure",
            "sku": "240-LV06"
          }
        },
        {
          "uid": "Nw==",
          "quantity": 1,
          "quantity_fulfilled": 0,
          "product": {
            "uid": "MTk=",
            "name": "Go-Get'r Pushup Grips",
            "sku": "24-UG05"
          }
        }
      ],
      "message": "Theo's 45th Birthday"
    }
  }
}

Input attributes

The giftRegistry query requires the gift registry ID.

Attribute Data Type Description
uid ID! The unique ID assigned to the gift registry

Output 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