A job is an object used to perform long-running tasks. For example, closing 10k tickets, exporting 500k tickets, and more.
Jobs are processed asynchronously, meaning that once a job is created, it will run in background on Gorgias's servers. According to the type and size of the task, a job can take a few minutes or several hours to be executed. You can use our API to check the status of the job.
Jobs can be canceled at any time but be aware that if a job already started, changes done by this one won't be reverted. For example, if you created a job to close 10k tickets and you cancel it at some point, the already closed tickets won't be reopened.
Job properties
Job example object
{
"id": 1234,
"cancel_requested_datetime": "2019-11-23T16:31:00.966927",
"cancelled_datetime": "2019-11-23T16:32:00.966927",
"created_datetime": "2019-11-23T16:00:00.966927",
"ended_datetime": "2019-11-23T16:32:00.966927",
"failed_datetime": "2019-11-23T15:59:41.966927",
"info": {
"progress_count": 123
},
"locked_datetime": "2019-11-23T16:30:01.966927",
"meta": {
"description": "This job closes all tickets created in 2018"
},
"params": {
"ticket_ids": [
1,
2,
3
],
"updates": {
"status": "open"
}
},
"scheduled_datetime": "2019-11-23T16:30:00.966927",
"started_datetime": "2019-11-23T16:30:01.966927",
"status": "canceled",
"type": "updateTicket",
"user_id": 42,
"uri": "/api/jobs/1234/"
}