Skip to Content

Sources

Sources are configurations that import data from connected apps into Vendo. Each source is linked to an app and defines what data to sync and how often.

List Sources

Retrieve all sources for your account.

GET /api/v1/sources

Query Parameters

ParameterTypeDescription
limitintegerNumber of items to return (default: 20, max: 100)
offsetintegerNumber of items to skip (default: 0)
sortstringSort field and order (e.g., created_at:desc)
statestringFilter by state: active, inactive
sync_typestringFilter by sync type (e.g., shopify, stripe)
app_idstringFilter by app ID

Example Request

curl -H "Authorization: Bearer YOUR_API_KEY" \ "https://app.vendodata.com/api/v1/sources?state=active"

Example Response

{ "data": [ { "id": "880e8400-e29b-41d4-a716-446655440003", "accountId": "123e4567-e89b-12d3-a456-426614174000", "appId": "550e8400-e29b-41d4-a716-446655440000", "appName": "My Shopify Store", "syncType": "shopify", "state": "active", "status": "completed", "lastImportAt": "2024-03-04T10:30:00Z", "earliestDataAt": "2023-01-01T00:00:00Z", "latestDataAt": "2024-03-04T00:00:00Z", "consecutiveFailures": 0, "latestJobId": "job_12345", "createdAt": "2024-01-15T08:00:00Z", "updatedAt": "2024-03-04T10:30:00Z" } ], "meta": { "pagination": { "total": 1, "limit": 20, "offset": 0, "hasMore": false } } }

Get Source Details

Retrieve details for a specific source.

GET /api/v1/sources/{sourceId}

Path Parameters

ParameterTypeDescription
sourceIdstring (UUID)The source’s unique identifier

Example Request

curl -H "Authorization: Bearer YOUR_API_KEY" \ https://app.vendodata.com/api/v1/sources/880e8400-e29b-41d4-a716-446655440003

Example Response

{ "data": { "id": "880e8400-e29b-41d4-a716-446655440003", "accountId": "123e4567-e89b-12d3-a456-426614174000", "appId": "550e8400-e29b-41d4-a716-446655440000", "appName": "My Shopify Store", "syncType": "shopify", "importTasks": ["orders", "customers", "products"], "config": { "include_refunds": true, "sync_inventory": false }, "schedule": { "frequency_value": 1, "frequency_unit": "days", "daily_option": "morning" }, "state": "active", "status": "completed", "lastImportAt": "2024-03-04T10:30:00Z", "lastError": null, "earliestDataAt": "2023-01-01T00:00:00Z", "latestDataAt": "2024-03-04T00:00:00Z", "consecutiveFailures": 0, "latestJobId": "job_12345", "createdAt": "2024-01-15T08:00:00Z", "updatedAt": "2024-03-04T10:30:00Z" } }

Create Source

Create a new data source.

POST /api/v1/sources

Request Body

FieldTypeRequiredDescription
appIdstring (UUID)YesThe app connection to use
syncTypestringYesType of data to sync
importTasksarrayNoSpecific data types to import
configobjectNoSource-specific configuration
scheduleobjectNoSync schedule configuration

Schedule Object

FieldTypeDescription
frequencyValueintegerHow often to sync (1, 2, etc.)
frequencyUnitstringUnit: hours, days, weeks, months
dailyOptionstringFor daily: morning, afternoon, evening
dayOfWeekintegerFor weekly: 0-6 (Sunday-Saturday)
dayOfMonthintegerFor monthly: 1-31

Example Request

curl -X POST \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "appId": "550e8400-e29b-41d4-a716-446655440000", "syncType": "shopify", "importTasks": ["orders", "customers"], "schedule": { "frequencyValue": 1, "frequencyUnit": "days", "dailyOption": "morning" } }' \ https://app.vendodata.com/api/v1/sources

Example Response

{ "data": { "id": "990e8400-e29b-41d4-a716-446655440004", "accountId": "123e4567-e89b-12d3-a456-426614174000", "appId": "550e8400-e29b-41d4-a716-446655440000", "syncType": "shopify", "state": "active", "status": "pending", "createdAt": "2024-03-04T15:00:00Z" } }

Update Source

Update an existing source configuration.

PATCH /api/v1/sources/{sourceId}

Request Body

FieldTypeDescription
importTasksarrayUpdated list of data types to import
configobjectUpdated configuration
scheduleobjectUpdated schedule

Example Request

curl -X PATCH \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "schedule": { "frequencyValue": 6, "frequencyUnit": "hours" } }' \ https://app.vendodata.com/api/v1/sources/880e8400-e29b-41d4-a716-446655440003

Delete Source

Soft-delete a source.

DELETE /api/v1/sources/{sourceId}

Example Request

curl -X DELETE \ -H "Authorization: Bearer YOUR_API_KEY" \ https://app.vendodata.com/api/v1/sources/990e8400-e29b-41d4-a716-446655440004

Trigger Sync

Manually trigger a sync for a source. This creates an import job and dispatches it immediately.

POST /api/v1/sources/{sourceId}/sync

Example Request

curl -X POST \ -H "Authorization: Bearer YOUR_API_KEY" \ https://app.vendodata.com/api/v1/sources/880e8400-e29b-41d4-a716-446655440003/sync

Example Response

{ "data": { "jobId": "job_67890", "status": "dispatched", "message": "Sync job has been dispatched" } }

Pending Response

If the job is created but dispatch is delayed:

{ "data": { "jobId": "job_67890", "status": "pending", "message": "Job created but dispatch pending: Will retry automatically" } }

Pause Source

Pause a source to stop scheduled syncs.

POST /api/v1/sources/{sourceId}/pause

Example Request

curl -X POST \ -H "Authorization: Bearer YOUR_API_KEY" \ https://app.vendodata.com/api/v1/sources/880e8400-e29b-41d4-a716-446655440003/pause

Resume Source

Resume a paused source.

POST /api/v1/sources/{sourceId}/resume

Example Request

curl -X POST \ -H "Authorization: Bearer YOUR_API_KEY" \ https://app.vendodata.com/api/v1/sources/880e8400-e29b-41d4-a716-446655440003/resume

Common Sync Types

Sync TypeDescriptionImport Tasks
shopifyShopify store dataorders, customers, products, collections
stripeStripe payment datacharges, customers, subscriptions, invoices
google_adsGoogle Ads performancecampaigns, ad_groups, ads, keywords
meta_adsMeta/Facebook Adscampaigns, adsets, ads, insights
hubspotHubSpot CRMcontacts, companies, deals, tickets

See the Catalog endpoint for a complete list of available sync types.

Last updated on