Skip to main content
POST
/
api
/
jobs
/
Create Job
curl --request POST \
  --url https://api.merchantops.ai/api/jobs/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "job_type": "<string>",
  "total_items": 1,
  "metadata": {},
  "triggered_by": "<string>"
}
'
{
  "failed_items": 123,
  "job_id": "<string>",
  "job_type": "<string>",
  "processed_items": 123,
  "progress_percentage": 123,
  "status": "<string>",
  "success_rate": 123,
  "total_items": 123,
  "completed_at": "<string>",
  "created_at": "<string>",
  "duration_seconds": 123,
  "error_message": "<string>",
  "errors": [
    {
      "entity_key": "<string>",
      "entity_type": "<string>",
      "error_type": "<string>",
      "message": "<string>",
      "timestamp": "<string>",
      "details": {},
      "step": "<string>"
    }
  ],
  "metadata": {},
  "started_at": "<string>",
  "triggered_by": "<string>",
  "warned_items": 0,
  "warnings": [
    {
      "entity_key": "<string>",
      "entity_type": "<string>",
      "error_type": "<string>",
      "message": "<string>",
      "timestamp": "<string>",
      "details": {},
      "step": "<string>"
    }
  ]
}

Headers

authorization
string | null
X-Organization-ID
string | null

Cookies

stytch_session
string | null

Body

application/json

Request model for creating a Job.

job_type
string
required

Type of job (enrichment or crawl)

total_items
integer
required

Total number of items to process

Required range: x >= 0
metadata
Metadata · object

Job-specific metadata

triggered_by
string | null

User ID who triggered this job

Response

Successful Response

Response model for a single Job.

failed_items
integer
required

Items that failed

job_id
string
required

Unique job identifier

job_type
string
required

Type of job (enrichment or crawl)

processed_items
integer
required

Items successfully processed

progress_percentage
number
required

Progress percentage (0-100)

status
string
required

Current job status

success_rate
number
required

Success rate percentage (0-100)

total_items
integer
required

Total items to process

completed_at
string | null

Job completion timestamp

created_at
string | null

Job creation timestamp

duration_seconds
number | null

Job duration in seconds

error_message
string | null

DEPRECATED: Use 'errors' array. Legacy error message

errors
JobErrorResponse · object[]

Array of errors that occurred

metadata
Metadata · object

Job metadata

started_at
string | null

Job start timestamp

triggered_by
string | null

User who triggered the job

warned_items
integer
default:0

Items processed with warnings (e.g., expected target gaps)

warnings
JobErrorResponse · object[]

Array of non-blocking warnings (same shape as errors)