# Jobs

Endpoints for listing, retrieving, downloading, and replaying partner jobs.

## List Jobs

> Returns a list of jobs based on creation date filters.

```json
{"openapi":"3.1.0","info":{"title":"Partner Jobs API","version":"16"},"tags":[{"name":"Jobs","description":"Endpoints for listing, retrieving, downloading, and replaying partner jobs."}],"servers":[{"url":"https://api.impact.com","description":"Production server"}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"Use your AccountSID as the username and AuthToken as the password."}},"schemas":{"Job":{"type":"object","properties":{"Id":{"type":"string","description":"The unique identifier for this job."},"Type":{"type":"string","enum":["DownloadReport","ApiReport","UploadAds","TermModification","ClickExport"],"description":"The type of job."},"ProgramId":{"type":"string","description":"The impact.com Program ID (CampaignId) this job was scheduled for."},"CreatedBy":{"type":"string","description":"The Account SID of the account that scheduled this job."},"CreatedDate":{"type":"string","format":"date-time","description":"The date and time the job was initially scheduled."},"StartedDate":{"type":"string","format":"date-time","description":"The date and time the job last started running."},"CompletedDate":{"type":"string","format":"date-time","description":"The date and time the job was last successfully completed."},"AbandonedDate":{"type":"string","format":"date-time","description":"Set when an attempt is made to start a job that is already running."},"CancelledDate":{"type":"string","format":"date-time","description":"The date and time the job was last canceled."},"FailedDate":{"type":"string","format":"date-time","description":"The date and time processing of this job last raised an error."},"LastProgressUpdateDate":{"type":"string","format":"date-time","description":"The date and time progress on job processing was last updated."},"Status":{"type":"string","enum":["QUEUED","RUNNING","COMPLETED","CANCELLED","ERROR","FAILED"],"description":"The current processing status of the job."},"StatusMessage":{"type":"string","description":"A human-readable message describing the current job status."},"RecordsProcessed":{"type":"integer","description":"The number of records processed up to the last progress update."},"PercentageComplete":{"type":"integer","description":"The percentage of job processing that has been completed."},"Replayable":{"type":"boolean","description":"Indicates whether this job type supports replay."},"ResultUri":{"type":"string","description":"API resource path to download the result file once the job is complete."}}}}},"paths":{"/Mediapartners/{AccountSID}/Jobs":{"get":{"summary":"List Jobs","description":"Returns a list of jobs based on creation date filters.","operationId":"listJobs","tags":["Jobs"],"parameters":[{"name":"AccountSID","in":"path","required":true,"schema":{"type":"string"},"description":"Unique identifier for the partner account."},{"name":"CreatedAfter","in":"query","description":"Return jobs scheduled after this date (YYYY-MM-DD).","schema":{"type":"string","format":"date"}},{"name":"CreatedBefore","in":"query","description":"Return jobs scheduled before this date (YYYY-MM-DD).","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"A list of job objects.","content":{"application/json":{"schema":{"type":"object","properties":{"Jobs":{"type":"array","items":{"$ref":"#/components/schemas/Job"}}}}}}}}}}}}
```

## Retrieve Job Status

> Returns an object describing the status of the queried job.

