# Get mapping metadata for an integrated account's unified-model method

> Source: https://truto.one/docs/api-reference/unified-api/unified-model-docs/get-account-method-meta/

`GET /unified/{model_name}/{resource_name}/meta/{method}`

Resource: **Unified model docs** · API: **Unified API**

Like `GET /unified/{model_name}/{resource_name}/{integration_name}/meta/{method}`, but the integration and environment come from an integrated account, so it describes the mapping that account's unified calls use. Returns `response_mapping` itself instead of a `response_schema`, and `query_schema` and `request_body_schema` as maps of field name to schema.

**Auth:** an API token, or an integrated account token (then `integrated_account_id` comes from the token).

## Path parameters

- **`model_name`** _(string, required)_
- **`resource_name`** _(string, required)_
- **`method`** _(string, required)_

## Query parameters

- **`integrated_account_id`** _(string)_
  Required unless you call with an integrated account token. Must be a UUID.

## Response body

- **`method`** _(string)_
- **`schema`** _(object, required)_
  Top-level JSON Schema object used by Truto's unified-model resource definitions.
  - **`type`** _(string)_
    Allowed: `object`
  - **`$ref`** _(string)_
  - **`properties`** _(object)_
    Map of property name → `JsonSchemaObjectProperties`.
  - **`description`** _(string)_
  - **`required`** _(boolean)_
  - **`default`** _(unknown)_
  - **`additionalProperties`** _(boolean)_
- **`documentation_link`** _(string)_
- **`response_mapping`** _(unknown)_
  The method's `response_mapping` (a JSONata expression, or a mapping object).
- **`query_schema`** _(object)_
- **`request_body_schema`** _(object)_
- **`default_query`** _(object)_
- **`default_body`** _(unknown)_

## Errors

| Status | Description |
| :----- | :---------- |
| `400` | `integrated_account_id` is missing or not a UUID. |
| `404` | The integrated account, the unified model, or its mapping for the method was not found. |

## Code examples

### Truto TS SDK

```typescript
import Truto from '@truto/truto-ts-sdk';

const truto = new Truto({
  token: '<your_api_token>',
});

// Custom method: get-account-method-meta
const result = await truto.unifiedApi.get-account-method-meta(
  '',
  'unified_model_docs',
  { integrated_account_id: '<integrated_account_id>' }
);

console.log(result);
```

### Truto Python SDK

```python
import asyncio
from truto_python_sdk import TrutoApi

truto_api = TrutoApi(token="<your_api_token>")

async def main():
    # Custom method: get-account-method-meta
    result = await truto_api.unified_api.get-account-method-meta(
        "",
        "unified_model_docs",
        {"integrated_account_id": "<integrated_account_id>"}
    )
    print(result)

asyncio.run(main())
```

### curl

```bash
curl -X GET 'https://api.truto.one/unified/{model_name}/{resource_name}/meta/{method}?integrated_account_id=<integrated_account_id>' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const integratedAccountId = '<integrated_account_id>';

const response = await fetch(`https://api.truto.one/unified/{model_name}/{resource_name}/meta/{method}?integrated_account_id=${integratedAccountId}`, {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

url = "https://api.truto.one/unified/{model_name}/{resource_name}/meta/{method}"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
    "integrated_account_id": "<integrated_account_id>"
}

response = requests.get(url, headers=headers, params=params)
print(response.json())
```
