Support for

FLAPI: Production Runs

Alistair Wilson
by Alistair Wilson 13 months ago
 

Quick Reference

Available to: FLAPI, M-FLAPI
Runs
GET /runs
GET /runs/<run.id>
PUT /runs/<order>
POST /runs/<run.id>/accept
Jobs on Runs
GET /runs/<run.code>/jobs
GET /runs/<run.code>/jobs/<job.code>/jobmaker
POST /runs/<run.code>/jobs/<job.code>/deallocate

Run Structure

Runs are containers for jobs.

Each run is a production or processing batch, invoicing is triggered by the completion of a run.

  • run
    • (allocated) jobs

List all runs

GET Syntax
/runs

Retrieves all run items matching criteria.

To find all Runs Awaiting Production, add parameters to show runs with the waiting state belonging to the production workgroup your interested in.

HTTP request
GET http://dev.flyerlink.com/api.php/runs?format=json
Parameter Description
format json or xml
state One of: waiting, production, completed. (required)
days Where present, filters the list to include only runs having jobs due within that number of days (optional).
prod_workgrp Filter, identifying production workgroups to include (comma-separated string, optional).
e.g. SUP1,SUP2,SUP3
Default: all workgroups.
HTTP response (JSON)
{
    "runs" : [{
            "id" : "567251",
            "created_date" : "2013-06-13",
            "name" : "Automatic allocation",
            "runtype" : "OSUP1001",
            "description" : "Production Method 001",
            "finished_date" : null,
            "workgroup" : "SUP1"
        },
        …
        {
            "id" : "566428",
            "created_date" : "2013-06-05",
            "name" : "Automatic allocation",
            "runtype" : "OSUP2001",
            "description" : "Production Method 001",
            "finished_date" : "2013-06-25",
            "workgroup" : "SUP2"
        }
    ]
}
Response Item Description
runs Containeritem for run items.
  run Container item for each run.
    id Unique identifier for the run.
    created_date Timestamp for run creation.
    name The run's name (text)
    description The run's description (text)
    finished_date When the run is completed, format: yyyy-mm-dd. Otherwise null.
    runtype Identifies the runtype.code.
    workgroup The workgroup that produces the run type.

Request 'run' by code

GET Syntax
/runs/<run.code>

Retrieves a single run item. You must have permission to view this run.

HTTP request
GET http://dev.flyerlink.com/api.php/runs/449445?format=json
Parameter Description
format json or xml
HTTP response (JSON)
{
    "run" : {
        "id" : "449445",
        "created_date" : "2008-05-22",
        "name" : "",
        "runtype" : "OSUP2001",
        "description" : "LX 150gsm Gloss 4x0 (L\/S40)",
        "finished_date" : "2008-05-23"
        "workgroup" : "SUP2"
    } 
}
Response Item Description
run Container item for each run.
  id Unique identifier for the run.
  created_date Timestamp for run creation.
  name The run's name (text)
  description The run's description (text)
  finished_date When the run is completed, format: yyyy-mm-dd. Otherwise null.

Accept a Run

POST Syntax
/runs/<run.code>/accept

Accepts a run. Allows you to start processing its jobs.

HTTP request
POST http://dev.flyerlink.com/api.php/runs/1234567/accept
format=xml

List jobs allocated to a run

GET Syntax
/runs/<order.code>

Retrieves a list of the jobs allocated to a run. You must have permission to view this run.