```json
{"openapi":"3.1.0","info":{"title":"Partner Jobs API","version":"16"},"tags":[{"name":"Jobs","description":"Endpoints for listing, retrieving, downloading, and replaying partner jobs."}],"servers":[{"url":"https://api.impact.com","description":"Production server"}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"Use your AccountSID as the username and AuthToken as the password."}},"schemas":{"Job":{"type":"object","properties":{"Id":{"type":"string","description":"The unique identifier for this job."},"Type":{"type":"string","enum":["DownloadReport","ApiReport","UploadAds","TermModification","ClickExport"],"description":"The type of job."},"ProgramId":{"type":"string","description":"The impact.com Program ID (CampaignId) this job was scheduled for."},"CreatedBy":{"type":"string","description":"The Account SID of the account that scheduled this job."},"CreatedDate":{"type":"string","format":"date-time","description":"The date and time the job was initially scheduled."},"StartedDate":{"type":"string","format":"date-time","description":"The date and time the job last started running."},"CompletedDate":{"type":"string","format":"date-time","description":"The date and time the job was last successfully completed."},"AbandonedDate":{"type":"string","format":"date-time","description":"Set when an attempt is made to start a job that is already running."},"CancelledDate":{"type":"string","format":"date-time","description":"The date and time the job was last canceled."},"FailedDate":{"type":"string","format":"date-time","description":"The date and time processing of this job last raised an error."},"LastProgressUpdateDate":{"type":"string","format":"date-time","description":"The date and time progress on job processing was last updated."},"Status":{"type":"string","enum":["QUEUED","RUNNING","COMPLETED","CANCELLED","ERROR","FAILED"],"description":"The current processing status of the job."},"StatusMessage":{"type":"string","description":"A human-readable message describing the current job status."},"RecordsProcessed":{"type":"integer","description":"The number of records processed up to the last progress update."},"PercentageComplete":{"type":"integer","description":"The percentage of job processing that has been completed."},"Replayable":{"type":"boolean","description":"Indicates whether this job type supports replay."},"ResultUri":{"type":"string","description":"API resource path to download the result file once the job is complete."}}}}},"paths":{"/Mediapartners/{AccountSID}/Jobs/{JobId}":{"get":{"summary":"Retrieve Job Status","description":"Returns an object describing the status of the queried job.","operationId":"retrieveJobStatus","tags":["Jobs"],"parameters":[{"name":"AccountSID","in":"path","required":true,"schema":{"type":"string"},"description":"Unique identifier for the partner account."},{"name":"JobId","in":"path","required":true,"description":"The unique job identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Current job status and details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}}}}}}}
```

## Download Job Results

> Download the job result file if the job was completed successfully. \
> If the job isn't done, the job status will be returned. \
> A job result is available for download for 90 days.<br>

```json
{"openapi":"3.1.0","info":{"title":"Partner Jobs API","version":"16"},"tags":[{"name":"Jobs","description":"Endpoints for listing, retrieving, downloading, and replaying partner jobs."}],"servers":[{"url":"https://api.impact.com","description":"Production server"}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"Use your AccountSID as the username and AuthToken as the password."}},"schemas":{"Job":{"type":"object","properties":{"Id":{"type":"string","description":"The unique identifier for this job."},"Type":{"type":"string","enum":["DownloadReport","ApiReport","UploadAds","TermModification","ClickExport"],"description":"The type of job."},"ProgramId":{"type":"string","description":"The impact.com Program ID (CampaignId) this job was scheduled for."},"CreatedBy":{"type":"string","description":"The Account SID of the account that scheduled this job."},"CreatedDate":{"type":"string","format":"date-time","description":"The date and time the job was initially scheduled."},"StartedDate":{"type":"string","format":"date-time","description":"The date and time the job last started running."},"CompletedDate":{"type":"string","format":"date-time","description":"The date and time the job was last successfully completed."},"AbandonedDate":{"type":"string","format":"date-time","description":"Set when an attempt is made to start a job that is already running."},"CancelledDate":{"type":"string","format":"date-time","description":"The date and time the job was last canceled."},"FailedDate":{"type":"string","format":"date-time","description":"The date and time processing of this job last raised an error."},"LastProgressUpdateDate":{"type":"string","format":"date-time","description":"The date and time progress on job processing was last updated."},"Status":{"type":"string","enum":["QUEUED","RUNNING","COMPLETED","CANCELLED","ERROR","FAILED"],"description":"The current processing status of the job."},"StatusMessage":{"type":"string","description":"A human-readable message describing the current job status."},"RecordsProcessed":{"type":"integer","description":"The number of records processed up to the last progress update."},"PercentageComplete":{"type":"integer","description":"The percentage of job processing that has been completed."},"Replayable":{"type":"boolean","description":"Indicates whether this job type supports replay."},"ResultUri":{"type":"string","description":"API resource path to download the result file once the job is complete."}}}}},"paths":{"/Mediapartners/{AccountSID}/Jobs/{JobId}/Download":{"get":{"summary":"Download Job Results","description":"Download the job result file if the job was completed successfully. \nIf the job isn't done, the job status will be returned. \nA job result is available for download for 90 days.\n","operationId":"downloadJobResults","tags":["Jobs"],"parameters":[{"name":"AccountSID","in":"path","required":true,"schema":{"type":"string"},"description":"Unique identifier for the partner account."},{"name":"JobId","in":"path","required":true,"description":"The unique job identifier.","schema":{"type":"string"}},{"name":"Mode","in":"query","description":"If set to Stream, the file is streamed directly instead of using a signed URL redirect.","schema":{"type":"string","enum":["Stream"]}}],"responses":{"200":{"description":"Returns the job result file.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"202":{"description":"Job is not yet complete. Returns the current job status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"302":{"description":"Redirects to a temporary signed URL for file download."}}}}}}
```

