---
title: "Get Source Mapping for Object Schema"
description: "How to call Get Source Mapping for Object Schema (GET /api/object-schemas/{id}/source-mapping) in the Klaviyo REST API: authentication, parameters, request and response bodies, and an example request."
url: "https://developers.klaviyo.com/en/reference/get_source_mapping_for_object_schema"
revision: "2026-10-15"
operationId: "get_source_mapping_for_object_schema"
aliases: ["get_object_schema_source_mapping"]
method: "GET"
endpoint: "https://a.klaviyo.com/api/object-schemas/{id}/source-mapping"
authentication: "privateKey"
scopes: ["custom-objects:read"]
rateLimits: {"burst":"3/s","steady":"60/m"}
revisionHeader: {"name":"revision","required":true}
deprecated: false
openApi: "https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/get_source_mapping_for_object_schema.json"
jsonApi: {"fields":{"source-mapping":["id","property_mappings","relationship_mappings"]}}
related: ["https://developers.klaviyo.com/en/reference/custom-objects/llms.txt","https://developers.klaviyo.com/en/reference/get_object_schema.md","https://developers.klaviyo.com/en/reference/create_object_schema.md","https://developers.klaviyo.com/en/reference/update_object_schema.md","https://developers.klaviyo.com/en/reference/get_source_mapping_id_for_object_schema.md","https://developers.klaviyo.com/en/reference/get_object_schema_relationships.md","https://developers.klaviyo.com/en/reference/create_object_schema_relationship.md","https://developers.klaviyo.com/en/reference/update_object_schema_relationship.md","https://developers.klaviyo.com/en/reference/delete_object_schema_relationship.md","https://developers.klaviyo.com/en/reference/get_profile_schema_relationships.md","https://developers.klaviyo.com/en/reference/create_profile_schema_relationship.md","https://developers.klaviyo.com/en/reference/update_profile_schema_relationship.md","https://developers.klaviyo.com/en/reference/delete_profile_schema_relationship.md"]
---

# Get Source Mapping for Object Schema

> This is the Markdown version of https://developers.klaviyo.com/en/reference/get_source_mapping_for_object_schema

```http
GET https://a.klaviyo.com/api/object-schemas/{id}/source-mapping
```

Get source mapping for an object schema

- Revision header: `revision: 2026-10-15` (required)
- Scopes: `custom-objects:read`
- Rate limits: Burst: `3/s`, Steady: `60/m`
- OpenAPI: [Download this endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/get_source_mapping_for_object_schema.json)

## Example request

### curl

```bash
curl --request GET \
     --url 'https://a.klaviyo.com/api/object-schemas/01K61DKJ7EKJ0ES9VE456XF5JG/source-mapping' \
     --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
     --header 'accept: application/vnd.api+json' \
     --header 'revision: 2026-10-15'
```

### CLI

```bash
klaviyo custom-objects get-source-mapping-for-object-schema 01K61DKJ7EKJ0ES9VE456XF5JG
```

