Create a Job

Currently, you can invoke the jobs service to export orders

Create a Job

POST https://api.moltin.com/v2/jobs

Headers

NameTypeDescription

Authorization

string

The Bearer token to access the API.

Request Body

NameTypeDescription

filter

string

This is the same filter you would use when getting all orders.

job_type

string

The type of task you want to run, e.g. order_export

type

string

Must be set to job

{
    "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 -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"
       }
     }'

Last updated