> 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.

# Get Matching Document Tuple In Detail

POST https://api.staple.io/v1/matching/tuples
Content-Type: application/json

Get matching document tuple in detail

Reference: https://docs.staple.ai/api-reference/v1/matching/get-matching-document-tuple-in-detail

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: v1
  version: 1.0.0
paths:
  /v1/matching/tuples:
    post:
      operationId: getMatchingDocumentTupleInDetail
      summary: Get Matching Document Tuple In Detail
      description: Get matching document tuple in detail
      tags:
        - matching
      parameters:
        - 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/Matching_getMatchingDocumentTupleInDetail_Response_200
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                collectionId:
                  type: integer
                searchBy:
                  type: string
                version:
                  type: string
                pagination:
                  $ref: >-
                    #/components/schemas/V1MatchingTuplesPostRequestBodyContentApplicationJsonSchemaPagination
servers:
  - url: https://api.staple.io
    description: https://api.staple.io
components:
  schemas:
    V1MatchingTuplesPostRequestBodyContentApplicationJsonSchemaPagination:
      type: object
      properties:
        skip:
          type: integer
        take:
          type: integer
      title: V1MatchingTuplesPostRequestBodyContentApplicationJsonSchemaPagination
    Matching_getMatchingDocumentTupleInDetail_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: Matching_getMatchingDocumentTupleInDetail_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

### Get Matching Document Tuple In Detail



**Request**

```json
undefined
```

**Response**

```json
{
  "getMatchingDocumentTuples": {
    "data": [
      {
        "collectionId": 3,
        "createdAt": 1712303411471,
        "documentFieldComparisonTuples": [
          {
            "collectionVersionId": null,
            "createdAt": "2024-04-20T04:03:43.184Z",
            "documentTupleId": 1593,
            "elements": [
              {
                "UIType": "Text",
                "createdAt": "2024-04-20T04:03:43.184Z",
                "documentFieldComparisonTupleId": 6098,
                "documentTupleElementId": 4349,
                "id": 13375,
                "name": "Invoice Number",
                "ruleTupleElementId": 5261,
                "type": "field",
                "uid": "1",
                "updatedAt": "2024-04-20T04:03:43.184Z",
                "value": "30,000",
                "valuemulti": "30,000"
              },
              {
                "UIType": "Text",
                "createdAt": "2024-04-20T04:03:43.184Z",
                "documentFieldComparisonTupleId": 6098,
                "documentTupleElementId": 4350,
                "id": 13376,
                "name": "Invoice Number",
                "ruleTupleElementId": 5260,
                "type": "field",
                "uid": "1",
                "updatedAt": "2024-04-20T04:03:43.184Z",
                "value": "SD190006-C",
                "valuemulti": "# SD190006-C"
              }
            ],
            "id": 6098,
            "isMatch": false,
            "ruleTuple": {
              "auto": false,
              "collectionId": 3,
              "collectionVersionId": "dfb0c18a-cde9-4d62-bed4-594e86922472",
              "columnName": "New column",
              "createdAt": "2024-04-17T05:51:38.768Z",
              "id": 2613,
              "type": "FvF",
              "uid": "1",
              "updatedAt": "2024-04-17T05:51:38.768Z",
              "useAsColumn": true
            },
            "ruleTupleId": 2613,
            "uid": "1",
            "updatedAt": "2024-04-20T04:03:43.184Z"
          }
        ],
        "documentTupleElements": [
          {
            "createdAt": 1713333126329,
            "documentId": 5656,
            "documentName": "Invoice_20200114.png",
            "documentTupleId": 1593,
            "id": 4349,
            "queueId": 29,
            "status": "CREATED",
            "uid": 1,
            "updatedAt": 1713333126329
          },
          {
            "createdAt": 1713333126329,
            "documentId": 6196,
            "documentName": "11.pdf",
            "documentTupleId": 1593,
            "id": 4350,
            "queueId": 71,
            "status": "CREATED",
            "uid": 1,
            "updatedAt": 1713333126329
          }
        ],
        "id": 1593,
        "isMatched": false,
        "status": "REVIEWED",
        "uid": 1,
        "updatedAt": 1713585823244
      }
    ],
    "pageInfo": {
      "hasNextPage": false,
      "hasPreviousPage": false,
      "lastCursor": 1593
    },
    "total": 1
  }
}
```

