Gift Registry API

Overview

This document outlines the purpose, technology, use cases, methods, objects and examples for using the Gift Registry API.

This document focuses on the SOAP interface to this API.

Purpose

The Gift Registry API provides programmatic access to the gift registry database and allows for retrieval and management of customer gift registry data within the system.

The Gift Registry API exposes two primary native interfaces via .NET and SOAP.

Gift Registry API Definition (.NET)

Full documentation for this interface is available in the API Reference.

Gift Registry API Definition (SOAP)

This section documents the SOAP interface to the API.

Endpoint

The SOAP API endpoint for any site is located at https://[siteurl]/global/api/giftregistry.asmx

This endpoint is enabled for access via SOAP as well as HTTP GET and POST. The Service Description is also available directly via this endpoint.

Note: For systems with satellite sites, the API will be available only under the primary site URL.

Security (SOAP Interface Only)

The Gift Registry API via SOAP uses the Permissions System to allow and deny access to users. Use of the API requires a user to be granted the various actions (under iSAMS/API/GiftRegistry) to be able to authenticate and perform the various actions available under this API.

Error Handling

Error handling is primarily left to the caller. Any methods that return an ApiResponse object will provide additional details that can be used to assist when debugging problems.

Where a "Call Identifier" is returned in the Message field of the ApiResponse, then more information can be obtained by contacting eStar.

Methods

Available methods are listed below.

Objects

Available objects are listed below.

Examples

Gift Registry API usage examples are available. These examples demonstrate the use of the API via a SOAP interface and are available in C#.

Methods

Authenticate

See Authenticate.

Search

Searches the gift registry database, returning the gift registry IDs of all gift registries matching the specified search term(s).

Parameters
Name Type Description
authenticationToken String Authentication token to use for this call.
name String All or part of the registrant's or co-registrant's name (i.e. first and last names, separated by a space) to search for.
email String All or part of the registrant's or co-registrant's email address to search for.
externalIdentifier String All or part of the gift registry's external identifier to search for.
eventDate Nullable<DateTime> Date of the gift registry's occasion.
Response

Returns an IntegerArrayApiResponse containing the Gift Registry IDs of all gift registries matching the supplied search terms.

Notes

This method will return the Gift Registry IDs of all gift registries with details matching the input search terms. Results are based on all or part of the individual search terms matching the appropriate gift registry data.

Where more than one search term is provided, the results will be filtered on all provided search terms.

The name search term will return results based on both the registrant's and the co-registrant's first and last names, combined and separated by a space. Searching for a single first or last name is also supported.

eventDate will filter on the day component of eventDate, and ignores the time component of the supplied eventDate.

Empty, null, or all-whitespace search terms are ignored when filtering results.

Retrieve

Retrieves a gift registry using the supplied gift registry ID.

Parameters
Name Type Description
authenticationToken String Authentication token to use for this call.
registryID Integer Gift registry ID of the gift registry to retrieve.
Response

Returns a GiftRegistryApiResponse containing a Registry object for the supplied gift registry ID as the sole entry in the GiftRegistryApiResponse.Data array.

RetrieveSet

Retrieves a set of gift registries using the supplied gift registry IDs.

Parameters
Name Type Description
authenticationToken String Authentication token to use for this call.
registryIDs Integer[] Gift registry IDs of the gift registries to retrieve.
Response

Returns a GiftRegistryApiResponse containing an array of Registry objects for the supplied gift registry IDs in the GiftRegistryApiResponse.Data field.

RecordSale

Records sales against a set of gift registry items on a gift registry.

Parameters
Name Type Description
authenticationToken String Authentication token to use for this call.
registryID Integer Gift registry ID of the gift registry to record sales against.
sales RegistrySale[] The sales to record against items in the specified gift registry.
Response

Returns an ApiResponse indicating success or failure.

Notes

The sales will be recorded against the user associated with the authentication token. Use RegistrySale.Comment if more detail is required.

RecordRefund

Records refunds against a set of gift registry items on a gift registry.

Parameters
Name Type Description
authenticationToken String Authentication token to use for this call.
registryID Integer Gift registry ID of the gift registry to record refunds against.
refunds RegistryRefund[] The refunds to record against items in the specified gift registry.
Response

Returns an ApiResponse indicating success or failure.

Notes

The refunds will be recorded against the user associated with the authentication token. Use RegistryRefund.Comment if more detail is required.

ListAvailableWebsites

See ListAvailableWebsites.

Objects

All dates and times are in UTC.

ApiResponse

See ApiResponse.

IntegerArrayApiResponse

See IntegerArrayApiResponse.

GiftRegistryApiResponse

Contains basic information about the result of a method call, along with an array of Registry objects.

Fields/Properties
Field NameTypeDescriptionNotes
SuccessBooleanIndicates the success or failure of an API method call.A failure (false) response should contain a failure Code and Message in the respective fields.
CodeIntegerA response code for the method call.
MessageStringMessage or output from the method call.
DataRegistry[]Array of Registry objects returned from the method call.May not be populated if Success is true (for example, if a search returned no results). Will not be populated if Success if false.

Registry

A Registry contains information about a customer's gift registry.

