Skip to Content
APIModels

Models

Manage SQL data models used for transformations in Vendo.

Last reviewed July 13, 2026

Models are SQL-based data models. They let you define reusable transformations over Vendo-managed data.

List Models

GET /api/v1/models

Query Parameters

ParameterTypeDescription
limitintegerNumber of items to return
offsetintegerNumber of items to skip
sortstringSort by created_at, updated_at, name, or last_validated_at
data_typestringFilter by events, user_profiles, group_profiles, lookup_table, custom
is_validbooleanFilter by validation state

Example Response

{ "data": [ { "id": "model_123", "accountId": "acct_123", "name": "Daily Revenue", "description": "Daily revenue by store", "dataType": "custom", "columns": [], "primaryKeyColumns": ["date"], "incrementalColumn": "date", "isValid": false, "validationError": null, "lastValidatedAt": null, "createdAt": "2026-04-01T00:00:00Z", "updatedAt": "2026-04-01T00:00:00Z" } ] }

Get Model Details

GET /api/v1/models/{modelId}

Detail responses include the SQL query:

  • sqlQuery
  • dataType
  • columns
  • primaryKeyColumns
  • incrementalColumn
  • isValid
  • validationError
  • lastValidatedAt

Create Model

POST /api/v1/models

Request Body

FieldTypeRequiredDescription
namestringYesModel name
descriptionstringNoModel description
sqlQuerystringYesSQL query text
dataTypestringYesevents, user_profiles, group_profiles, lookup_table, or custom
primaryKeyColumnsstring[]NoPrimary key columns
incrementalColumnstringNoIncremental column

Example Request

curl -X POST \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Daily Revenue", "description": "Revenue grouped by day", "sqlQuery": "select order_date as date, sum(total) as revenue from orders group by 1", "dataType": "custom", "primaryKeyColumns": ["date"], "incrementalColumn": "date" }' \ https://app2.vendodata.com/api/v1/models

Update Model

PATCH /api/v1/models/{modelId}

Supported updates:

  • name
  • description
  • sqlQuery
  • dataType
  • primaryKeyColumns
  • incrementalColumn

Updating sqlQuery invalidates the previous validation state until the model is revalidated.

Delete Model

DELETE /api/v1/models/{modelId}

Model deletion is blocked while active integrations reference the model.

Need help?

When you contact support, give your workspace, the source or destination name, the job ID and the first error message.

support@vendodata.com
Last updated on