HTTP request
GET http://dev.flyerlink.com/api.php/runs/449445/jobs?format=json
Parameter Description
format json or xml
HTTP response (JSON)
{
    "jobs" : [{
            "id" : "832945",
            "status" : "081",
            "customer" : "FIFANDS",
            "contact" : "440519",
            "quantity_allocated" : "1000",
            "quantity_printed" : "1000",
            "quantity_despatched" : "1000",
            "total_transfer" : "82.32",
            "total_selling" : "181.00",
            "total" : "181.00",
            "product_code" : "LEGA40T",
            "title" : "MADE-IT-UP LEAFLETS",
            "category" : "625",
            "quantity" : "1000",
            "auto081" : false,
            "service" : "N",
            "status_text" : "PDF'd and sent",
            "reseller_workgroup" : "P336",
            "reseller_details" : {
                "code" : "WXGIN",
                "name" : "Branding by Djinn",
                "addr1" : "Branding by Djinn Ltd",
                "addr2" : "15 Percival Gate",
                "addr3" : "",
                "addr4" : "Sheffield",
                "addr5" : "",
                "addr6" : "United Kingdom",
                "postcode" : "S2 8QX",
                "countrycode" : "GB",
                "main_contact_firstname" : "David",
                "main_contact_surname" : "Rover",
                "main_contact_title" : null,
                "main_contact_email" : "david@brandingbydjinn.co.uk",
                "main_contact_telephone" : "0114 441 9112",
                "invoice_contact_firstname" : "David",
                "invoice_contact_surname" : "Rover",
                "invoice_contact_title" : null,
                "invoice_contact_email" : "david@brandingbydjinn.co.uk",
                "invoice_contact_telephone" : "0114 441 9112",
                "vat_number" : "1228963419"
            },
            "complete" : "yes",
            "multifile" : "yes",
            "expected_despatch_date" : "23\/05\/2008 at 00:55",
            "front_filename" : "832945_A01.PDF",
            "reverse_filename" : null,
            "pages" : 1,
            "despatches" : [{
                    "id" : "270607",
                    "quantity" : "1000",
                    "cartons" : "1",
                    "weight" : "10.0300",
                    "consignment" : "01149454",
                    "consignment_url" : "http:\/\/cgi.tnt.co.uk\/trackntrace\/conenquiry.asp?ACTION=TRACK&TYPE=C&QUERY=01149454",
                    "date" : "2008-05-23",
                    "time" : "00:55:57",
                    "line" : "1172890"
                }
            ],
            "addresses" : [{
                    "name" : "<name>",
                    "addr1" : "<address line 1>",
                    "addr2" : "<address line 2>",
                    "addr3" : "Hampton Vale",
                    "addr4" : "Peterborough",
                    "addr5" : "",
                    "addr6" : "United Kingdom",
                    "postcode" : "PE7 1AA",
                    "countrycode" : "GB",
                    "contact" : "steve ",
                    "telephone" : "01733 123456",
                    "line" : "1172890"
                }
            ],
            "revenue" : [{
                    "costing" : "ADF",
                    "quantity" : "1",
                    "units" : "1",
                    "unitcost" : "0.00",
                    "unitrev" : "50.00",
                    "cost" : "0.00",
                    "revenue" : "50.00",
                    "prcost" : "0.00",
                    "unitprcost" : "0.00",
                    "vat" : "0.00",
                    "vatcode" : "Z",
                    "vattotal" : "0.000",
                    "name" : "DESIGN \/ FINISHED ARTWORK",
                    "customname" : "",
                    "voucher" : "f",
                    "template" : "f"
                }, 
                ... <more items of type revenue> ...
            ],
            "notes" : {
                "brief" : null
            },
            "finishes" : [],
            "orientation" : {
                "front" : "Portrait",
                "back" : "Portrait"
            },
            "jobmaker_pack" : {
                "full_pack" : "http:\/\/dev.flyerlink.com\/api.php\/jobs\/449445\/jobmaker",
                "orderlist_csv" : "http:\/\/dev.flyerlink.com\/api.php\/jobs\/449445\/jobmaker?file=csv",
                "orderlist_xml" : "http:\/\/dev.flyerlink.com\/api.php\/jobs\/449445\/jobmaker?file=xml",
                "worksheet" : "http:\/\/dev.flyerlink.com\/api.php\/jobs\/449445\/jobmaker?file=sheet",
                "packing_slip_draft" : "http:\/\/dev.flyerlink.com\/api.php\/jobs\/449445\/jobmaker?file=slip"
            },
            "file_paths" : {
                "front" : ["WPR1\/Runs\/449\/449445\/832945_A01.PDF"],
                "reverse" : []
            }
        }, 
        ... <more items of type job> ...
        }
    ] 
}
Response Item Description
jobs Container
  job Container item. See Job Main Details for properties. Below are the additional properties available from /runs/...
    reseller_workgroup Workgroup code for the reseller.
    reseller_details Container for contact/company details.
    file_paths Available only to the supplier who owns the run type.
      front

Array of FTP path+filenames for graphic files (PDFs), relative to your home FTP folder. Access files at

http://<user>:<pass>@<www.example.com>/<file-path>
      reverse

Cancel or de-allocate a job in production

POST Syntax
/runs/<run.code>/jobs/<job.code>/deallocate

Or you can simply send the job without the run with this alias

POST Syntax
/jobs/<job.code>/deallocate

De-allocates a job and sends it back to the studio to make changes before they try to send to production again. Use this if there are issues with the job and changes are needed such as the file being not fit for production or the delivery address or job details are invalid. You must have permission to view this run.

HTTP request
POST http://dev.flyerlink.com/api.php/runs/449445/jobs/1234567/deallocate?format=json&costing=CAN&reason=the artwork supplied is not print ready
Parameter Description
format json or xml
costing use "CAN"
reason

An explanation about why the job is not fit for production and what needs to be changed so it can be produced

HTTP response (XML)
<?xml version="1.0" encoding="UTF-8"?>
<response status="ok" /

FLAPI: Production Runs

Quick Reference

