Using https://gitlab.com/zaaksysteem/converter-service
# Build and run converter server
docker run --rm -p 5032:5032 converter
# Magic oneliner for input.docx -> output.odt
jq -n --arg content `cat input.docx | base64` \
'{ "to_type": "application/vnd.oasis.opendocument.text", "content": $content }' \
| curl -X POST -H "Content-Type: application/json" -d @- http://127.0.0.1:5032/v1/convert \
| jq -r '.content' \
| base64 -D > output.odt