Webhooks can notify you when a workflow is completed. You can then immediately download and consume the newly translated file. No time wasted.
Alternatively, you would opt for the less efficient polling for completed workflows in regular intervals. For this approach refer to API method projects/{pid}/workflows/list/delivered
Configure webhooks
Enable webhooks in the project
Navigate to your (Codyt) project and go to the “Workflow & Suppliers” tab.
...
Tick the options to automatically create translated files and to trigger webhooks:
...
Configure the webhook
Next, you need to register the URL that is called when a workflow completes. The URL must point to your web service that handles the event.
Login as administrator and click Settings. Then select the Developer API Webhooks in the page.
...
Click Add new webhook in the top right and choose “Document workflow - Finished” from the dropdown menu. The new web hook is ready to be configured:
Add the URL. You can include URL parameters with placeholders such as the document ID and branch language.
Customize the HTTP BODY, if needed.
Add HTTP HEADERS, such as for Basic Authentication.
Add Conditions to restrict the webhook to a specific project (apply condition to {{projectReference}}).
Test webhook
To test your webhook, look for the “Preview and test” link on the configuration page.
For real testing, create a Codyt project, add a file and complete all the jobs. This will trigger the webhook.
Reopening jobs and completing will again trigger the same webhook.