Available to: FLAPI, M-FLAPI
Runs
GET /runs
GET /runs/<run.id>
PUT /runs/<order>
POST /runs/<run.id>/accept
Jobs on Runs
GET /runs/<run.code>/jobs
GET /runs/<run.code>/jobs/<job.code>/jobmaker
POST /runs/<run.code>/jobs/<job.code>/deallocate

Run Structure

Runs are containers for jobs.

Each run is a production or processing batch, invoicing is triggered by the completion of a run.

  • run
    • (allocated) jobs

List all runs

GET Syntax
/runs

Retrieves all run items matching criteria.

To find all Runs Awaiting Production, add parameters to show runs with the waiting state belonging to the production workgroup your interested in.

HTTP request
GET http://dev.flyerlink.com/api.php/runs?format=json
Parameter Description
format json or xml
state One of: waiting, production, completed. (required)
days Where present, filters the list to include only runs having jobs due within that number of days (optional).
prod_workgrp Filter, identifying production workgroups to include (comma-separated string, optional).
e.g. SUP1,SUP2,SUP3
Default: all workgroups.
HTTP response (JSON)
{
    "runs" : [{
            "id" : "567251",
            "created_date" : "2013-06-13",
            "name" : "Automatic allocation",
            "runtype" : "OSUP1001",
            "description" : "Production Method 001",
            "finished_date" : null,
            "workgroup" : "SUP1"
        },
        …
        {
            "id" : "566428",
            "created_date" : "2013-06-05",
            "name" : "Automatic allocation",
            "runtype" : "OSUP2001",
            "description" : "Production Method 001",
            "finished_date" : "2013-06-25",
            "workgroup" : "SUP2"
        }
    ]
}
Response Item Description
runs Containeritem for run items.
  run Container item for each run.
    id Unique identifier for the run.
    created_date Timestamp for run creation.
    name The run's name (text)
    description The run's description (text)
    finished_date When the run is completed, format: yyyy-mm-dd. Otherwise null.
    runtype Identifies the runtype.code.
    workgroup The workgroup that produces the run type.

Request 'run' by code

GET Syntax
/runs/<run.code>

Retrieves a single run item. You must have permission to view this run.

HTTP request
GET http://dev.flyerlink.com/api.php/runs/449445?format=json
Parameter Description
format json or xml
HTTP response (JSON)
{
    "run" : {
        "id" : "449445",
        "created_date" : "2008-05-22",
        "name" : "",
        "runtype" : "OSUP2001",
        "description" : "LX 150gsm Gloss 4x0 (L\/S40)",
        "finished_date" : "2008-05-23"
        "workgroup" : "SUP2"
    } 
}
Response Item Description
run Container item for each run.
  id Unique identifier for the run.
  created_date Timestamp for run creation.
  name The run's name (text)
  description The run's description (text)
  finished_date When the run is completed, format: yyyy-mm-dd. Otherwise null.

Accept a Run

POST Syntax
/runs/<run.code>/accept

Accepts a run. Allows you to start processing its jobs.

HTTP request
POST http://dev.flyerlink.com/api.php/runs/1234567/accept
format=xml

List jobs allocated to a run

GET Syntax
/runs/<order.code>

Retrieves a list of the jobs allocated to a run. You must have permission to view this run.

