Skip to content
POST /unified-model-resource-method

Request Body

configobject

The mapping configuration for this method.

afterstring | object[]
base_url_mappingstring
beforestring | object[]
bodyRecord<string, any>

Static body merged into the integration request.

documentation_linkstring
error_mappingstring
file_uploadstring | object | object[]
One of
object · 2 properties
configRecord<string, any>

Strategy-specific options (e.g. multipart field name, base64 wrapper key).

file_uploadstring
Possible values:
multipartbase64upload
is_partial_expressionstring
is_partial_responseboolean
mapping_versionnumber
methodstring | object[] | object

Integration method to call.

One of
object · 2 properties
expressionstring
methodsstring[]
path_mappingstring
queryRecord<string, any>

Static query params merged into the integration request.

query_mappingstring | Record<string, any>
query_schemastring | Record<string, any>
related_resourcesstring | object[]
request_body_mappingstring | Record<string, any>
request_body_schemaRecord<string, any>

Object-form (v2) request body schema; values are partial JSON Schema entries.

request_header_mappingstring
resourcestring | object[] | object

Integration resource to call. May be a single name, an array of resource fragments, or a { expression, resources } object for dynamic dispatch.

One of
object · 2 properties
expressionstring
resourcesstring[]
response_header_mappingstring
response_mappingstring | Record<string, any>

JSONata expression (string) or object-form mapping. The object form is keyed by field name with values that may be JSONata strings, nested objects, or JsonSchemaObjectProperties.

response_mapping_methodstring
Possible values:
arrayitem
side_loadRecord<string, any>
static

Static value returned for this method without making an HTTP call.

integration_namestring

The integration slug (e.g. apollo).

Example: apollo
method_namestring

The unified method name (list, get, create, update, delete, or a custom method).

Example: list
resource_namestring

The unified resource name (e.g. contacts).

Example: contacts
unified_model_idstring · uuid

The base unified model to attach the mapping to. Must belong to one of your teams.

Example: 7c5c8cc2-e68e-4af8-84d1-4ceea1489338

Response Body

configobject

The mapping itself (JSONata expressions, resource/method routing, side loads, …).

afterstring | object[]
base_url_mappingstring
beforestring | object[]
bodyRecord<string, any>

Static body merged into the integration request.

documentation_linkstring
error_mappingstring
file_uploadstring | object | object[]
One of
object · 2 properties
configRecord<string, any>

Strategy-specific options (e.g. multipart field name, base64 wrapper key).

file_uploadstring
Possible values:
multipartbase64upload
is_partial_expressionstring
is_partial_responseboolean
mapping_versionnumber
methodstring | object[] | object

Integration method to call.

One of
object · 2 properties
expressionstring
methodsstring[]
path_mappingstring
queryRecord<string, any>

Static query params merged into the integration request.

query_mappingstring | Record<string, any>
query_schemastring | Record<string, any>
related_resourcesstring | object[]
request_body_mappingstring | Record<string, any>
request_body_schemaRecord<string, any>

Object-form (v2) request body schema; values are partial JSON Schema entries.

request_header_mappingstring
resourcestring | object[] | object

Integration resource to call. May be a single name, an array of resource fragments, or a { expression, resources } object for dynamic dispatch.

One of
object · 2 properties
expressionstring
resourcesstring[]
response_header_mappingstring
response_mappingstring | Record<string, any>

JSONata expression (string) or object-form mapping. The object form is keyed by field name with values that may be JSONata strings, nested objects, or JsonSchemaObjectProperties.

response_mapping_methodstring
Possible values:
arrayitem
side_loadRecord<string, any>
static

Static value returned for this method without making an HTTP call.

created_atstring · date-time
Example: 2024-01-10T10:00:00.000Z
idstring · uuid

The ID of the resource-method mapping row.

Example: 8ed2b6ea-2c2c-4f61-97a1-6b0b0f0f0a11
integration_namestring

The integration slug this mapping serves (e.g. apollo).

Example: apollo
method_namestring

The unified method this mapping serves (list, get, create, update, delete, or a custom method name).

Example: list
resource_namestring

The unified resource this mapping serves (e.g. contacts).

Example: contacts
unified_model_idstring · uuid

The base unified model this mapping belongs to.

Example: 7c5c8cc2-e68e-4af8-84d1-4ceea1489338
updated_atstring · date-time
Example: 2024-01-11T12:30:00.000Z
versionnumber

Optimistic-concurrency version. Send the current value in a PATCH body; every write increments it.

Example: 3
curl -X POST 'https://api.truto.one/unified-model-resource-method' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "unified_model_id": "7c5c8cc2-e68e-4af8-84d1-4ceea1489338",
  "resource_name": "contacts",
  "integration_name": "apollo",
  "method_name": "list",
  "config": {}
}'
const body = {
  "unified_model_id": "7c5c8cc2-e68e-4af8-84d1-4ceea1489338",
  "resource_name": "contacts",
  "integration_name": "apollo",
  "method_name": "list",
  "config": {}
};

const response = await fetch('https://api.truto.one/unified-model-resource-method', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

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

url = "https://api.truto.one/unified-model-resource-method"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}
payload = {
    "unified_model_id": "7c5c8cc2-e68e-4af8-84d1-4ceea1489338",
    "resource_name": "contacts",
    "integration_name": "apollo",
    "method_name": "list",
    "config": {}
}

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