## Replay Job

> Replay a completed job. Replays are intended for jobs with COMPLETED, FAILED, or CANCELLED status, \
> or if additional results are expected for the chosen export window.<br>

```json
{"openapi":"3.1.0","info":{"title":"Partner Jobs API","version":"16"},"tags":[{"name":"Jobs","description":"Endpoints for listing, retrieving, downloading, and replaying partner jobs."}],"servers":[{"url":"https://api.impact.com","description":"Production server"}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"Use your AccountSID as the username and AuthToken as the password."}},"schemas":{"Job":{"type":"object","properties":{"Id":{"type":"string","description":"The unique identifier for this job."},"Type":{"type":"string","enum":["DownloadReport","ApiReport","UploadAds","TermModification","ClickExport"],"description":"The type of job."},"ProgramId":{"type":"string","description":"The impact.com Program ID (CampaignId) this job was scheduled for."},"CreatedBy":{"type":"string","description":"The Account SID of the account that scheduled this job."},"CreatedDate":{"type":"string","format":"date-time","description":"The date and time the job was initially scheduled."},"StartedDate":{"type":"string","format":"date-time","description":"The date and time the job last started running."},"CompletedDate":{"type":"string","format":"date-time","description":"The date and time the job was last successfully completed."},"AbandonedDate":{"type":"string","format":"date-time","description":"Set when an attempt is made to start a job that is already running."},"CancelledDate":{"type":"string","format":"date-time","description":"The date and time the job was last canceled."},"FailedDate":{"type":"string","format":"date-time","description":"The date and time processing of this job last raised an error."},"LastProgressUpdateDate":{"type":"string","format":"date-time","description":"The date and time progress on job processing was last updated."},"Status":{"type":"string","enum":["QUEUED","RUNNING","COMPLETED","CANCELLED","ERROR","FAILED"],"description":"The current processing status of the job."},"StatusMessage":{"type":"string","description":"A human-readable message describing the current job status."},"RecordsProcessed":{"type":"integer","description":"The number of records processed up to the last progress update."},"PercentageComplete":{"type":"integer","description":"The percentage of job processing that has been completed."},"Replayable":{"type":"boolean","description":"Indicates whether this job type supports replay."},"ResultUri":{"type":"string","description":"API resource path to download the result file once the job is complete."}}}}},"paths":{"/Mediapartners/{AccountSID}/Jobs/{JobId}/Replay":{"put":{"summary":"Replay Job","description":"Replay a completed job. Replays are intended for jobs with COMPLETED, FAILED, or CANCELLED status, \nor if additional results are expected for the chosen export window.\n","operationId":"replayJob","tags":["Jobs"],"parameters":[{"name":"AccountSID","in":"path","required":true,"schema":{"type":"string"},"description":"Unique identifier for the partner account."},{"name":"JobId","in":"path","required":true,"description":"The unique job identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Job successfully queued for replay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"403":{"description":"The job is not in a replayable state or is not of a replayable type."}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://integrations.impact.com/partner-api-reference/reference/jobs-management/jobs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