HTTP request
GET http://dev.flyerlink.com/api.php/runs/449445/jobs?format=json
Parameter Description
format json or xml
HTTP response (JSON)
{
    "jobs" : [{
            "id" : "832945",
            "status" : "081",
            "customer" : "FIFANDS",
            "contact" : "440519",
            "quantity_allocated" : "1000",
            "quantity_printed" : "1000",
            "quantity_despatched" : "1000",
            "total_transfer" : "82.32",
            "total_selling" : "181.00",
            "total" : "181.00",
            "product_code" : "LEGA40T",
            "title" : "MADE-IT-UP LEAFLETS",
            "category" : "625",
            "quantity" : "1000",
            "auto081" : false,
            "service" : "N",
            "status_text" : "PDF'd and sent",
            "reseller_workgroup" : "P336",
            "reseller_details" : {
                "code" : "WXGIN",
                "name" : "Branding by Djinn",
                "addr1" : "Branding by Djinn Ltd",
                "addr2" : "15 Percival Gate",
                "addr3" : "",
                "addr4" : "Sheffield",
                "addr5" : "",
                "addr6" : "United Kingdom",
                "postcode" : "S2 8QX",
                "countrycode" : "GB",
                "main_contact_firstname" : "David",
                "main_contact_surname" : "Rover",
                "main_contact_title" : null,
                "main_contact_email" : "david@brandingbydjinn.co.uk",
                "main_contact_telephone" : "0114 441 9112",
                "invoice_contact_firstname" : "David",
                "invoice_contact_surname" : "Rover",
                "invoice_contact_title" : null,
                "invoice_contact_email" : "david@brandingbydjinn.co.uk",
                "invoice_contact_telephone" : "0114 441 9112",
                "vat_number" : "1228963419"
            },
            "complete" : "yes",
            "multifile" : "yes",
            "expected_despatch_date" : "23\/05\/2008 at 00:55",
            "front_filename" : "832945_A01.PDF",
            "reverse_filename" : null,
            "pages" : 1,
            "despatches" : [{
                    "id" : "270607",
                    "quantity" : "1000",
                    "cartons" : "1",
                    "weight" : "10.0300",
                    "consignment" : "01149454",
                    "consignment_url" : "http:\/\/cgi.tnt.co.uk\/trackntrace\/conenquiry.asp?ACTION=TRACK&TYPE=C&QUERY=01149454",
                    "date" : "2008-05-23",
                    "time" : "00:55:57",
                    "line" : "1172890"
                }
            ],
            "addresses" : [{
                    "name" : "<name>",
                    "addr1" : "<address line 1>",
                    "addr2" : "<address line 2>",
                    "addr3" : "Hampton Vale",
                    "addr4" : "Peterborough",
                    "addr5" : "",
                    "addr6" : "United Kingdom",
                    "postcode" : "PE7 1AA",
                    "countrycode" : "GB",
                    "contact" : "steve ",
                    "telephone" : "01733 123456",
                    "line" : "1172890"
                }
            ],
            "revenue" : [{
                    "costing" : "ADF",
                    "quantity" : "1",
                    "units" : "1",
                    "unitcost" : "0.00",
                    "unitrev" : "50.00",
                    "cost" : "0.00",
                    "revenue" : "50.00",
                    "prcost" : "0.00",
                    "unitprcost" : "0.00",
                    "vat" : "0.00",
                    "vatcode" : "Z",
                    "vattotal" : "0.000",
                    "name" : "DESIGN \/ FINISHED ARTWORK",
                    "customname" : "",
                    "voucher" : "f",
                    "template" : "f"
                }, 
                ... <more items of type revenue> ...
            ],
            "notes" : {
                "brief" : null
            },
            "finishes" : [],
            "orientation" : {
                "front" : "Portrait",
                "back" : "Portrait"
            },
            "jobmaker_pack" : {
                "full_pack" : "http:\/\/dev.flyerlink.com\/api.php\/jobs\/449445\/jobmaker",
                "orderlist_csv" : "http:\/\/dev.flyerlink.com\/api.php\/jobs\/449445\/jobmaker?file=csv",
                "orderlist_xml" : "http:\/\/dev.flyerlink.com\/api.php\/jobs\/449445\/jobmaker?file=xml",
                "worksheet" : "http:\/\/dev.flyerlink.com\/api.php\/jobs\/449445\/jobmaker?file=sheet",
                "packing_slip_draft" : "http:\/\/dev.flyerlink.com\/api.php\/jobs\/449445\/jobmaker?file=slip"
            },
            "file_paths" : {
                "front" : ["WPR1\/Runs\/449\/449445\/832945_A01.PDF"],
                "reverse" : []
            }
        }, 
        ... <more items of type job> ...
        }
    ] 
}
Response Item Description
jobs Container
  job Container item. See Job Main Details for properties. Below are the additional properties available from /runs/...
    reseller_workgroup Workgroup code for the reseller.
    reseller_details Container for contact/company details.
    file_paths Available only to the supplier who owns the run type.
      front

Array of FTP path+filenames for graphic files (PDFs), relative to your home FTP folder. Access files at

http://<user>:<pass>@<www.example.com>/<file-path>
      reverse

Cancel or de-allocate a job in production

POST Syntax
/runs/<run.code>/jobs/<job.code>/deallocate

Or you can simply send the job without the run with this alias

POST Syntax
/jobs/<job.code>/deallocate

De-allocates a job and sends it back to the studio to make changes before they try to send to production again. Use this if there are issues with the job and changes are needed such as the file being not fit for production or the delivery address or job details are invalid. You must have permission to view this run.

HTTP request
POST http://dev.flyerlink.com/api.php/runs/449445/jobs/1234567/deallocate?format=json&costing=CAN&reason=the artwork supplied is not print ready
Parameter Description
format json or xml
costing use "CAN"
reason

An explanation about why the job is not fit for production and what needs to be changed so it can be produced

HTTP response (XML)
<?xml version="1.0" encoding="UTF-8"?>
<response status="ok" /
 
 

Jump to contents page of

Flyerlink API Guide

 
 
 

All content is (c) Nettl Systems Limited, 2024 and may not be used, copied or distributed without permission.