**SDK Code**

```python Get Matching Document Tuple In Detail
import requests

url = "https://api.staple.io/v1/matching/tuples"

headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Get Matching Document Tuple In Detail
const url = 'https://api.staple.io/v1/matching/tuples';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: undefined
};

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

```go Get Matching Document Tuple In Detail
package main

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

func main() {

	url := "https://api.staple.io/v1/matching/tuples"

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

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

```ruby Get Matching Document Tuple In Detail
require 'uri'
require 'net/http'

url = URI("https://api.staple.io/v1/matching/tuples")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'

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

```java Get Matching Document Tuple In Detail
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.staple.io/v1/matching/tuples")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .asString();
```

```php Get Matching Document Tuple In Detail
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.staple.io/v1/matching/tuples', [
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Get Matching Document Tuple In Detail
using RestSharp;

var client = new RestClient("https://api.staple.io/v1/matching/tuples");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift Get Matching Document Tuple In Detail
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.staple.io/v1/matching/tuples")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```

### Matching_getMatchingDocumentTupleInDetail_example



**Request**

```json
{
  "status": "REVIEWED",
  "collectionId": 3,
  "searchBy": "",
  "version": "dfb0c18a-cde9-4d62-bed4-594e86922472",
  "pagination": {
    "skip": 0,
    "take": 10
  }
}
```

**Response**

```json
{
  "getMatchingDocumentTuples": {
    "data": [
      {
        "collectionId": 3,
        "createdAt": 1712303411471,
        "documentFieldComparisonTuples": [
          {
            "collectionVersionId": null,
            "createdAt": "2024-04-20T04:03:43.184Z",
            "documentTupleId": 1593,
            "elements": [
              {
                "UIType": "Text",
                "createdAt": "2024-04-20T04:03:43.184Z",
                "documentFieldComparisonTupleId": 6098,
                "documentTupleElementId": 4349,
                "id": 13375,
                "name": "Invoice Number",
                "ruleTupleElementId": 5261,
                "type": "field",
                "uid": "1",
                "updatedAt": "2024-04-20T04:03:43.184Z",
                "value": "30,000",
                "valuemulti": "30,000"
              },
              {
                "UIType": "Text",
                "createdAt": "2024-04-20T04:03:43.184Z",
                "documentFieldComparisonTupleId": 6098,
                "documentTupleElementId": 4350,
                "id": 13376,
                "name": "Invoice Number",
                "ruleTupleElementId": 5260,
                "type": "field",
                "uid": "1",
                "updatedAt": "2024-04-20T04:03:43.184Z",
                "value": "SD190006-C",
                "valuemulti": "# SD190006-C"
              }
            ],
            "id": 6098,
            "isMatch": false,
            "ruleTuple": {
              "auto": false,
              "collectionId": 3,
              "collectionVersionId": "dfb0c18a-cde9-4d62-bed4-594e86922472",
              "columnName": "New column",
              "createdAt": "2024-04-17T05:51:38.768Z",
              "id": 2613,
              "type": "FvF",
              "uid": "1",
              "updatedAt": "2024-04-17T05:51:38.768Z",
              "useAsColumn": true
            },
            "ruleTupleId": 2613,
            "uid": "1",
            "updatedAt": "2024-04-20T04:03:43.184Z"
          }
        ],
        "documentTupleElements": [
          {
            "createdAt": 1713333126329,
            "documentId": 5656,
            "documentName": "Invoice_20200114.png",
            "documentTupleId": 1593,
            "id": 4349,
            "queueId": 29,
            "status": "CREATED",
            "uid": 1,
            "updatedAt": 1713333126329
          },
          {
            "createdAt": 1713333126329,
            "documentId": 6196,
            "documentName": "11.pdf",
            "documentTupleId": 1593,
            "id": 4350,
            "queueId": 71,
            "status": "CREATED",
            "uid": 1,
            "updatedAt": 1713333126329
          }
        ],
        "id": 1593,
        "isMatched": false,
        "status": "REVIEWED",
        "uid": 1,
        "updatedAt": 1713585823244
      }
    ],
    "pageInfo": {
      "hasNextPage": false,
      "hasPreviousPage": false,
      "lastCursor": 1593
    },
    "total": 1
  }
}
```

**SDK Code**

```python Matching_getMatchingDocumentTupleInDetail_example
import requests

url = "https://api.staple.io/v1/matching/tuples"

payload = {
    "status": "REVIEWED",
    "collectionId": 3,
    "searchBy": "",
    "version": "dfb0c18a-cde9-4d62-bed4-594e86922472",
    "pagination": {
        "skip": 0,
        "take": 10
    }
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Matching_getMatchingDocumentTupleInDetail_example
const url = 'https://api.staple.io/v1/matching/tuples';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"status":"REVIEWED","collectionId":3,"searchBy":"","version":"dfb0c18a-cde9-4d62-bed4-594e86922472","pagination":{"skip":0,"take":10}}'
};

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

```go Matching_getMatchingDocumentTupleInDetail_example
package main

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

func main() {

	url := "https://api.staple.io/v1/matching/tuples"

	payload := strings.NewReader("{\n  \"status\": \"REVIEWED\",\n  \"collectionId\": 3,\n  \"searchBy\": \"\",\n  \"version\": \"dfb0c18a-cde9-4d62-bed4-594e86922472\",\n  \"pagination\": {\n    \"skip\": 0,\n    \"take\": 10\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

```ruby Matching_getMatchingDocumentTupleInDetail_example
require 'uri'
require 'net/http'

url = URI("https://api.staple.io/v1/matching/tuples")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"status\": \"REVIEWED\",\n  \"collectionId\": 3,\n  \"searchBy\": \"\",\n  \"version\": \"dfb0c18a-cde9-4d62-bed4-594e86922472\",\n  \"pagination\": {\n    \"skip\": 0,\n    \"take\": 10\n  }\n}"

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

```java Matching_getMatchingDocumentTupleInDetail_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.staple.io/v1/matching/tuples")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"status\": \"REVIEWED\",\n  \"collectionId\": 3,\n  \"searchBy\": \"\",\n  \"version\": \"dfb0c18a-cde9-4d62-bed4-594e86922472\",\n  \"pagination\": {\n    \"skip\": 0,\n    \"take\": 10\n  }\n}")
  .asString();
```

```php Matching_getMatchingDocumentTupleInDetail_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.staple.io/v1/matching/tuples', [
  'body' => '{
  "status": "REVIEWED",
  "collectionId": 3,
  "searchBy": "",
  "version": "dfb0c18a-cde9-4d62-bed4-594e86922472",
  "pagination": {
    "skip": 0,
    "take": 10
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Matching_getMatchingDocumentTupleInDetail_example
using RestSharp;

var client = new RestClient("https://api.staple.io/v1/matching/tuples");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"status\": \"REVIEWED\",\n  \"collectionId\": 3,\n  \"searchBy\": \"\",\n  \"version\": \"dfb0c18a-cde9-4d62-bed4-594e86922472\",\n  \"pagination\": {\n    \"skip\": 0,\n    \"take\": 10\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Matching_getMatchingDocumentTupleInDetail_example
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "status": "REVIEWED",
  "collectionId": 3,
  "searchBy": "",
  "version": "dfb0c18a-cde9-4d62-bed4-594e86922472",
  "pagination": [
    "skip": 0,
    "take": 10
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.staple.io/v1/matching/tuples")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```