---
schema_version: "1"
id: 689280e6b6807808f0f99db1acdd397d3580eb6dc3d68f3bf68d5a25d64cc043
title: Close or Abort a Job
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/data-cloud/data-cloud-int/references/ingestionapi/c360-a-api-close-or-abort-a-job.md
canonical_url: https://developer.salesforce.com/docs/data/data-cloud-int/references/data-cloud-ingestionapi-ref/c360-a-api-close-or-abort-a-job.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: d4b7570c8278100b82b14da76e586fc55e4a39c958db83c0e0a14601254a28a4
products:
  - Data 360 Integration Guide
  - Data 360 Developer Documentation
---
# Close or Abort a Job

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.

Any open bulk jobs older than seven days, with state as _Open_ or _UploadComplete_ are deleted from the queue. After a job is closed or aborted, you can’t add more job data.

- URI

  - : /api/v1/ingest/jobs/{id}

- Available since release

  - : Data 360 v1.0, Salesforce v51.0

- Formats

  - : JSON

- HTTP methods

  - : PATCH

- Authentication

  - : `Authorization: Bearer {access_token}`

**note:** All fields defined in the schema must be present in the request payload. This condition holds regardless of whether the Value Required in the Ingestion API Connector is set to true or not. If there is no data available for a certain field on a record, send in a blank value.

- Request body

  - :
    ```nolang
    {
      "state" : "UploadComplete"
    }
    ```

- 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

  - :
    ```nolang
    {
      "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": "v1"
    }
    ```

## Example

```nolang
curl --location --request PATCH \
'https://{instance_url}/api/v1/ingest/jobs/{id}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {access_token}' \
--data-raw '{
  "state":"UploadComplete"
}'
< HTTP/1.1 200 OK
< Content-Type: application/json;charset=UTF-8
< Transfer-Encoding: chunked
<
{"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}
```
