# Retrieve a data extension

Retrieves a data extension for a guest.

Endpoint: GET /v2.1/guests/{guestRef}/extensions/{dataExtensionName}
Version: v2.1
Security: BasicAuth

## Path parameters:

  - `guestRef` (string, required)
    The guest reference. This is a unique identifier of the guest record. If you don't know the guest reference, first retrieve guests.
    Example: "f7aabbca-1c1b-4fc2-be72-3e16294a4f03"

  - `dataExtensionName` (string, required)
    The name of the data extension. If you don't know this value, first retrieve the guest's collection of data extensions.
    Enum: "ext", "ext1", "ext2", "ext3", "ext4", "ext5"

## Query parameters:

  - `expand` (array)
    You can expand items in a collection by setting expand=true. This eliminates the need to send multiple follow-up requests (one for the collection and another for each of its items). This also helps you check if the data you intend to create already exists.
    Example: true

## Response 200 fields (application/json):

  - `createdAt` (string)
    The date and time when the resource was created in Sitecore CDP.
    Example: "2024-01-01T16:17:16.000Z"

  - `guest` (object)

  - `guest.href` (string)
    The URL of the guest.
    Example: "https://api-engage-eu.sitecorecloud.io/v2.1/guests/f7aabbca-1c1b-4fc2-be72-3e16294a4f03"

  - `href` (string)
    The URL of the guest extension.
    Example: "https://api-engage-eu.sitecorecloud.io/v2.1/guests/f7aabbca-1c1b-4fc2-be72-3e16294a4f03/ext1"

  - `key` (string)
    You must set this to default.
    Example: "default"

  - `modifiedAt` (string)
    The date and time when the resource was last updated in Sitecore CDP.
    Example: "2024-01-01T16:17:16.000Z"

  - `name` (string)
    The name of the data extension. You can only use a name once in a collection.
    Example: "ext"

  - `ref` (string)
    Guest extension reference.
    Example: "6a5cb3c2-1a4a-56d8-8a01-1ede232b9db2"

  - `{exampleKey1}` (string,boolean,integer,number)
    A key-value pair in the data extension.
 Example: "vipMember": true
    Example: "{exampleValue1}"

  - `{exampleKey2}` (string,boolean,integer,number)
    A key-value pair in the data extension.
 Example: "loyaltyTier": "level2"
    Example: "{exampleValue2}"

## Response 404 fields (application/json):

  - `code` (integer)
    The HTTP response status code.
    Example: 404

  - `developerMessage` (string)
    Error description for developers.
    Example: "Guest with ref f7aabbca-1c1b-4fc2-be72-3e16294a4f03a for client key {...} was not found"

  - `message` (string)
    Error description.
    Example: "The specified resource does not exist."

  - `moreInfoUrl` (string)
    URL to get more information about the error.
    Example: "https://support.sitecore.com"

  - `status` (integer)
    The HTTP request status.
    Example: 404


