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/sourcesQuery Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer | Number of items to return (default: 20, max: 100) |
offset | integer | Number of items to skip (default: 0) |
sort | string | Sort field and order (e.g., created_at:desc) |
state | string | Filter by state: active, inactive |
sync_type | string | Filter by sync type (e.g., shopify, stripe) |
app_id | string | Filter 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
| Parameter | Type | Description |
|---|---|---|
sourceId | string (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-446655440003Example 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/sourcesRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
appId | string (UUID) | Yes | The app connection to use |
syncType | string | Yes | Type of data to sync |
importTasks | array | No | Specific data types to import |
config | object | No | Source-specific configuration |
schedule | object | No | Sync schedule configuration |
Schedule Object
| Field | Type | Description |
|---|---|---|
frequencyValue | integer | How often to sync (1, 2, etc.) |
frequencyUnit | string | Unit: hours, days, weeks, months |
dailyOption | string | For daily: morning, afternoon, evening |
dayOfWeek | integer | For weekly: 0-6 (Sunday-Saturday) |
dayOfMonth | integer | For 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/sourcesExample 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
| Field | Type | Description |
|---|---|---|
importTasks | array | Updated list of data types to import |
config | object | Updated configuration |
schedule | object | Updated 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-446655440003Delete 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-446655440004Trigger Sync
Manually trigger a sync for a source. This creates an import job and dispatches it immediately.
POST /api/v1/sources/{sourceId}/syncExample Request
curl -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
https://app.vendodata.com/api/v1/sources/880e8400-e29b-41d4-a716-446655440003/syncExample 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}/pauseExample Request
curl -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
https://app.vendodata.com/api/v1/sources/880e8400-e29b-41d4-a716-446655440003/pauseResume Source
Resume a paused source.
POST /api/v1/sources/{sourceId}/resumeExample Request
curl -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
https://app.vendodata.com/api/v1/sources/880e8400-e29b-41d4-a716-446655440003/resumeCommon Sync Types
| Sync Type | Description | Import Tasks |
|---|---|---|
shopify | Shopify store data | orders, customers, products, collections |
stripe | Stripe payment data | charges, customers, subscriptions, invoices |
google_ads | Google Ads performance | campaigns, ad_groups, ads, keywords |
meta_ads | Meta/Facebook Ads | campaigns, adsets, ads, insights |
hubspot | HubSpot CRM | contacts, companies, deals, tickets |
See the Catalog endpoint for a complete list of available sync types.
Last updated on