Skip to main content

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.

AttributeTypeRequiredDescription
job_typeEnumYesThe type of job to be created. See job types below.
job_dataObjectYesData specific to the job type. See detailed attributes below for each job type.
processing_typeEnumYesMust be either 'standard' or 'rush'.
metadataObjectNoKey-value pairs for operational or debugging purposes.

Job Types and job_data Attributes

Job Type: New Menu (new_menu)

Attribute in job_dataTypeRequiredDescription
catalog_sourcesString ArrayYesArray of URLs or UUIDs from File Upload endpoint.
merchant_nameStringYesMerchant's store name.
merchant_addressStringNoStore address.
merchant_tokenStringNoIdentifier for the merchant.
instructionsStringNoGuidelines for the operations team.
languageEnumNoLanguage of the menu. Default is 'en_us'.
client_mappingsObjectNoCustom mappings for the client's system.

Job Type: New Retail Catalog (new_retail_catalog)

Attribute in job_dataTypeRequiredDescription
catalog_sourcesString ArrayYesArray of URLs or UUIDs from File Upload endpoint.
merchant_nameStringYesMerchant's store name.
merchant_addressStringNoStore address.
merchant_tokenStringNoIdentifier for the merchant.
instructionsStringNoGuidelines for the operations team.
languageEnumNoLanguage of the menu. Default is 'en_us'.
client_mappingsObjectNoCustom mappings for the client's system.

Job Type: Retail Image Mapping (retail_image_mapping)

Attribute in job_dataTypeRequiredDescription
catalog_sourcesString ArrayYesArray of URLs or UUIDs from File Upload endpoint.
merchant_nameStringYesMerchant's store name.
merchant_addressStringNoStore address.
merchant_tokenStringNoIdentifier for the merchant.
instructionsStringNoGuidelines for the operations team.
client_mappingsObjectNoCustom mappings for the client's system.
image_sourcesString ArrayYesArray 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": {}
}