Skip to main content

Create Data Export

Overview

Woflow employs an asynchronous data export system to handle the retrieval of large catalogs efficiently. This mechanism ensures that even extensive data sets are processed without causing undue strain or delay in the system.

Initiating a Data Export

To trigger a data export, you'll need to make a request to a specific endpoint. Here's an example of how to initiate the process:

curl --location 'https://gateway.woflow.com/v1/data_exports' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token api_key=<api_key>' \
--data-raw '{
{
"id": "73d10d57-a1e1-4fc4-a6dc-2d99e1194543",
"type" : "catalog",
"callback_url": "<your_callback_url>"
}
}'

Callback URL (Optional)

By including an optional callback_url in your request, you allow Woflow to post the results directly to your specified endpoint once the data export process is complete. This eliminates the need to continually poll for updates, providing a seamless integration experience. If you decide not to use the callback_url, you'll need to manually poll for the status of the data export.

Example Response

Once the request is made, you'll receive a response that confirms the initiation of the data export and provides additional details about the process:

{
"id": "a2f71a26-98ae-459c-bda9-45b7878ef9e6",
"state": "initiated",
"callback_url": null,
"delivery_url": null,
"job_id": "76f22407-8dcf-48b9-99a3-ecb1c925d4d0",
"job_type": "new_menu",
"client_mappings": {}
}

Upon successful initiation, the state will indicate "initiated", and other details about the job will be provided.