Jobs

Complete a job

POST
Complete a job and return the job

Path parameters

jobIdstringRequired
ID of job to return

Request

This endpoint expects an optional object.
outcome
objectOptional
Outcome summary of a job
info
stringOptional

Response

This endpoint returns an object
data
object
A single unit of work that will execute asynchronously
POST
$curl -X POST https://api.x.flatfile.com/v1/jobs/us_jb_YOUR_ID/complete \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "outcome": {
> "acknowledge": true,
> "buttonText": "Acknowledge",
> "next": {
> "type": "id",
> "id": "us_jb_YOUR_ID"
> },
> "heading": "Success",
> "message": "Job was successful"
> },
> "info": "Job is Complete"
>}'
Response
1{
2 "data": {
3 "createdAt": "2023-10-30T20:04:28.556Z",
4 "id": "us_jb_YOUR_ID",
5 "operation": "submitAction",
6 "source": "us_wb_YOUR_ID",
7 "type": "workbook",
8 "updatedAt": "2023-10-30T20:04:32.075Z",
9 "destination": "us_wb_YOUR_ID",
10 "environmentId": "us_env_YOUR_ID",
11 "fileId": "us_fl_YOUR_ID",
12 "finishedAt": "2023-10-30T20:04:32.074Z",
13 "info": "Starting job to submit action to webhook.site",
14 "input": {},
15 "managed": true,
16 "mode": "foreground",
17 "outcome": {
18 "message": "Data was successfully submitted to Webhook.site. Go check it out at https://example.site/example."
19 },
20 "progress": 100,
21 "startedAt": "2023-10-30T20:04:29.453Z",
22 "status": "complete",
23 "subject": {
24 "type": "resource",
25 "id": "us_wb_YOUR_ID"
26 },
27 "trigger": "immediate",
28 "config": {}
29 }
30}