Update a data source
/v1/datasets/{datasetId}/sources/{sourceId}Partially updates a source. Send only the fields you want to change; omitted
fields are left untouched. At least one recognised field must be present.
type cannot be changed — delete the source and create a new one instead.
Setting status to inactive stops the scheduler from enqueuing jobs and makes
Create sync job return 409 Data source is not active. It does not cancel a job
that is already pending or processing.
Changing syncPeriod does not reset the schedule: the next automatic sync is
still computed from the last successful sync time.
Path parameters
2The dataset the source belongs to.
The source to update.
Request body
application/jsonrequiredNew store URL. Must be a string that parses as an absolute URL.
New automatic sync interval in minutes: 0 (never) or at least 60.
Numeric strings are accepted here and fractional values are truncated.
New scheduling status.
activeinactiveMust be a boolean if present. Currently always stored as true.
Response
Always true on a 2xx response.
A store connection that feeds a dataset. Sources carry no credentials: the Shopify connector reads the public storefront catalogue, so the only stored configuration is the endpoint URL. Nothing is redacted from responses.
Unique identifier of the source. Generated on create.
The dataset this source feeds.
The organization that owns the source.
Connector type. shopify-api reads a Shopify storefront's public products.json.
shopify-apiactive sources are picked up by the scheduler and accept manual sync jobs.
inactive sources are ignored by the scheduler and reject manual jobs.
activeinactiveScheduling state.
Connector configuration.
When the source was created.
When the source was last modified, including scheduler updates to sync.previous.
Errors
27Every error is JSON with a single error string unless noted. Match on the status code; the message is for humans.
Request body must be valid JSON.The request body is not parseable JSON. This response carries no rate-limit headers.
Request body must be a JSON object.The request body is empty, an array, or a JSON scalar. This response carries no rate-limit headers.
Data source not found or access deniedNo source with that sourceId belongs to the organization that owns the key, or the source belongs to a different datasetId than the path. Checked after field validation.
endpoint must be a stringendpoint is present but not a string (including null), and it is the only invalid field.
endpoint must be a valid URLendpoint is a string that does not parse as an absolute URL, and it is the only invalid field.
syncPeriod must be 0 (Never) or at least 60 minutessyncPeriod is present but not numeric, or is between 1 and 59 after truncation, and it is the only invalid field.
status must be "active" or "inactive"status is present but not one of the two allowed values, and it is the only invalid field.
disableGenerativeAssets must be a booleandisableGenerativeAssets is present but not true or false, and it is the only invalid field.
Validation failed.More than one field is invalid. details lists one { path, message } entry per invalid field, using the messages above. A single-field failure also carries details.
{
"error": "Validation failed.",
"details": [
{
"path": "endpoint",
"message": "endpoint must be a valid URL"
},
{
"path": "status",
"message": "status must be \"active\" or \"inactive\""
}
]
}No valid fields to updateThe body contains none of endpoint, syncPeriod, status or disableGenerativeAssets.
curl -X PATCH "https://stylor.ai/api/v1/datasets/YOUR_DATASET_ID/sources/YOUR_SOURCE_ID" \
-H "Authorization: Bearer $STYLOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"syncPeriod": 360
}'{
"success": true,
"source": {
"sourceId": "8a4d2f1e-3c5b-4e6a-9d7f-2b1c3d4e5f6a",
"datasetId": "3f1c2a9e-6b7d-4c1e-9a2b-1d4e5f6a7b8c",
"organizationId": "5b7e9c1a-2d4f-4a6b-8c1d-9e2f3a4b5c6d",
"type": "shopify-api",
"status": "active",
"sync": {
"period": 360,
"previous": "2026-09-11T03:00:12.418Z"
},
"config": {
"endpoint": "https://example-store.myshopify.com/products.json",
"disableGenerativeAssets": true
},
"createdAt": "2026-08-01T14:22:09.101Z",
"updatedAt": "2026-09-12T09:31:07.555Z"
}
}