---
title: "Retrieve Query Results"
source_url: https://docs.rapyd.net/en/retrieve-query-results.html
lang: en
---

# Retrieve Query Results

Retrieve the results for a query about a merchant.

This is the second and last step in the process of querying the card networks for records about a merchant. Before you run this method, you must run [Initiate Merchant Query](https://docs.rapyd.net/en/initiate-merchant-query.md "Initiate Merchant Query").

### Parameters

### Request Path Parameters

- - partner_query_reference
  - Unique ID of the query request, defined by the partner.
  - Length: 0-60
  - Regex: `^[\w\s\!\@\#\$\%\^\&\*\(\)\_\+\-\=\[\]\{\}\;\:\'\"\,\.\/\\\?]{0,60}$`

### Request Header Parameters

- - access_key
  - Unique access key provided by Rapyd for each authorized user.

    See [Developers](https://docs.rapyd.net/en/developers.md "Developers").
- - Content-Type
  - Indicates that the data appears in JSON format. Set to **application/json**.
- - salt
  - Random string. Recommended length: 8-16 characters.
- - signature
  - Signature calculated for each request individually.

    See [Request Signatures](https://docs.rapyd.net/en/request-signatures.md "Request Signatures").
- - timestamp
  - Timestamp for the request, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time") (seconds).

### Response Parameters

- match_stats
- Statistics about the query.

  - - query_match_count
    - Deprecated.
  - - registered_match_count
    - Total number of registered matches in the card network termination databases with elements shared with this merchant query.

- matches
- Describes the results of the query.

  - - card_network
    - Name of the card network termination database with a match. One of the following:

      - **MASTERCARD**
      - **VISA**
  - - exact_match
    - List of the data points that match this query exactly. Array of strings.
  - - match_type
    - Type of match. One of the following:

      - **query match** - This merchant query matches elements of a previous merchant query in the card network termination database.

        This means that the queried merchant shares data with a merchant that was previously searched for.
      - **registered match** - This merchant query matches elements of a merchant termination registration in the card network termination database.

        This means that an acquirer terminated the contract of a merchant that shares data with the queried merchant.
  - - matched_merchant
    - Data about the merchant on file in the database.

      - - address
        - Details of the merchant's business address.

          - - address_line_1
            - Line 1 of the address, such as a building number and street name.
          - - address_line_2
            - Line 2 of the address, such as a suite or apartment number, or the name of a named building.
          - - city
            - City portion of the address.
          - - country
            - The two-letter ISO 3166-1 ALPHA-2 code for the country.
          - - postal_code
            - Postal code portion of the address.
      - - business_category
        - The business category of the screened merchant. One of the following:

          - **Merchant**
          - **Payment Facilitator**
          - **Independent Sales Organization**
          - **Marketplace**
          - **Staged Digital Wallet Operator**
          - **Sponsored Merchant**
      - - dba_name
        - The business name of the merchant.
      - - email
        - The primary email address of the merchant.
      - - is_ecommerce
        - Indicates whether the merchant trades through the internet.
      - - legal_name
        - The registered legal name of the merchant.
      - - mcc
        - Merchant category codes of the merchant.
      - - phone_numbers
        - Business phone numbers of the merchant.
      - - principals
        - Details of the registered principal owners of the merchant.

          - - address
            - Details of the owner's business address.

              - - address_line_1
                - Line 1 of the address, such as a building number and street name.
              - - address_line_2
                - Line 2 of the address, such as a suite or apartment number, or the name of a named building.
              - - city
                - City portion of the address.
              - - country
                - The two-letter ISO 3166-1 ALPHA-2 code for the country.
              - - postal_code
                - Postal code portion of the address.
          - - email
            - The primary email address of the owner.
          - - first_name
            - The first name of the owner.
          - - last_name
            - The last name of the owner.
          - - middle_initial
            - The middle initial of the owner.
          - - phone_number
            - The phone number of the owner.
      - - url
        - Web addresses associated with the merchant.
  - - partial_match
    - List of the data points that partly match the query. Array of strings.
  - - registration_info
    - Registration information in the card network's termination database about the merchant and the acquirer that listed the merchant.

      - - contract_end_date
        - End date of the merchant's contract with the acquirer.
      - - contract_start_date
        - Start date of the merchant's contract with the acquirer.
      - - primary_registration_reason
        - Reason that the merchant's contract with the acquirer was terminated.
      - - registered_by_acquirer_id
        - ID of the acquirer that listed the merchant.
      - - registered_by_acquirer_name
        - Name of the acquirer that listed the merchant.
      - - registered_by_acquirer_region
        - Region of the acquirer that listed the merchant.

- query_info
- Information about the query request.

  - - events_status
    - Status of the query of each individual card network termination database. One of the following:

      - - VMSS
        - Visa Merchant Screening Service. One of the following:

          - **ERROR** - The query failed.
          - **IN_PROGRESS** - The query is being processed. Results are not available.
          - **PARTIAL** - The query process is partially complete. Some results are available.
          - **PROCESSED** - The query process is complete. All results are available.

      - - MATCH
        - Mastercard Alert to Control High-risk Merchants. One of the following:

          - **ERROR** - The query failed.
          - **IN_PROGRESS** - The query is being processed. Results are not available.
          - **PARTIAL** - The query process is partially complete. Some results are available.
          - **PROCESSED** - The query process is complete. All results are available.
  - - partner_merchant_reference
    - ID of the merchant, defined by the partner.
  - - partner_query_reference
    - Unique ID of the query request, defined by the partner.
  - - queried_merchant
    - Details of the merchant who is the subject of the query.

      - - address
        - Details of the merchant's business address.

          - - address_line_1
            - Line 1 of the address, such as a building number and street name.
          - - address_line_2
            - Line 2 of the address, such as a suite or apartment number, or the name of a named building.
          - - city
            - City portion of the address.
          - - country
            - The two-letter ISO 3166-1 ALPHA-2 code for the country.
          - - postal_code
            - Postal code portion of the address.
      - - business_category
        - The business category of the screened merchant. One of the following:

          - **Merchant**
          - **Payment Facilitator**
          - **Independent Sales Organization**
          - **Marketplace**
          - **Staged Digital Wallet Operator**
          - **Sponsored Merchant**
      - - dba_name
        - The business name of the merchant.
      - - email
        - The primary email address of the merchant.
      - - is_ecommerce
        - Indicates whether the merchant trades through the internet.
      - - legal_name
        - The registered legal name of the merchant.
      - - mcc
        - Merchant category codes of the merchant.
      - - phone_numbers
        - Business phone numbers of the merchant.
      - - principals
        - Details of the registered principal owners of the merchant.

          - - address
            - Details of the owner's business address.

              - - address_line_1
                - Line 1 of the address, such as a building number and street name.
              - - address_line_2
                - Line 2 of the address, such as a suite or apartment number, or the name of a named building.
              - - city
                - City portion of the address.
              - - country
                - The two-letter ISO 3166-1 ALPHA-2 code for the country.
              - - postal_code
                - Postal code portion of the address.
          - - email
            - The primary email address of the owner.
          - - first_name
            - The first name of the owner.
          - - last_name
            - The last name of the owner.
          - - middle_initial
            - The middle initial of the owner.
          - - phone_number
            - The phone number of the owner.
      - - url
        - Web addresses associated with the merchant.
  - - query_created_at
    - Time of creation of the query, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time").
  - - query_status
    - Overall status of the query of the card network termination databases. One of the following:

      - **ERROR** - The query failed.
      - **IN_PROGRESS** - The query is being processed. Results are not available.
      - **PARTIAL** - The query process is partially complete. Some results are available.
      - **PROCESSED** - The query process is complete. All results are available.

      > **Note:**
      >
      > When the status is **ERROR** or **IN_PROGRESS**, the response `data` section contains only the status field.
  - - search_criteria
    - Deprecated.

- /v1/cnl/termination_query/:partner_query_reference

- Retrieve Query Results - PROCESSED: Registered matches
- ```curl
  curl -X get
  https://sandboxapi.rapyd.net/v1/cnl/termination_query/12345678
  -H 'access_key: your-access-key-here'
  -H 'Content-Type: application/json'
  -H 'salt: your-random-string-here'
  -H 'signature: your-calculated-signature-here'
  -H 'timestamp: your-unix-timestamp-here'
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "c8dff275-ff01-4382-aeb9-f0653c8b2972"
      },
      "data": {
          "match_stats": {
              "registered_match_count": 2,
              "query_match_count": 0
          },
          "query_info": {
              "partner_merchant_reference": "ABCDEFGH",
              "partner_query_reference": "12345678",
              "queried_merchant": {
                  "legal_name": "Four Star Market, Ltd.",
                  "dba_name": "Four Star Market",
                  "address": {
                      "address_line_1": "123 Boulevard St Germain",
                      "address_line_2": "",
                      "city": "Paris",
                      "country": "FR",
                      "postal_code": "12345"
                  },
                  "phone_numbers": [
                      "+1/555 555-5555"
                  ],
                  "business_category": "Merchant",
                  "principals": [
                      {
                          "first_name": "John",
                          "middle_initial": "A",
                          "last_name": "Doe",
                          "email": "john.doe@fourstarmarket.net",
                          "address": {
                              "address_line_1": "123 Rue De Rivoli",
                              "address_line_2": "",
                              "postal_code": "12345",
                              "city": "Paris",
                              "country": "FR"
                          },
                          "phone_number": "+1/555 555-1234"
                      }
                  ],
                  "is_ecommerce": false,
                  "email": "service@fourstarmarket.com",
                  "mcc": ["1234"],
                  "url": [
                      "https://fourstarmarket.com"
                  ]
              },
              "search_criteria": {
                  "search_area": "global"
              },
              "query_status": "PROCESSED",
              "query_created_at": 1714999806182,
              "events_status": {
                  "VMSS": "PROCESSED",
                  "MATCH": "PROCESSED"
              }
          },
          "matches": [
              {
                  "card_network": "VISA",
                  "match_type": "registered match",
                  "exact_match": [
                      "merchant.address.city",
                      "merchant.address.postal_code",
                      "merchant.address.country"
                  ],
                  "partial_match": [
                      "merchant.address.address_line_1"
                  ],
                  "matched_merchant": {
                      "business_category": "",
                      "legal_name": "Snap Photo Inc",
                      "dba_name": "Snap Photo",
                      "address": {
                          "country": "FR",
                          "city": "Paris",
                          "address_line_1": "123 BOULEVARD ST GERMAIN",
                          "address_line_2": "",
                          "postal_code": "12345"
                      },
                      "phone_numbers": [
                          "+1/555 555-5111"
                      ],
                      "email": "",
                      "is_ecommerce": false,
                      "mcc": "3000",
                      "url": ""
                  },
                  "registration_info": {
                      "registered_by_acquirer_id": "40018064",
                      "registered_by_acquirer_region": "",
                      "registered_by_acquirer_name": "",
                      "contract_end_date": "2022-05-15",
                      "contract_start_date": "2022-04-15",
                      "primary_registration_reason": "28-Fraud Conviction"
                  }
              },            
              {
                  "card_network": "MASTERCARD",
                  "match_type": "registered match",
                  "exact_match": [
                      "merchant.address"
                  ],
                  "partial_match": [],
                  "matched_merchant": {
                      "legal_name": "THE BAIT SHOP",
                      "dba_name": "BAIT R US",
                      "address": {
                          "address_line_1": "123 BOULEVARD ST GERMAIN",
                          "postal_code": "12345",
                          "city": "Paris",
                          "country": "FR"
                      },
                      "phone_numbers": [
                          "+1/555 555-5222",
                          "+1/555 555-5333"
                      ],
                      "business_category": "",
                      "principals": [
                          {
                              "first_name": "DAVID",
                              "middle_initial": "",
                              "last_name": "SMITH"
                          }
                      ],
                      "email": "",
                      "mcc": [],
                      "url": [
                          null
                      ]
                  },
                  "registration_info": {
                      "registered_by_acquirer_id": "1998",
                      "registered_by_acquirer_region": "",
                      "registered_by_acquirer_name": "",
                      "contract_end_date": "2024-04-10",
                      "contract_start_date": "",
                      "primary_registration_reason": "13-Illegal Transactions"
                  }
              }
          ]
      }
  }
  ```

- Retrieve Query Results - PROCESSED: No matches
- ```curl
  curl -X get
  https://sandboxapi.rapyd.net/v1/cnl/termination_query/87654321
  -H 'access_key: your-access-key-here'
  -H 'Content-Type: application/json'
  -H 'salt: your-random-string-here'
  -H 'signature: your-calculated-signature-here'
  -H 'timestamp: your-unix-timestamp-here'
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "7684d66c-0dcc-460c-af06-19608602471b"
      },
      "data": {
          "match_stats": {
              "registered_match_count": 0,
              "query_match_count": 0
          },
          "query_info": {
              "partner_merchant_reference": "ijklmnop",
              "partner_query_reference": "87654321",
              "queried_merchant": {
                  "legal_name": "Five Star Market, Ltd.",
                  "dba_name": "Five Star Market",
                  "address": {
                      "address_line_1": "456 Rue de la Bombarde",
                      "address_line_2": "",
                      "city": "Lyon",
                      "country": "FR",
                      "postal_code": "67890"
                  },
                  "phone_numbers": [
                      "+1/555 555-5555"
                  ],
                  "business_category": "Merchant",
                  "principals": [
                      {
                          "first_name": "John",
                          "middle_initial": "Q",
                          "last_name": "Public",
                          "email": "john.public@fivestarmarket.net",
                          "address": {
                              "address_line_1": "456 Place Bellecour",
                              "address_line_2": "",
                              "postal_code": "67890",
                              "city": "Lyon",
                              "country": "FR"
                          },
                          "phone_number": "+1/555 555-1234"
                      }
                  ],
                  "is_ecommerce": false,
                  "email": "service@fivestarmarket.com",
                  "mcc": ["1234"],
                  "url": [
                      "https://fivestarmarket.com"
                  ]
              },
              "search_criteria": {
                  "search_area": "global"
              },
              "query_status": "PROCESSED",
              "query_created_at": 1715876085483,
              "events_status": {
                  "VMSS": "PROCESSED",
                  "MATCH": "PROCESSED"
              }
          },
          "matches": []
      }
  }
  ```

- Retrieve Query Results - PARTIAL
- ```curl
  curl -X get
  https://sandboxapi.rapyd.net/v1/cnl/termination_query/ABCD1234
  -H 'access_key: your-access-key-here'
  -H 'Content-Type: application/json'
  -H 'salt: your-random-string-here'
  -H 'signature: your-calculated-signature-here'
  -H 'timestamp: your-unix-timestamp-here'
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "1234-abcd-1234-abcd-1234abcd"
      },
      "data": {
          "match_stats": {
              "registered_match_count": 0,
              "query_match_count": 0
          },
          "query_info": {
              "partner_merchant_reference": "3456WXYZ",
              "partner_query_reference": "ABCD1234",
              "queried_merchant": {
                  "legal_name": "Six Star Market, Ltd.",
                  "dba_name": "Six Star Market",
                  "address": {
                      "address_line_1": "789 Rue de la Bombarde",
                      "address_line_2": "",
                      "city": "Lyon",
                      "country": "FR",
                      "postal_code": "12345"
                  },
                  "phone_numbers": [
                      "+1/555 555-5555"
                  ],
                  "business_category": "Merchant",
                  "principals": [{
                          "first_name": "Jane",
                          "middle_initial": "B",
                          "last_name": "Doe",
                          "email": "jane.doe@sixstarmarket.net",
                          "address": {
                              "address_line_1": "789 Place Bellecour",
                              "address_line_2": "",
                              "postal_code": "09876",
                              "city": "Lyon",
                              "country": "FR"
                          },
                          "phone_number": "+1/555 555-1234"
                      }
                  ],
                  "is_ecommerce": false,
                  "email": "service@sixstarmarket.com",
                  "mcc": ["1234"],
                  "url": [
                      "https://sixstarmarket.com"
                  ]
              },
              "search_criteria": {
                  "search_area": "global"
              },
              "query_status": "PARTIAL",
              "query_created_at": 1726566346,
              "events_status": {
                  "VMSS": "PROCESSED",
                  "MATCH": "ERROR"
              }
          },
          "matches": []
      }
  }
  ```

- Retrieve Query Results - IN_PROGRESS
- ```curl
  curl -X get
  https://sandboxapi.rapyd.net/v1/cnl/termination_query/ABCD1234
  -H 'access_key: your-access-key-here'
  -H 'Content-Type: application/json'
  -H 'salt: your-random-string-here'
  -H 'signature: your-calculated-signature-here'
  -H 'timestamp: your-unix-timestamp-here'
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "903a2e0f-27cf-46c8-974b-fd8c70d4013d"
      },
      "data": {
          "status": "IN_PROGRESS"        
      }
  }
  ```

- Retrieve Query Results - ERROR
- ```curl
  curl -X get
  https://sandboxapi.rapyd.net/v1/cnl/termination_query/1212ABAB
  -H 'access_key: your-access-key-here'
  -H 'Content-Type: application/json'
  -H 'salt: your-random-string-here'
  -H 'signature: your-calculated-signature-here'
  -H 'timestamp: your-unix-timestamp-here'
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "6aae08fe-8e81-41d8-8981-5d56ccd17f8b"
      },
      "data": {
          "status": "ERROR"        
      }
  }
  ```
