Archive dataset
/v1/datasets/{datasetId}/archiveSets a dataset's status to archived, taking it out of search, chat,
outfit generation and the widget while keeping all of its data. Use it
for seasonal catalogues you expect to bring back; use Delete dataset
when the data should go too.
When the dataset was not already archived, related records follow it:
- active data sources are set to
inactive, which stops scheduled syncs; - active items are set to
archived; - queue rows that were
pendingorpartial_updateare set toarchived, so they will not be processed.
Calling this on a dataset that is already archived is harmless — the
response has alreadyArchived: true and nothing else changes.
Good to know
- Activate dataset reverses the source and item changes, but archived queue rows stay archived.
- The returned
datasetis the stored record as-is and additionally carries the database's_idand__vbookkeeping fields. Ignore them.
Path parameters
1The dataset to archive.
Response
Always true on success.
true when the dataset was already archived and no cascade ran.
The full stored dataset record. Returned by *Update dataset*, *Activate
dataset* and *Archive dataset*. List and retrieve responses project a
subset — see DatasetSummary and DatasetDetail.
Internal _id and __v fields are stripped by *Update dataset* but are
still present on the activate and archive responses; ignore them.
Unique id of the dataset. Use it as the datasetId path parameter.
Id of the organization that owns the dataset — the one behind your API key.
Lifecycle state of a dataset.
- draft — newly created; not visible to search, chat or the widget.
- active — live. Any number of datasets can be active at once.
- archived — parked. Data is kept, items and sources are switched off.
draftactivearchivedDisplay name. Trimmed on create; cut to 200 characters on update.
Free-text description. Defaults to an empty string; cut to 2000 characters on update.
Arbitrary JSON you attach to the dataset. Omitted when never set. Replaced wholesale by *Update dataset*.
Store details attached to a dataset. Set on create, editable field-by-field on update.
Whether newly processed items go live automatically. Set on create; true unless explicitly false.
When the dataset was created.
When the dataset record was last written.
Errors
20Every error is JSON with a single error string unless noted. Match on the status code; the message is for humans.
Organization '<organizationId>' not found.The organization that owns the key no longer exists.
Dataset '<datasetId>' not found for organization '<organizationId>'.No dataset with that id belongs to your organization.
Invalid 'datasetId': expected a non-empty string.datasetId is empty.
curl -X PATCH "https://stylor.ai/api/v1/datasets/YOUR_DATASET_ID/archive" \
-H "Authorization: Bearer $STYLOR_API_KEY"{
"archived": true,
"alreadyArchived": false,
"dataset": {
"datasetId": "c9b3c6c0-9b0f-4f42-bf3f-2b7a6b1b9d31",
"organizationId": "0a2c1f4e-5b6d-7e8f-9012-3456789abcde",
"status": "archived",
"name": "Spring 2026",
"description": "Women's spring drop",
"config": {
"storeUrl": "https://example-boutique.com",
"storeId": "58712345678",
"storeDomain": "example-boutique.com",
"storeName": "Example Boutique",
"currency": "USD",
"targetGender": "womens"
},
"autoPublish": true,
"createdAt": "2026-03-02T09:14:31.208Z",
"updatedAt": "2026-09-12T10:07:55.019Z"
}
}