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

# Get Bulk Source

GET https://app.polytomic.com/api/bulk/source/{connection_id}

Lists the schemas available on a connection for use as a bulk sync source.

Reference: https://apidocs.polytomic.com/api-reference/bulk-sync/get-source

## Authentication

- `Authorization` header (basic auth, required) — This is the Polytomic deployment key (on-premises only)
- `Authorization` header (bearer token, required) — This is the Polytomic API key

## Request

### Path parameters

- `connection_id` (string, required) — Unique identifier of the connection.

### Query parameters

- `refresh_schemas` (boolean, optional, default: false) — When true, refresh cached schemas synchronously before returning the response. The connection must be healthy.
- `include_fields` (boolean, optional, default: true) — When true, include per-schema field lists in the response. Set to false for a smaller payload when field details are not needed.

## Response

### 200

OK

- `data` (V3BulkSyncSource, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `key` (string, optional)
- `message` (string, optional)
- `metadata` (map from string to any, optional)
- `status` (integer, optional)

### 401 Unauthorized Error

Unauthorized

- `code` (integer, optional) — Application-specific error code.
- `context` (map from string to any, optional) — Application context.
- `error` (string, optional) — Error message.
- `status` (string, optional) — Status text.

### 404 Not Found Error

Not Found

- `key` (string, optional)
- `message` (string, optional)
- `metadata` (map from string to any, optional)
- `status` (integer, optional)

### 500 Internal Server Error

Internal Server Error

- `key` (string, optional)
- `message` (string, optional)
- `metadata` (map from string to any, optional)
- `status` (integer, optional)

## Types

### V3BulkSyncSource

- `capabilities` (V3BulkSyncSourceCapabilities, optional)
- `configuration` (any, optional)
- `schemas` (list of V3Schema, optional, nullable)

### V3BulkSyncSourceCapabilities

- `supports_namespaces` (boolean, optional) — When true, the portion of a schema ID before its last dot is that schema's namespace.
- `supports_tracking_fields` (boolean, optional)

### V3Schema

- `fields` (list of SchemaField, optional)
- `id` (string, optional)
- `name` (string, optional)

### SchemaField

- `association` (SchemaAssociation, optional)
- `id` (string, optional)
- `is_primary_key` (boolean, optional) — Whether this field is part of the schema's primary key, including any user override.
- `name` (string, optional)
- `path` (string, optional) — JSONPath used to extract the field from each source record; only meaningful for document-style backends.
- `primary_key_override` (boolean, optional, nullable) — The user-set primary key status for this field, which takes precedence over source_primary_key; omitted when no override is set.
- `remote_type` (string, optional) — The type of the field from the remote system.
- `source_primary_key` (boolean, optional) — Whether the source system reports this field as part of the schema's primary key.
- `type` (enum, optional)
  - Allowed values: `unknown`, `string`, `number`, `boolean`, `datetime`, `array`, `object`, `binary`
- `type_spec` (any, optional)
- `user_managed` (boolean, optional) — True when the field's effective definition came from a user override.
- `values` (list of PickValue, optional)

### SchemaAssociation

- `id` (string, optional)
- `name` (string, optional)
- `reference_to` (list of string, optional)
- `referenced_field` (string, optional)

### PickValue

- `depends_on` (map from string to string, optional) — Field IDs and internal values required for this option to apply. All entries must match. Omitted for independent options.
- `label` (string, optional)
- `value` (string, optional)

## Examples

**Response**

```json
{
  "data": {
    "capabilities": {
      "supports_namespaces": true,
      "supports_tracking_fields": true
    },
    "schemas": [
      {
        "fields": [
          {
            "association": {
              "id": "string",
              "name": "string",
              "reference_to": [
                "string"
              ],
              "referenced_field": "string"
            },
            "id": "email",
            "is_primary_key": true,
            "name": "Email",
            "path": "string",
            "primary_key_override": true,
            "remote_type": "varchar(255)",
            "source_primary_key": false,
            "type": "unknown",
            "user_managed": true,
            "values": [
              {
                "depends_on": {},
                "label": "string",
                "value": "string"
              }
            ]
          }
        ],
        "id": "contact",
        "name": "Contact"
      }
    ]
  }
}
```

**SDK Code**

```python
import requests

url = "https://app.polytomic.com/api/bulk/source/248df4b7-aa70-47b8-a036-33ac447e668d"

headers = {
    "X-Polytomic-Version": "X-Polytomic-Version"
}

response = requests.get(url, headers=headers, auth=("<username>", "<password>"))

print(response.json())
```

```javascript
const url = 'https://app.polytomic.com/api/bulk/source/248df4b7-aa70-47b8-a036-33ac447e668d';
const credentials = btoa("<username>:<password>");

const options = {
  method: 'GET',
  headers: {
    'X-Polytomic-Version': 'X-Polytomic-Version',
    Authorization: `Basic ${credentials}`
  }
};

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

```go
package main

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

func main() {

	url := "https://app.polytomic.com/api/bulk/source/248df4b7-aa70-47b8-a036-33ac447e668d"

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

	req.Header.Add("X-Polytomic-Version", "X-Polytomic-Version")
	req.SetBasicAuth("<username>", "<password>")

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

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

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

}
```

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

url = URI("https://app.polytomic.com/api/bulk/source/248df4b7-aa70-47b8-a036-33ac447e668d")

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

request = Net::HTTP::Get.new(url)
request["X-Polytomic-Version"] = 'X-Polytomic-Version'
request.basic_auth("<username>", "<password>")

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

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

HttpResponse<String> response = Unirest.get("https://app.polytomic.com/api/bulk/source/248df4b7-aa70-47b8-a036-33ac447e668d")
  .header("X-Polytomic-Version", "X-Polytomic-Version")
  .basicAuth("<username>", "<password>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.polytomic.com/api/bulk/source/248df4b7-aa70-47b8-a036-33ac447e668d', [
  'headers' => [
    'X-Polytomic-Version' => 'X-Polytomic-Version',
  ],
    'auth' => ['<username>', '<password>'],
]);

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

```csharp
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://app.polytomic.com/api/bulk/source/248df4b7-aa70-47b8-a036-33ac447e668d");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.GET);
request.AddHeader("X-Polytomic-Version", "X-Polytomic-Version");

IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = [
  "X-Polytomic-Version": "X-Polytomic-Version",
  "Authorization": "Basic \(credentials)"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://app.polytomic.com/api/bulk/source/248df4b7-aa70-47b8-a036-33ac447e668d")! 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()
```