# Subtags in API Extended Data

&#x20; <mark style="background-color:green;">Flex Pro</mark> <mark style="background-color:orange;">Flex Alpha</mark> &#x20;

This document explains how to include subtag data within Extended Data fields on an API request. This can be useful if you want to access data using subtags but do not want to include that data within the Ruleset Response.&#x20;

{% hint style="info" %}
All [Action Data](/features/meta-data/action-data.md) subtags are not available on the API as ixkio will not know the browser/IP/device of the user actually scanning the tag.&#x20;
{% endhint %}

### Step 1 : Create your Extended Data field

*<mark style="color:orange;">Active Folder > Folder Function Panel > Data Tab</mark>*

Create a new Extended Data field by entering a name for your field, selecting 'text' or 'JSON' and clicking 'Add'

<mark style="color:red;">NOTE :</mark> The JSON data type is currently in Beta and should only be used for the NFT metadata Subtag.

### Step 2 : Add the Extended Data field to the API response

*<mark style="color:orange;">Active Folder > Folder Function Panel > Response Tab</mark>*

Change the 'Response' option for your Data Name (as created in Step 1) to 'Add to Response'.&#x20;

### Step 3 :  Add the Subtag to the Extended Data response

*<mark style="color:orange;">Tag Group > Tag Group Data Panel > Extended Tab</mark>*

Under the Extended Data name you just created, enter your Subtag. For example, if you created a Data field called 'scancount', you can add {scount} to dynamically display the Tag Code Scan Count.&#x20;

The resulting API response would be :&#x20;

```json
{
	"xuid": "q8w3sbcz",
	"response": "Pass",
	"scancount": "123"
}
```

{% hint style="info" %}
It's not currently possible to add JSON to an Extended Data field to create more complex responses.&#x20;

We will be added JSON support in Extended Data early in 2023.&#x20;
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ixkio.com/flex-api/subtags-in-api-extended-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
