Excel batch API
Export a selection and validate or apply an edited workbook through the batch endpoints.
For the team workflow, see Edit in bulk with Excel.
Excel batch operations apply to Vox-owned entities. The caller needs action permission. The workbook contains an Entities sheet with ID and version columns, plus hidden _vox_baseline and _vox_manifest sheets used to detect edits and validate the import. Keep both hidden sheets and the exported column layout. A selector, ie a rule field, has no column, since a rule is edited in the admin. Limits are 10,000 entities, 25 MB per workbook and 16,384 columns.
Use the API
The admin uses three endpoints, which you can call from your own tools.
Export a selection to a workbook:
POST /api/products/batch/excel/export
Content-Type: application/json
{
"selection": { "ids": ["1001", "1002"] },
"valueContexts": { "Language": ["sv", "en"] },
"actions": ["Discontinue"],
"blankMode": "Ignore"
}
Instead of ids, a selection can use "allMatching": true with the list's filters and search, and excludedIds
for the entities to leave out.
Import a workbook as multipart/form-data with the file in file:
POST /api/products/batch/excel/import?dryRun=true
| Query parameter | Meaning |
|---|---|
dryRun | true returns the preview without saving. |
mode | Atomic (default) saves every entity or none. PerEntity saves each entity on its own and returns the errors per row. |
blankMode | Overrides the workbook's treatment of blank custom-action cells: Ignore or Clear. |
scope | Where to save, eg draft. Without it, the workbook's own scope is used. |
Run actions on many entities without a workbook:
POST /api/products/batch/actions
Content-Type: application/json
{
"mode": "Atomic",
"items": [
{ "id": "1001", "version": 7, "actions": [{ "action": "SetName", "values": { "name": "Rain jacket" } }] },
{ "id": "1002", "version": 3, "actions": [{ "action": "Discontinue", "values": {} }] }
]
}
The response has one result per item, with the saved entity or its error. When an Atomic save fails, nothing is saved,
and the response names the index and id of the entity that failed, the same for a workbook and for the actions: 409 for
a version conflict, with the current version; 404 for a missing entity; 403 for a refused permission; and 400 for
validation errors, each under the entity's path, eg items[2].name, or for an action that rejected the change.