Ramp: Create a Matrix table
Ramp customRecords.postDevApiMatrixTables: arguments, response, policy and SDK examples.
← Custom records operations · Get started
Operation ramp.post_dev_api_matrix_tables
Provider route: POST /developer/v1/custom-records/matrix-tables. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/ramp with npm, or alter-sdk-ramp with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { RampIntegration } from "@alter-ai/ramp";
async function execute(input: Parameters<RampIntegration["customRecords"]["postDevApiMatrixTables"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new RampIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.customRecords.postDevApiMatrixTables(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_ramp import RampIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = RampIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.custom_records.post_dev_api_matrix_tables(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
body | Model | Required within parent | Expand Create a Matrix table — request body — body |
Referenced models: Create a Matrix table — request body — body
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Create a Matrix table — response body |
Referenced models: Create a Matrix table — response body
Schemas
Section titled “Schemas”Create a Matrix table — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Schema for creating a Matrix table (Developer API). |
input_columns | array | Required within parent | Input columns that define the Matrix dimensions (references or number) |
input_columns[] | Model | Each item | Expand Create a Matrix table — request body — body input columns item |
label | string | Required within parent | Display name for the Matrix table |
name | JSON | Optional | |
name (anyOf 1) | string | Alternative | API name for the table Default: null |
name (anyOf 2) | null | Alternative | |
result_columns | array | Required within parent | Result columns that store Matrix outputs |
result_columns[] | Model | Each item | Expand Add a result column to an existing Matrix table — request body — body |
Referenced models: Create a Matrix table — request body — body input columns item, Add a result column to an existing Matrix table — request body — body
Create a Matrix table — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Response for creating a Matrix table. |
table_id | string | Required within parent | ID of the created Matrix table |
Create a Matrix table — request body — body input columns item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Schema for defining a Matrix input column (Developer API). |
column_type | JSON | Required within parent | Defines the type of input field used by the matrix |
column_type (oneOf 1) | Model | Alternative | Expand Create a Matrix table — request body — body / input_columns / item / column_type / type: native table |
column_type (oneOf 2) | Model | Alternative | Expand Create a Matrix table — request body — body / input_columns / item / column_type / type: number |
label | string | Required within parent | Display name for the input column |
name | JSON | Optional | |
name (anyOf 1) | string | Alternative | API name for the column Default: null |
name (anyOf 2) | null | Alternative |
Referenced models: Create a Matrix table — request body — body / input_columns / item / column_type / type: native table, Create a Matrix table — request body — body / input_columns / item / column_type / type: number
Add a result column to an existing Matrix table — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Schema for defining a Matrix result column (Developer API). |
cardinality | string | Required within parent | Cardinality enum for Pydantic schemas with lowercase values. This enum uses lowercase values for API consistency while mapping to the internal CardinalityEnum. many_to_one or many_to_many for the result column One of: many_to_many, many_to_one |
label | string | Required within parent | Display name for the result column |
name | JSON | Optional | |
name (anyOf 1) | string | Alternative | API name for the column Default: null |
name (anyOf 2) | null | Alternative | |
native_table | Model | Required within parent | Expand Add a result column to an existing Matrix table — request body — body native table The native table this result references (only users, approver_groups, and accounting_field_options supported) |
Referenced models: Add a result column to an existing Matrix table — request body — body native table
Create a Matrix table — request body — body / input_columns / item / column_type / type: native table
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Native table reference for Developer API input columns. Allows: users, locations, departments, business_entities, accounting_field_options, vendors, and merchant_categories. |
accounting_field_ramp_id | JSON | Optional | |
accounting_field_ramp_id (anyOf 1) | string | Alternative | The accounting field's ramp_id (UUID), only set for accounting_field_options Default: null |
accounting_field_ramp_id (anyOf 2) | null | Alternative | |
table_name | string | Required within parent | The native table name for input columns: users, locations, departments, business_entities, accounting_field_options, vendors, merchant_categories. One of: accounting_field_options, business_entities, departments, locations, merchant_categories, users, vendors |
type | string | Optional | Default: native_table One of: native_table |
Create a Matrix table — request body — body / input_columns / item / column_type / type: number
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Number column type for Developer API input columns. |
type | string | Optional | Column type discriminator Default: number One of: number |
Add a result column to an existing Matrix table — request body — body native table
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Native table reference for Developer API result columns. Only allows: users, approver_groups, and accounting_field_options. |
accounting_field_ramp_id | JSON | Optional | |
accounting_field_ramp_id (anyOf 1) | string | Alternative | The accounting field's ramp_id (UUID), only set for accounting_field_options Default: null |
accounting_field_ramp_id (anyOf 2) | null | Alternative | |
table_name | string | Required within parent | The native table name for result columns: users, approver_groups, or accounting_field_options only. One of: accounting_field_options, approver_groups, users |
type | string | Optional | Default: native_table One of: native_table |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: ramp.post_dev_api_matrix_tables. Catalog operation: post_dev_api_matrix_tables. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Required provider scopes: ["custom_records:write"]