Create a Job

You can invoke the jobs service on any of the resources below that support jobs.

post
Create a Job

https://api.moltin.com/v2/jobs
Request
Response
Headers
Authorization
required
string
The Bearer token to access the API.
Body Parameters
filter
required
string
This is the same filter you would use when getting all orders.
job_type
required
string
The type of task you want to run, e.g. order_export
type
optional
string
Must be set to job
201: Created
{
"data": {
"type": "job",
"id": "v4154f5b-df0c-4781-be28-c2d5669b29f9",
"job_type": "order_export",
"link": {
"href": ""
},
"links": {
"self": "http://exporter.dev.molt.in/v2/jobs/v4154f5b-df0c-4781-be28-c2d5669b29f9"
},
"status": "pending",
"timestamps": {
"created_at": "2018-08-20T15:01:13.0194505Z",
"updated_at": "0001-01-01T00:00:00Z"
}
}
}
cURL
curl -X POST https://api.moltin.com/v2/jobs \
-H "Authorization: Bearer XXXX"
-d $'{
"data": {
"filter": "gt(created_at,2018-09-01):lt(created_at,2018-10-01):eq(payment,refunded)",
"job_type": "order_export"
}
}'