Filter profiles

Copy a built-in filter profile, change its import options, and use it for a project or a single upload.

Every member can list and read filter profiles. Creating, replacing, deleting and setting the organization's default need the Owner, Admin or Project manager role.

A filter profile holds the import options of one format: html, xlsx, json_i18n, po (.po and .pot), txt, markdown or xml (generic XML, not Android string resources). Other formats have no filter profiles. Each project names one profile per format; a format it names none for uses its built-in Default. A file keeps the options it was uploaded with.

The app calls a filter profile a file configuration (File configurations → File import settings). The paths and fields here keep filter_profile; the message of an error says "file configuration".

1. Find a profile to start from

curl "{app_url}/api/v1/filter-profiles?format=xlsx" \
  -H "Authorization: Bearer $OPENLOC_KEY"

Built-ins have "builtin": true and a builtin_key such as builtin:xlsx-default@1. Every format has a Default; json_i18n, po, txt and xlsx also have Plain text strings. Built-ins are read-only: a PUT or a DELETE answers 409.

2. Copy it

curl {app_url}/api/v1/filter-profiles \
  -H "Authorization: Bearer $OPENLOC_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Product sheet", "from_id": 12, "options": {"inline_html": true, "xlsx": {"sheets": [], "header_row": true, "columns": ["B"]}}}'

A copy takes the format of the profile it copies, and its options when you leave options out. Send format and options instead of from_id to start from scratch; options is required then, and an html or xml profile with empty options ({}) starts from the defaults. Names are unique per format: a name in use is 409.

The response holds only the options of the profile's format:

3. Change it

PUT replaces the name and the whole options; the format never changes. Send the updated_at you read; when the profile changed since, the answer is 409 and you read it again.

curl -X PUT {app_url}/api/v1/filter-profiles/42 \
  -H "Authorization: Bearer $OPENLOC_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Product sheet", "updated_at": "2026-10-29T09:30:12.512304Z", "options": {"inline_html": false, "xlsx": {"sheets": ["Products"], "header_row": true, "columns": ["B", "C"]}}}'

Projects that use the profile read their next uploads with the change; files already uploaded keep their options.

4. Use it

Name it per format when you create a project. A format you leave out takes the template's profile; without a template, the organization's default, else the format's Default. null picks the Default.

curl {app_url}/api/v1/projects \
  -H "Authorization: Bearer $OPENLOC_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Catalog", "source_language": "en", "target_languages": ["de"], "workflow_id": 7, "filter_profile_ids": {"xlsx": 42}}'

Or pick it for one upload with the filter_profile_id form field. It must be a profile of the file's format, else the answer is 400; an xml pick on a file OpenLoc reads as Android string resources is ignored. An Excel profile with column rules lays the workbook out when you send no xlsx_layout.

curl {app_url}/api/v1/projects/310/files \
  -H "Authorization: Bearer $OPENLOC_KEY" \
  -F "file=@catalog.xlsx" \
  -F "filter_profile_id=42"

5. Make it the organization's default

curl -X PUT {app_url}/api/v1/filter-profiles/defaults \
  -H "Authorization: Bearer $OPENLOC_KEY" \
  -H "Content-Type: application/json" \
  -d '{"format": "xlsx", "filter_profile_id": 42}'

Projects and templates created without a template then start with it for that format; existing ones keep their picks. "filter_profile_id": null goes back to the built-in Default. The answer lists the formats that have a default, and org_default is true on that profile when you list or read it.

A profile that a template uses, or that is the organization's default, cannot be deleted (409). Deleting a profile puts the projects that use it back on the format's Default. The API sets a project's profiles only when it creates the project: to pick others for an existing project, use the project's Settings tab in the app or the MCP tools.

Related