> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.staple.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.staple.ai/_mcp/server.

# Filter Master Data

GET https://api.staple.io/v2/master-data/{sheetId}

**Purpose**: Retrieve and filter master data records within a specific master data set using dynamic field-based queries

**Description**: This endpoint allows you to search and filter records within a master data collection (identified by master\_data\_id) for a given organization. You can query records by passing field names as query parameters with their corresponding values to match against.

**Notes**:

The endpoint accepts any field from the master data schema as a query parameter

Multiple query parameters can be combined to create complex filter conditions (treated as AND operations)

Returns all records that match ALL provided field-value pairs

Field names must exactly match the schema definition (case-sensitive)

Reference: https://docs.staple.ai/api-reference/v2/master-data/filter-master-data

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: v2
  version: 1.0.0
paths:
  /v2/master-data/{sheetId}:
    get:
      operationId: filterMasterData
      summary: Filter Master Data
      description: >-
        **Purpose**: Retrieve and filter master data records within a specific
        master data set using dynamic field-based queries


        **Description**: This endpoint allows you to search and filter records
        within a master data collection (identified by master\_data\_id) for a
        given organization. You can query records by passing field names as
        query parameters with their corresponding values to match against.


        **Notes**:


        The endpoint accepts any field from the master data schema as a query
        parameter


        Multiple query parameters can be combined to create complex filter
        conditions (treated as AND operations)


        Returns all records that match ALL provided field-value pairs


        Field names must exactly match the schema definition (case-sensitive)
      tags:
        - masterData
      parameters:
        - name: sheetId
          in: path
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API key issued by Staple.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Master Data_filterMasterData_Response_200'
servers:
  - url: https://api.staple.io
    description: https://api.staple.io
components:
  schemas:
    Master Data_filterMasterData_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: Master Data_filterMasterData_Response_200
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key issued by Staple.
    bearerAuth:
      type: http
      scheme: bearer
      description: JWT obtained from the login endpoint.

```

## Examples



**Response**

```json
{
  "filterMasterDataSheet": {
    "data": [
      {
        "row_data": {
          "Account Name": "",
          "Address": "",
          "Bank": "",
          "Bank Account": "0125002320000503",
          "Credit Terms": "",
          "Email": "",
          "ISO Country Code": "GR",
          "Label1": "",
          "Label2": "",
          "Label3": "",
          "Label4": "",
          "Label5": "",
          "Telephone Number": "30 210 4278700",
          "Vendor Code": "0000203368",
          "Vendor Default Currency": "EUR",
          "Vendor GST Number": "",
          "Vendor Name": "VANOS SA",
          "Vendor Name Language": ""
        },
        "row_id": "4d48a9e9-2a25-4d8a-b3e3-a26c27df871b",
        "row_index": 3
      },
      {
        "row_data": {
          "Account Name": "",
          "Address": "Hotel Highway Garden, 1st Floor,Doo",
          "Bank": "",
          "Bank Account": "922020046360400",
          "Credit Terms": "",
          "Email": "",
          "ISO Country Code": "IN",
          "Label1": "",
          "Label2": "",
          "Label3": "",
          "Label4": "",
          "Label5": "",
          "Telephone Number": "91 484 4255 999",
          "Vendor Code": "0000100018",
          "Vendor Default Currency": "USD",
          "Vendor GST Number": "",
          "Vendor Name": "NS SHIP MANAGEMENT INDIA PRIVATE LI",
          "Vendor Name Language": ""
        },
        "row_id": "632a8a39-482f-4015-b07e-55f6c42df054",
        "row_index": 100
      }
    ]
  }
}
```

**SDK Code**

```python Filter Master Data
import requests

url = "https://api.staple.io/v2/master-data/sheetId"

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Filter Master Data
const url = 'https://api.staple.io/v2/master-data/sheetId';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Filter Master Data
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.staple.io/v2/master-data/sheetId"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Filter Master Data
require 'uri'
require 'net/http'

url = URI("https://api.staple.io/v2/master-data/sheetId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Filter Master Data
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.staple.io/v2/master-data/sheetId")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php Filter Master Data
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.staple.io/v2/master-data/sheetId', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Filter Master Data
using RestSharp;

var client = new RestClient("https://api.staple.io/v2/master-data/sheetId");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Filter Master Data
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.staple.io/v2/master-data/sheetId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```