Directives
Directives control how bulk endpoints handle data during import. They are only available on bulk endpoints and are specified in the request payload.
Available directives
| Directive | Fields | Effect |
|---|---|---|
skipIfNotEmpty | Array of field names | On update, skip updating fields of an existing resource that are not empty |
skipMoveOnUpdate | Empty array [] | On update, skip moving an existing resource in the parent resource provided |
skipCreate | Empty array [] | Skip creating new resources, only update existing ones |
mergeTranslationsOnUpdate | Empty array [] | On update, delete all translations for a resource that are not provided in the payload |
skipIfNotEmpty
Preserve existing data by skipping updates to non-empty fields. Pass an array of field names to protect.
{
"products": [
{
"sourceId": "PROD-001",
"source": "ERP_SYSTEM",
"names": [{ "language": "EN", "value": "Updated Product Name" }],
"descriptions": [{ "language": "EN", "value": "Updated description" }]
}
],
"directives": {
"skipIfNotEmpty": ["names", "descriptions"]
}
}
If names or descriptions already have content, they will not be overwritten. Empty fields will still be updated.
skipMoveOnUpdate
Prevent resources from being moved to a different parent. The product data gets updated but the product stays in its current category.
{
"products": [
{
"sourceId": "PROD-001",
"source": "ERP_SYSTEM",
"parent": { "sourceId": "NEW_CATEGORY", "source": "ERP_SYSTEM" },
"names": [{ "language": "EN", "value": "Updated Product" }]
}
],
"directives": {
"skipMoveOnUpdate": []
}
}
skipCreate
Only update existing resources. Resources in the payload that do not already exist in Propeller are skipped.
{
"products": [
{
"sourceId": "EXISTING_PROD",
"source": "ERP_SYSTEM",
"names": [{ "language": "EN", "value": "Updated Name" }]
},
{
"sourceId": "NEW_PROD",
"source": "ERP_SYSTEM",
"names": [{ "language": "EN", "value": "New Product" }]
}
],
"directives": {
"skipCreate": []
}
}
EXISTING_PROD will be updated. NEW_PROD will be skipped.
mergeTranslationsOnUpdate
Replace all translations with only those provided in the payload. Any language version not included gets deleted.
{
"products": [
{
"sourceId": "PROD-001",
"source": "ERP_SYSTEM",
"names": [
{ "language": "EN", "value": "English Name" },
{ "language": "NL", "value": "Dutch Name" }
]
}
],
"directives": {
"mergeTranslationsOnUpdate": []
}
}
Only English and Dutch translations will remain. All other language translations will be deleted.
Combining directives
Multiple directives can be used together in a single request:
{
"products": [],
"directives": {
"skipIfNotEmpty": ["names", "descriptions"],
"skipMoveOnUpdate": [],
"mergeTranslationsOnUpdate": []
}
}
See also
- Sources for how bulk endpoints use source combinations
- REST API Reference for the full endpoint specification