# Query Tokens

| Endpoint URL | Route                           |
| ------------ | ------------------------------- |
| Base URL     | api/v1/tokenization/queryTokens |

Example:

<https://uat-secure.galaxypay.vn/api/v1/tokenization/queryTokens>

### Request Message

#### Header

<table><thead><tr><th width="92">Level</th><th width="152">Field Name</th><th width="199">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>apiKey</td><td>Alphanumeric<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Request authenticate</td></tr><tr><td>1</td><td>signature</td><td>Alphanumeric<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Request signature</td></tr></tbody></table>

#### Body

<table><thead><tr><th width="89">Level</th><th width="182">Field Name</th><th width="197">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>requestID</td><td>Alphanumeric(50)<br><em><mark style="color:blue;">mandatory</mark></em></td><td><p>Unique ID for each transaction request</p><p></p><p><strong>Recommend</strong>: <strong>GUID</strong></p></td></tr><tr><td>1</td><td>requestDateTime</td><td>Numeric(14)<br><em><mark style="color:blue;">mandatory</mark></em></td><td><strong>yyyyMMddHHmmss</strong></td></tr><tr><td>1</td><td>requestData</td><td>JSON Object</td><td><br></td></tr><tr><td>2</td><td>customerToken</td><td>Alphanumeric<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Customer identify information that is use for management the linked payment tokens.</td></tr></tbody></table>

```
{
  "requestID": "5761427cf75240f399cdf9d3a39580d4",
  "requestDateTime": "20230727095807",
  "requestData": {
    "customerToken": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI5NXU2MzRKYkZ4VnlBOTVwLVA3ZnpiS3NzcEFhaUFHYmdpcVBmbGktcG9RIn0.eyJleHAiOjE2OTEwMzE0NjMsImlhdCI6MTY5MDQyNjY2MywianRpIjoiMzljNzhhMmMtYTIzOS00ODgyLWIzNTMtMjUyZWVlNTgxYTY2IiwiaXNzIjoiaHR0cHM6Ly9pZC51YXQuZ2FsYXh5am95LnZuL3JlYWxtcy91Y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C4zPYsrw_tbgF2V3y2WKXwuZJs3whsta4h616EQbh101NCq2dfZw1X_X287EQUie8B8DGLyJEAaMMobzKtnmH9CtWcDfonob54YFnjo8yeA2cGpuSpcA3htan8w_IdoeLhVeHQguuGllw0SocDQkp_OmxiJhbiy1JA6QWpI-0ZT10cJDaMLjaoyQ"
  }
}
```

### Response Message

#### Header

<table><thead><tr><th width="91">Level</th><th width="166">Field name</th><th width="192">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>signature</td><td>Alphanumeric<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Response signature</td></tr></tbody></table>

#### Body

<table><thead><tr><th width="94">Level</th><th width="212">Field name</th><th width="188">Data type</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>requestID</td><td>Alphanumeric(50)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Original Request ID</td></tr><tr><td>1</td><td>responseDateTime</td><td>Numeric(14)<br><em><mark style="color:blue;">mandatory</mark></em></td><td><strong>yyyyMMddHHmmss</strong></td></tr><tr><td>1</td><td>responseCode</td><td>Numeric(3)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>See <a href="/pages/sBk2eUqKYscTG2fiXwOK">Response Codes</a> for more detail</td></tr><tr><td>1</td><td>responseMessage</td><td>Alphanumeric(250)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Response message</td></tr><tr><td>1</td><td>responseData</td><td>JSON Object<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Response data</td></tr><tr><td>2</td><td>customerID</td><td>Alphanumeric(50)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Customer ID</td></tr><tr><td>2</td><td>customerName</td><td>Alphanumeric(50)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Customer Name</td></tr><tr><td>2</td><td>tokens</td><td>JSON Array<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Linked Card Tokens</td></tr><tr><td>3</td><td>tokenID</td><td>Numeric(10)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Card Token ID</td></tr><tr><td>3</td><td>accountBrand</td><td>Alphanumeric(50)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Card Brand info</td></tr><tr><td>3</td><td>accountSource</td><td>Alphanumeric(50)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Card Issuer info</td></tr><tr><td>3</td><td>accountNumber</td><td>Alphanumeric(50)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Card Masked Number</td></tr><tr><td>3</td><td>accountName</td><td>Alphanumeric(50)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Cardholder name</td></tr></tbody></table>

```
{
  "requestID": "5761427cf75240f399cdf9d3a39580d4",
  "responseDateTime": "20230727095809",
  "responseCode": "200",
  "responseMessage": "Transaction is successful.",
  "responseData": {
    "customerID": "1922dafe-706c-4340-8555-f30f604594d3",
    "customerName": "LU THI THIEU HOA",
    "tokens": [
      "tokenID": "784",
      "accountBrand": "VISA",
      "accountSource": "HD BANK",
      "accountNumber": "445653xxxxxx1096",
      "accountName": "LU THI THIEU HOA"
    ]
  }
}
```


---

# 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.galaxypay.vn/upc/payment-gateway/api-specification/tokenization/customers/query-tokens.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.
