# Get Assets
source: https://developer.mastercard.com/mdes-token-connect/documentation/testing/get-asset-test-case/index.md

|                                                                            Scenarios                                                                             | HTTP Status |                                   Description                                    |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|----------------------------------------------------------------------------------|
| [Scenario 1](https://developer.mastercard.com/mdes-token-connect/documentation/testing/get-asset-test-case/index.md#scenario-1--successful-logo-asset-retrieval) | `200`       | Successfully retrieve a Token Requestor logo asset by valid Asset ID             |
| [Scenario 2](https://developer.mastercard.com/mdes-token-connect/documentation/testing/get-asset-test-case/index.md#scenario-2--asset-id-not-found)              | `default`   | Request fails when Asset ID does not exist in MDES repository                    |
| [Scenario 3](https://developer.mastercard.com/mdes-token-connect/documentation/testing/get-asset-test-case/index.md#scenario-3--malformed-asset-id)              | `default`   | Request fails when Asset ID path parameter is malformed                          |
| [Scenario 4](https://developer.mastercard.com/mdes-token-connect/documentation/testing/get-asset-test-case/index.md#scenario-4--invalid-major-version)           | `default`   | Request fails when major version path parameter is invalid                       |
| [Scenario 5](https://developer.mastercard.com/mdes-token-connect/documentation/testing/get-asset-test-case/index.md#scenario-5--multiple-media-format-variants)  | `200`       | Successfully retrieve asset --- response contains multiple media format variants |

*** ** * ** ***

## Scenario 1 -- Successful Logo Asset Retrieval {#scenario-1--successful-logo-asset-retrieval}

**Assumptions**
> The Asset ID `dbc55444-496a-4896-b41c-5d5e2dd431e2` is a valid, active asset registered in the MDES repository, representing a Token Requestor logo. The caller obtained this Asset ID from a prior `getEligibleTokenRequestors` response.

**When**
> The issuer requests the static asset (logo) for a known Token Requestor using its Asset ID.

Sample Request

    GET /mdes/issuer-assets/1/0/asset/tokenrequestor/dbc55444-496a-4896-b41c-5d5e2dd431e2

**Then**
> MDES returns the asset's media contents, including all available format variants (e.g., PNG and SVG), with Base64-encoded image data, dimensions, and MIME types.

**Expected HTTP Status Code:** `200`

Sample Response

```json
{
  "mediaContents": [
    {
      "type": "image/png",
      "data": "iVBORw0KGgoAAAANSUhEUgAAAMAAAADAAAAAABAAAAAAA==",
      "height": "192",
      "width": "192"
    },
    {
      "type": "image/svg+xml",
      "data": "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg=="
    }
  ]
}
```

*** ** * ** ***

## Scenario 2 -- Asset ID Not Found {#scenario-2--asset-id-not-found}

**Assumptions**
> The Asset ID `aaaaaaaa-0000-0000-0000-000000000000` is a valid UUID format but does not correspond to any asset stored in the MDES repository.

**When**
> The issuer requests an asset using an Asset ID that no longer exists or was never registered in MDES.

Sample Request

    GET /mdes/issuer-assets/1/0/asset/tokenrequestor/aaaaaaaa-0000-0000-0000-000000000000

**Then**
> MDES returns an error indicating the requested asset was not found.

**Expected HTTP Status Code:** `default`

Sample Response

```json
{
  "responseId": "5d4ecdc5-e6cd-47cc-94fc-d6b2dfd3338c",
  "errors": [
    {
      "source": "MDES",
      "reasonCode": "ASSET_NOT_FOUND",
      "description": "The requested Asset ID does not exist in the repository",
      "recoverable": false
    }
  ]
}
```

*** ** * ** ***

## Scenario 3 -- Malformed Asset ID {#scenario-3--malformed-asset-id}

**Assumptions**
> The caller constructs a request with a malformed Asset ID (not a valid UUID format --- e.g., plain text instead of a UUID).

**When**
> The issuer submits a GET request with an Asset ID that does not conform to the expected UUID format.

Sample Request

    GET /mdes/issuer-assets/1/0/asset/tokenrequestor/invalid-asset-id!!

**Then**
> MDES rejects the request with a validation error on the `AssetId` path parameter.

**Expected HTTP Status Code:** `default`

Sample Response

```json
{
  "responseId": "5d4ecdc5-e6cd-47cc-94fc-d6b2dfd3338c",
  "errors": [
    {
      "source": "INPUT",
      "reasonCode": "INVALID_FIELD",
      "description": "Invalid Field - AssetId format is invalid",
      "recoverable": false
    }
  ]
}
```

*** ** * ** ***

## Scenario 4 -- Invalid Major Version {#scenario-4--invalid-major-version}

**Assumptions**
> The caller specifies an unsupported major version `9/9` in the path, which is not a recognized API version in MDES.

**When**
> The issuer submits a GET request using an invalid major version in the path parameter `{maj}`.

Sample Request

    GET /mdes/issuer-assets/9/9/asset/tokenrequestor/dbc55444-496a-4896-b41c-5d5e2dd431e2

**Then**
> MDES rejects the request because the major version specified in the path is not supported.

**Expected HTTP Status Code:** `default`

Sample Response

```json
{
  "responseId": "5d4ecdc5-e6cd-47cc-94fc-d6b2dfd3338c",
  "errors": [
    {
      "source": "INPUT",
      "reasonCode": "INVALID_FIELD",
      "description": "Invalid Field - maj version is not supported",
      "recoverable": false
    }
  ]
}
```

*** ** * ** ***

## Scenario 5 -- Multiple Media Format Variants {#scenario-5--multiple-media-format-variants}

**Assumptions**
> The Asset ID `554dbc44-496a-4896-b41c-dd431e25d5e4` is a valid asset registered in MDES that has multiple format variants: PNG (multiple sizes) and SVG.

**When**
> The issuer retrieves an asset that MDES stores in multiple media formats to support different device resolutions and rendering targets.

Sample Request

    GET /mdes/issuer-assets/1/0/asset/tokenrequestor/554dbc44-496a-4896-b41c-dd431e25d5e4

**Then**
> MDES returns all format variants of the asset in a single response --- the issuer selects the most appropriate format for their target display context.

**Expected HTTP Status Code:** `200`

Sample Response

```json
{
  "mediaContents": [
    {
      "type": "image/png",
      "data": "iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAALGPC==",
      "height": "64",
      "width": "64"
    },
    {
      "type": "image/png",
      "data": "iVBORw0KGgoAAAANSUhEUgAAAMAAAADAAAAAABAAAAAAA==",
      "height": "192",
      "width": "192"
    },
    {
      "type": "image/svg+xml",
      "data": "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg=="
    }
  ]
}
```

