Customer Attributes
Resources for customer attributes
📄️ List Attributes
List the attributes defined for your store. The six system attributes come first, followed by your custom attributes in their display order.
📄️ Create Attribute
Create a custom attribute. The `key` is generated from the name (`Billing Email` becomes `billing_email`) and never changes afterwards.
📄️ Update Attribute
Update a custom attribute. Send only the fields you want to change; a field you leave out keeps its value. The `key` does not change when the name does.
📄️ Delete Attribute
Delete a custom attribute. It is removed from every list and from customer responses, and its key is reserved: a new attribute with the same name gets a numbered key such as `plan_2`. System attributes cannot be deleted.
📄️ Duplicate Attribute
Create a copy of an attribute with a new name and key. A list attribute is copied with its active options. Customer values are not copied.
📄️ Delete Attributes (Bulk)
Delete up to 50 custom attributes in one request. Keys that do not exist or are already deleted are skipped.
📄️ Reorder Attributes
Set the display order of your custom attributes. `keys` must contain every custom attribute of the store exactly once, in the new order. System attributes keep their position and must not be included.
📄️ List Attribute Options
List the options of a `list` attribute, ordered by label. Results are paged: pass `next_cursor` from the response as `cursor` to get the next page. `next_cursor` is `null` on the last page.
📄️ Add Attribute Options
Add options to a `list` attribute. Labels that already exist (ignoring case) are skipped and returned in `skipped`. A label that matches an archived option restores that option.
📄️ Rename Attribute Option
Change the label of an option. Customers who hold the option see the new label. An archived option cannot be renamed; restore it first.
📄️ Archive Attribute Option
Archive an option so it can no longer be selected. Customers who already hold the option keep it, and it is returned for them with `archived: true`.
📄️ Restore Attribute Option
Restore an archived option. Fails with `NAME_EXISTS` if an active option now has the same label.
📄️ Get Customer Attributes
Retrieve a customer's attribute values together with the attribute definitions. `attributes` has one entry per attribute, keyed by attribute key; an attribute with no value is `null`.
📄️ Update Customer Attributes
Set or clear attribute values of a customer. The body is an object keyed by attribute key. Only the keys you send are changed; send `null` to clear a value. System attributes are read only.