When exporting a document in a REST API process, the export fails with the "Unable to export a non-assembled document" error. If you import the same file into the Project Setup Station, there are no assembly errors. Also, if you process the same file from a hot folder, it will be exported without any problems.
As per specification of REST API, one document is created for each file imported by the REST API.
FlexiLayout settings and document definition assembly settings create separate documents for each page of a multi-page file, importing this multi-page file in the REST API creates a single document with multiple sections and causes an assembly error.
Please allow multiple sections in the assembly settings of a document definition.