Fields/Properties
Field NameTypeDescriptionNotes
IDIntegerThe unique gift registry ID.
ExternalIdentifierStringThe external identifier of the registry.This field can be used to identify a gift registry in a system external to .
ActiveBooleanWhether the gift registry is active or not.
WebsiteIntegerThe website ID of the website the gift registry is associated with.
DateCreatedDateTimeWhen the gift registry was created in the system.
CustomerIDIntegerThe registrant's customer ID.More detail about the registrant can be retrieved through the Customer API.
CustomerForeignIdentityStringForeign identity of the registrant.The foreign identity is a unique identifier for a customer in a system external to .
FirstNameStringThe registrant's first name.
LastNameStringThe registrant's last name.
EmailStringThe registrant's email address.
PhoneStringThe registrant's phone number.
OccasionStringThe type of occasion the registry is for.Available occasions can be managed through the Gift Registry administration console. Typical occasions include birthdays and weddings.
EventDateNullable<DateTime>The date the registry event occurs.May be null if the event date hasn't been set.
DeliveryDateNullable<DateTime>The registrant's preferred delivery date for purchased registry items.May be null if the delivery date hasn't been set.
TitleStringThe title of the registry.
DetailStringAdditional details on the registry's event.
InvitationInsertsNullable<Integer>The requested number of invitation inserts.Zero or null if InvitationInserts has not been set.
ExchangeCardsBooleanWhether the registrant would like exchange cards for purchased items or not.
StoreStringThe name of the store the gift registry is managed through.Stores can be managed through the Gift Registry administration console.
CoRegistrantCoRegistrantThe co-registrant's details.
AddressRegistryAddressThe gift registry delivery address.
RegistryItemsRegistryItem[]The items on the gift registry.
AttributesNameValuePair[]Additional information attached to the gift registry.These attributes are arbitrary key-value data pairs stored against a gift registry, and may differ between systems.
Notes

The registrant is a customer in the system. Registrant details can be retrieved and updated using the Customer API.

CoRegistrant

A co-registrant is another person associated with a gift registry. For example, a wedding gift registry may record the bride as the registrant and the groom as the co-registrant.

Fields/Properties
Field NameTypeDescriptionNotes
FirstNameStringThe co-registrant's first name.
LastNameStringThe co-registrant's last name.
EmailStringThe co-registrant's email address.
Notes

A co-registrant is not a customer in the system, and does not have a customer ID or foreign identity. All data held by the system on a co-registrant is represented above.

A field will be empty if the system doesn't hold that data for the co-registrant.

RegistryAddress

A RegistryAddress is the delivery address for a gift registry.

Fields/Properties
Field NameTypeDescriptionNotes
CompanyStringThe company to deliver to.
StreetAddressStringThe street part of the delivery address.
StreetAddress2StringAn additional address line for the street part of the delivery address.
SuburbStringThe suburb part of the delivery address.
CityStringThe city part of the delivery address.
StateStringThe state part of the delivery address.
PostcodeStringThe postcode part of the delivery address.
CountryStringThe country part of the delivery address.Country is stored as an ISO three-letter country code.
ContactPhoneNumberStringThe phone number associated with the delivery address.
Notes

Fields may be empty depending on what data the site requires for a registry delivery address.

RegistryItem

A product item requested by the registrant on their gift registry.

Fields/Properties
Field NameTypeDescriptionNotes
IDIntegerUnique identifier for the registry item.This is a gift registry item ID, not a product item ID.
BarcodeStringThe barcode of the registry item.
TitleStringThe title of the registry item.
ColourStringThe colour of the registry item.
SizeStringThe size of the registry item.
PriceDecimalThe unit net price of the registry item.
RequestedIntegerThe quantity of the registry item that has been requested by the registrant for a gift registry.
PurchasedIntegerThe quantity of the registry item that has been purchased for a gift registry.
LockedIntegerThe quantity of the registry item that has been purchased for a gift registry but has not dispatched and is still in progress.
Notes

Gift registry items are stored independently to product items. The Barcode identifies the corresponding product item.

RegistrySale

A RegistrySale is used to record the sale of an item against a gift registry.

Fields/Properties
Field NameTypeDescriptionNotes
IDIntegerThe ID of the gift registry item to record the sale against.Obtained by retrieving a Registry.
QuantityIntegerThe quantity of the gift registry item purchased in the sale.
UnitNetDecimalThe unit net price of the gift registry item purchased in the sale.
ReferenceStringA transaction reference for this sale.
CommentStringFree-text field. Can be used to store additional information against the sale.

RegistryRefund

A RegistryRefund is used to record the refund of an item against a gift registry.

Fields/Properties
Field NameTypeDescriptionNotes
IDIntegerThe ID of the gift registry item to record the refund against.Obtained by retrieving a Registry.
QuantityIntegerThe quantity of the gift registry item being returned in the refund.
UnitNetDecimalThe unit net price of the gift registry item being returned in the refund.
ReferenceStringA transaction reference for this refund.
CommentStringFree-text field. Can be used to store additional information against the refund.

NameValuePair

See NameValuePair.

Appendices

Response Codes

The Gift Registry API returns standard API response codes.