To zero out the unused ETC, this needs to be done by updating the ETC curve sum to 0. To update the status to Completed, the status needs to be updated to 2.
Here is a sample xml used to make the above two updates on a task assignment and task:
<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_project.xsd">
<Header action="write" externalSource="NIKU" objectType="project" version="15.4.1.115"/>
<Projects>
<Project name="Test Project" projectID="00000197">
<Tasks>
<Task name="Task 1" taskID="tsk1" outlineLevel="1" status="2" >
<Baselines/>
<Assignments>
<TaskLabor resourceID="res1">
<EstCurve>
<Segment finish="2019-01-22T17:00:00" start="2019-01-22T00:00:00" sum="0"/>
</EstCurve>
</TaskLabor>
</Assignments>
</Task>
</Tasks>
</Project>
</Projects>
</NikuDataBus>