Create Job
Overview
The "Create Job" functionality allows users to create new tasks within Woflow's system by specifying various attributes. This feature supports asynchronous data requests through an API endpoint, enabling users to define the job's nature, such as type, merchant details, and other relevant information, for a flexible and customized catalog management experience.
Job Attributes
These root attributes are required for creating a job, irrespective of the job type. Specific attributes for job_data
vary based on the job type and are detailed in the sections below.
Attribute | Type | Required | Description |
---|---|---|---|
job_type | Enum | Yes | The type of job to be created. See job types below. |
job_data | Object | Yes | Data specific to the job type. See detailed attributes below for each job type. |
processing_type | Enum | Yes | Must be either 'standard' or 'rush'. |
metadata | Object | No | Key-value pairs for operational or debugging purposes. |
Job Types and job_data
Attributes
Job Type: New Menu (new_menu
)
Attribute in job_data | Type | Required | Description |
---|---|---|---|
catalog_sources | String Array | Yes | Array of URLs or UUIDs from File Upload endpoint. |
merchant_name | String | Yes | Merchant's store name. |
merchant_address | String | No | Store address. |
merchant_token | String | No | Identifier for the merchant. |
instructions | String | No | Guidelines for the operations team. |
language | Enum | No | Language of the menu. Default is 'en_us'. |
client_mappings | Object | No | Custom mappings for the client's system. |
Job Type: New Retail Catalog (new_retail_catalog
)
Attribute in job_data | Type | Required | Description |
---|---|---|---|
catalog_sources | String Array | Yes | Array of URLs or UUIDs from File Upload endpoint. |
merchant_name | String | Yes | Merchant's store name. |
merchant_address | String | No | Store address. |
merchant_token | String | No | Identifier for the merchant. |
instructions | String | No | Guidelines for the operations team. |
language | Enum | No | Language of the menu. Default is 'en_us'. |
client_mappings | Object | No | Custom mappings for the client's system. |
Job Type: Retail Image Mapping (retail_image_mapping
)
Attribute in job_data | Type | Required | Description |
---|---|---|---|
catalog_sources | String Array | Yes | Array of URLs or UUIDs from File Upload endpoint. |
merchant_name | String | Yes | Merchant's store name. |
merchant_address | String | No | Store address. |
merchant_token | String | No | Identifier for the merchant. |
instructions | String | No | Guidelines for the operations team. |
client_mappings | Object | No | Custom mappings for the client's system. |
image_sources | String Array | Yes | Array of image URLs or identifiers. |
Example Request
# Example of a 'new_menu' job type request
curl --location 'https://gateway.woflow.com/v1/jobs' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token api_key=<api_key>' \
--data-raw '{
"job": {
"job_type": "new_menu",
"job_data": {
"catalog_sources": [
"https://www.example.com/menu.pdf"
],
"merchant_name": "Example Merchant",
...
},
"processing_type": "standard",
...
}
}'
Example Response
{
"id": "1f98d2b1-0065-491f-a258-e72241fae117",
"state": "initiated",
"processing_type": "standard",
"results": {}
}