Close or Abort a Job

This closes or aborts a job. You close a job by updating the job state to UploadComplete. When you close a job, the uploaded data is enqueued for processing. To abort a job, update the job state to Aborted. If you abort a job, the job doesn’t get queued or processed. Any data uploaded as part of the aborted job is deleted.

All fields must be provided in the request payload as defined in the schema regardless of whether Value Required is true or not. The Value Required is applicable to the value of the fields only. We recommend entering a blank value for fields not set as required.

Note

After a job has been closed or aborted, you can’t add more job data.

Syntax

URI
/api/v1/ingest/jobs/{id}
Available since release
Salesforce CDP v1.0, Salesforce v51.0
Formats
JSON
HTTP methods
PATCH
Authentication
Authorization: Bearer access_token
Request body
1{
2   "state" : "UploadComplete"
3}
Request parameters
Parameter Description
id The job id returned in the response body from the Create Job request.
state The state to update the job to. Use UploadComplete to close a job, or Aborted to abort a job.
Response body
1{
2       "id": "7505e000001NLkPAAW",
3       "operation": "upsert",
4       "object": "Contact",
5       "createdById": "0055e000003PfMYAA0",
6       "createdDate": "2021-06-10T13:25:40.000Z",
7       "systemModstamp": "2021-06-10T13:25:40.000Z",
8       "state": "UploadComplete",
9       "contentType": "CSV",
10       "apiVersion": "v1"
11}

Example

1curl --location --request PATCH 'https://{instance_url}/api/v1/ingest/jobs/{id}' \
2--header 'Content-Type: application/json' \
3--header 'Authorization: Bearer <access_token>' \
4--data-raw '{
5   "state":"UploadComplete"
6}'
7< HTTP/1.1 200 OK
8< Content-Type: application/json;charset=UTF-8
9< Transfer-Encoding: chunked
10<
11{"id":"7505e000001NLkPAAW","operation":"upsert","object":"Contact","createdById":"0055e000003PfMYAA0","createdDate":"2021-06-10T13:25:40.000Z","systemModstamp":"2021-06-10T13:25:40.000Z","state":"UploadComplete","contentType":"CSV","apiVersion":1}