Jobs
Jobs have the following characteristics:
- Jobs are asynchronous.
- This process is repeated until all jobs are processed.
- Jobs have a different status, depending on where a job is in its lifecycle.
- Jobs are processed one at a time. You can continue to send requests using endpoints that function as jobs, but those jobs are queued. In other words, Commerce looks for any jobs that have a status of PENDING and starts the job with the earliest created date.
- Jobs include the data used when an endpoint is run.
- Jobs report messages and/or errors to help you understand the reasons for any failed jobs.
Job Lifecycle
A job can have the following status:
- PENDING - Commerce has received the request but is currently busy processing other requests.
- STARTED - Commerce has started processing the job.
- SUCCESS - The job has successfully completed.
- FAILED - The job has failed.
📄️ Get All Jobs
You can use this endpoint to display the status of your jobs.
📄️ Create Job
Create a Job to export orders to a CSV file. Jobs automatically expire one week after creation. You must fetch the exported data before the jobs expire.
📄️ Get a Job
Retrieves the specified job.
📄️ Get a Job File
Retrieves a link to the CSV file that contains your exported order.