Webhooks instantly alert you upon workflow completion, allowing you to promptly download and use the translated file, saving time.
Alternatively, you might choose to periodically check for finished workflows, a less efficient method. For this, see the 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, use the “Preview and test” link found on the configuration page.
For thorough testing, create a Codyt project, upload a file, and finalize all jobs to activate the webhook.
Reopening and completing jobs will of course retrigger the webhook.