Sign in first with `klaviyo auth login`. [Install the Klaviyo CLI](https://developers.klaviyo.com/en/docs/klaviyo_cli.md)

### Python

```python
from klaviyo_api import KlaviyoAPI

klaviyo = KlaviyoAPI("your-private-api-key")

response = klaviyo.Custom_Objects.get_source_mapping_for_object_schema("01K61DKJ7EKJ0ES9VE456XF5JG")
```

Install it with `pip install klaviyo-api`. [The Python SDK on GitHub](https://github.com/klaviyo/klaviyo-api-python)

### Node.js

```javascript
import { ApiKeySession, CustomObjectsApi } from 'klaviyo-api'

const session = new ApiKeySession('your-private-api-key')
const customObjectsApi = new CustomObjectsApi(session)

const response = await customObjectsApi.getSourceMappingForObjectSchema('01K61DKJ7EKJ0ES9VE456XF5JG')
```

Install it with `npm install klaviyo-api`. [The Node.js SDK on GitHub](https://github.com/klaviyo/klaviyo-api-node)

### Ruby

```ruby
require 'klaviyo-api-sdk'

KlaviyoAPI.configure do |config|
  config.api_key['Klaviyo-API-Key'] = 'Klaviyo-API-Key your-private-api-key'
end

response = KlaviyoAPI::CustomObjects.get_source_mapping_for_object_schema('01K61DKJ7EKJ0ES9VE456XF5JG')
```

Install it with `gem install klaviyo-api-sdk`. [The Ruby SDK on GitHub](https://github.com/klaviyo/klaviyo-api-ruby)

### PHP

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

use KlaviyoAPI\KlaviyoAPI;

$klaviyo = new KlaviyoAPI('your-private-api-key');

$response = $klaviyo->CustomObjects->getSourceMappingForObjectSchema('01K61DKJ7EKJ0ES9VE456XF5JG');
```

Install it with `composer require klaviyo/api`. [The PHP SDK on GitHub](https://github.com/klaviyo/klaviyo-api-php)

## Path parameters

- `id` (string, required): The ULID ID of the object schema. Example: `01K61DKJ7EKJ0ES9VE456XF5JG`

## Query parameters

- `fields[source-mapping]` (string[]): For more information please visit [API overview](https://developers.klaviyo.com/en/reference.md) Allowed values: `id`, `property_mappings`, `relationship_mappings`

## Headers

- `revision` (string, required): API endpoint revision (format: YYYY-MM-DD[.suffix]) Default: `2026-10-15`

## Responses

### 200: Success

Content type: `application/vnd.api+json`

- `data` (object, required, nullable)
  - `type` (string, required): Allowed values: `source-mapping`
  - `id` (string, required): The ULID ID of the source mapping Example: `01K5HQC66PGHV35SYJC5ZV3DZA`
  - `attributes` (object, required)
    - `property_mappings` (oneOf[], required): A mapping of source property IDs to source mappings
      - One of:
        - Option 1: `ConstantPropertyMapping` Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/get_source_mapping_for_object_schema.json).
        - Option 2: `SimplePropertyMapping` Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/get_source_mapping_for_object_schema.json).
    - `relationship_mappings` (object[], required): A mapping of source relationship IDs to source mappings
      - `relationship_id` (string, required): Object schema relationship ULID ID Example: `01K97SE7GH4TE57FVNQY310QAK`
      - `type` (string, required): String literal for serialization Allowed values: `simple` Example: `simple`
      - `source` (oneOf, required): Data source mapping Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/get_source_mapping_for_object_schema.json).
  - `links` (object, required)
    - `self` (string<uri>, required)
- `links` (ObjectLinks): Same fields as the first ObjectLinks above.
- `meta` (object): Response-level metadata
  - `agent_hints` (object): Optional hints emitted by the API for agent callers
    - `next_steps` (string[]): Suggested follow-up actions for agents to take after this response

#### Example response body

```json
{
  "data": {
    "type": "source-mapping",
    "id": "01K5HQC66PGHV35SYJC5ZV3DZA",
    "attributes": {
      "property_mappings": [
        {
          "id": 1,
          "type": "constant",
          "value": "active"
        }
      ],
      "relationship_mappings": [
        {
          "relationship_id": "01K97SE7GH4TE57FVNQY310QAK",
          "type": "simple",
          "source": {
            "source_id": "01JXKX2HM7NV4QPTR5WE8BF6GY",
            "type": "custom-object",
            "id_path": "$['object_record']['subscription_id']",
            "related_id_path": "$['object_record']['pet_id']",
            "update_strategy": "replace_from_origin"
          }
        }
      ]
    },
    "links": {
      "self": "https://www.example.com"
    }
  },
  "links": {
    "self": "https://www.example.com"
  },
  "meta": {
    "agent_hints": {
      "next_steps": [
        "string"
      ]
    }
  }
}
```

### 4XX: Client Error

Content type: `application/vnd.api+json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```

### 5XX: Server Error

Content type: `application/vnd.api+json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```
