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

# Get records from a snapshot

GET https://api.x.flatfile.com/v1/snapshots/{snapshotId}/records

Gets records from a snapshot of a sheet

Reference: https://reference.flatfile.com/api-reference/snapshots/get-snapshot-records

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `snapshotId` (string, required) — ID of snapshot

### Query parameters

- `pageSize` (integer, optional) — Number of records to return in a page
- `pageNumber` (integer, optional) — Based on pageSize, which page of records to return
- `changeType` (enum, optional) — Filter records by change type
  - Allowed values: `createdSince`, `updatedSince`, `deletedSince`

## Response

### 200

- `data` (list of DiffRecord, required) — List of DiffRecord objects

## Errors

### 400 Bad Request Error

- `errors` (list of Error, required)

### 404 Not Found Error

- `errors` (list of Error, required)

## Types

### DiffRecord

- `id` (string, required) — Record ID
- `values` (map from string to DiffValue, required)
- `commitId` (string, optional) — Commit ID
- `config` (RecordConfig, optional) — Configuration of a record or specific fields in the record
- `metadata` (map from string to any, optional)
- `resolves` (list of Resolve, optional)
- `valid` (boolean, optional) — Auto-generated value based on whether the record contains a field with an error message. Cannot be set via the API.
- `messages` (list of ValidationMessage, optional, deprecated) — This record level `messages` property is deprecated and no longer stored or used. Use the `messages` property on the individual cell values instead. This property will be removed in a future release.
- `versionId` (string, optional, deprecated) — Deprecated, use `commitId` instead.

### Error

- `message` (string, required)
- `key` (string, optional)

### DiffValue

- `clipValue` (CellValueUnion, optional)
- `layer` (string, optional)
- `messages` (list of ValidationMessage, optional)
- `snapshotValue` (CellValueUnion, optional)
- `updatedAt` (datetime, optional)
- `valid` (boolean, optional)
- `value` (CellValueUnion, optional)
- `warning` (boolean, optional)
- `warnings` (list of string, optional)
- `metadata` (map from string to any, optional, deprecated) — Deprecated, use record level metadata instead.

### RecordConfig

Configuration of a record or specific fields in the record

- `readonly` (boolean, optional)
- `fields` (map from string to CellConfig, optional)
- `markedForDeletion` (boolean, optional)

### Resolve

Conflict resolutions for a record

- `field` (string, optional)
- `type` (enum, optional)
  - Allowed values: `conflict`, `resolve`
- `resolveTo` (enum, optional)
  - Allowed values: `clip`, `main`, `snapshot`
- `clip_value_reference` (string, optional)
- `main_value_reference` (string, optional)
- `removedFromMainResolution` (enum, optional)
  - Allowed values: `ignore`, `restore`

### ValidationMessage

Record data validation messages

- `field` (string, optional)
- `type` (enum, optional)
  - Allowed values: `error`, `warn`, `info`
- `source` (enum, optional)
  - Allowed values: `required-constraint`, `unique-constraint`, `custom-logic`, `unlinked`, `invalid-option`, `is-artifact`
- `message` (string, optional)
- `path` (string, optional) — This JSONPath is based on the root of mapped cell object.

### CellValueUnion

### CellConfig

CellConfig

- `readonly` (boolean, optional)

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "us_rc_YOUR_ID",
      "values": {
        "firstName": {
          "snapshotValue": "John",
          "value": "Johns"
        },
        "lastName": {
          "snapshotValue": "Doe",
          "value": "Does"
        },
        "email": {
          "snapshotValue": "john.doe@example.com",
          "value": "john.doe@example.com"
        }
      }
    }
  ]
}
```

**SDK Code**

```python Example0
import requests

url = "https://api.x.flatfile.com/v1/snapshots/us_ss_YOUR_ID/records"

querystring = {"pageSize":"10","pageNumber":"1","changeType":"createdSince"}

headers = {
    "X-Disable-Hooks": "true",
    "Authorization": "Bearer <token>"
}

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

print(response.json())
```

```typescript Example0
import { FlatfileClient } from "@flatfile/api";

const client = new FlatfileClient({ token: "YOUR_TOKEN" });
await client.snapshots.getSnapshotRecords("us_ss_YOUR_ID", {
    pageSize: 10,
    pageNumber: 1,
    changeType: "createdSince"
});

```

```go Example0
package main

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

func main() {

	url := "https://api.x.flatfile.com/v1/snapshots/us_ss_YOUR_ID/records?pageSize=10&pageNumber=1&changeType=createdSince"

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

	req.Header.Add("X-Disable-Hooks", "true")
	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

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

url = URI("https://api.x.flatfile.com/v1/snapshots/us_ss_YOUR_ID/records?pageSize=10&pageNumber=1&changeType=createdSince")

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

request = Net::HTTP::Get.new(url)
request["X-Disable-Hooks"] = 'true'
request["Authorization"] = 'Bearer <token>'

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

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

HttpResponse<String> response = Unirest.get("https://api.x.flatfile.com/v1/snapshots/us_ss_YOUR_ID/records?pageSize=10&pageNumber=1&changeType=createdSince")
  .header("X-Disable-Hooks", "true")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.x.flatfile.com/v1/snapshots/us_ss_YOUR_ID/records?pageSize=10&pageNumber=1&changeType=createdSince', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'X-Disable-Hooks' => 'true',
  ],
]);

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

```csharp Example0
using RestSharp;

var client = new RestClient("https://api.x.flatfile.com/v1/snapshots/us_ss_YOUR_ID/records?pageSize=10&pageNumber=1&changeType=createdSince");
var request = new RestRequest(Method.GET);
request.AddHeader("X-Disable-Hooks", "true");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Example0
import Foundation

let headers = [
  "X-Disable-Hooks": "true",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.x.flatfile.com/v1/snapshots/us_ss_YOUR_ID/records?pageSize=10&pageNumber=1&changeType=createdSince")! 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()
```