Support for

FLAPI: Orders

Alistair Wilson
by Alistair Wilson 7 years ago
 

Quick Reference

Available to: FLAPI, M-FLAPI
Orders
GET /orders/<order>
PUT /orders/<order>
GET /orders
POST /orders
Jobs on Orders
GET /orders/<order>/jobs
Packages
POST /orders/<order>/addpackage

Job Structure

  • workgroup
    • customer categories
      • customer
        • order
          • package
          • jobs

Request 'order' list

GET Syntax
/orders/?workgroup=W11&from=2011-04-01&to=2011-05-01

Retrieves a list of orders by date range and workgroup. You must have permission to view the workgroup to see their orders.

HTTP request
GET http://dev.flyerlink.com/api.php/orders/?workgroup=W11&from=2011-04-01&to=2011-05-01
Parameter Description
workgroup Your workgroup or studio code
from Date from formated yyyy-mm-dd
to Date to formated yyyy-mm-dd
format json or xml
HTTP response (JSON)
{
    "order" : {
        "id" : "XYTVP",
        "contact" : "653569",
        "customer" : "LIANFI22",
        "title" : "Ordered online",
        "reference" : "Reference",
        "date":"26\/04\/2011",
        "totals":[{
                "total" : "144",
                "balance" : "0"
            }
        "jobs" : [{
                "id" : "1648885",
                "title" : "Initial Flyers",
                "reference" : "Reference",
                "product" : "LEGA54V",
                "totals":[{
                    "transfer" : "55.50",
                    "selling" : "144",
                    "total" : "144"
                    "currency" : "GBP"
                }
                "complete" : "yes",
                "status" : "081",                
            }
        ]
    }
}
Response Item Description
order Container
  id Unique identifier for the order.
  contact id of the contact (belonging to a customer) who ordered.
  customer id of the customer who ordered.
  title A given title, to help people identify the order.
  reference Customer’s reference for the order, e.g. a purchase order number.
  date Date order was placed
  package If present, details the package attached to the order. Has a single value or null..
  jobs Container item for job items.
    job Container item for each job.
      id unique identifier for the job.
      product product.code for the job.
      title A given title, to help people identify the job.
      reference Customer’s reference for the job, e.g. a purchase job number.

Request 'order' by code

GET Syntax
/orders/<order.code>

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

HTTP request
GET http://dev.flyerlink.com/api.php/orders/XYYVP?format=json
Parameter Description
format json or xml
HTTP response (JSON)
{
    "order" : {
        "id" : "XYTVP",
        "contact" : "653569",
        "customer" : "LIANFI22",
        "title" : "Ordered online",
        "reference" : "Reference",
        "date":"26\/04\/2011",
        "totals":[{
                "total" : "144",
                "balance" : "0"
            }
        "jobs" : [{
                "id" : "1648885",
                "title" : "Initial Flyers",
                "reference" : "Reference",
                "product" : "LEGA54V",
                "totals":[{
                    "transfer" : "55.50",
                    "selling" : "144",
                    "total" : "144"
                    "currency" : "GBP"
                }
                "complete" : "yes",
                "status" : "081",                
            }
        ]
    }
}
Response Item Description
order Container
  id Unique identifier for the order.
  contact id of the contact (belonging to a customer) who ordered.
  customer id of the customer who ordered.
  title A given title, to help people identify the order.
  reference Customer’s reference for the order, e.g. a purchase order number.
  package If present, details the package attached to the order. Has a single value or null..
  jobs Container item for job items.
    job Container item for each job.
      id unique identifier for the job.
      product product.code for the job.

Change the requested order

PUT Syntax
/orders/<order.code>

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

HTTP request
PUT http://dev.flyerlink.com/api.php/orders/XYYVP?format=json&reference=201502-Black3
Parameter Description
format json or xml
reference Customer's reference for the order; text.

List jobs in an order

GET Syntax
/orders/<order.code>/jobs

Lists the jobs in the requested order item; a minimal version of
GET /orders/<order.code>.

HTTP request
GET http://dev.flyerlink.com/api.php/orders/XYYVP/jobs?format=json
Parameter Description
format json or xml
HTTP response (JSON)
{
    "jobs" : [{
            "code" : "1648885",
        }
    ]
}
Response Item Description
jobs Container
  job Container item.
    code job.id

Create an order

POST Syntax
/orders

Creates an order.

HTTP request
POST http://dev.flyerlink.com/api.php/orders
format=xml&title=order&customer=HOTEST&contact=13057&reference=#123
Parameter Description
format json or xml
title Order title, name or description
customer your customer code
contact must be a contact of your customer
reference a purchase order or note
HTTP response (XML)
<response status="ok">
  <id>DVQLK</id>
</response>

See also:

Create a job with an existing order id.

HTTP request
POST http://dev.flyerlink.com/api.php/jobs
order=XYTPP&format=xml

FLAPI: Orders

Quick Reference

Available to: FLAPI, M-FLAPI
Orders
GET /orders/<order>
PUT /orders/<order>
GET /orders
POST /orders
Jobs on Orders
GET /orders/<order>/jobs
Packages
POST /orders/<order>/addpackage

Job Structure

  • workgroup
    • customer categories
      • customer
        • order
          • package
          • jobs

Request 'order' list

GET Syntax
/orders/?workgroup=W11&from=2011-04-01&to=2011-05-01

Retrieves a list of orders by date range and workgroup. You must have permission to view the workgroup to see their orders.

HTTP request
GET http://dev.flyerlink.com/api.php/orders/?workgroup=W11&from=2011-04-01&to=2011-05-01
Parameter Description
workgroup Your workgroup or studio code
from Date from formated yyyy-mm-dd
to Date to formated yyyy-mm-dd
format json or xml
HTTP response (JSON)
{
    "order" : {
        "id" : "XYTVP",
        "contact" : "653569",
        "customer" : "LIANFI22",
        "title" : "Ordered online",
        "reference" : "Reference",
        "date":"26\/04\/2011",
        "totals":[{
                "total" : "144",
                "balance" : "0"
            }
        "jobs" : [{
                "id" : "1648885",
                "title" : "Initial Flyers",
                "reference" : "Reference",
                "product" : "LEGA54V",
                "totals":[{
                    "transfer" : "55.50",
                    "selling" : "144",
                    "total" : "144"
                    "currency" : "GBP"
                }
                "complete" : "yes",
                "status" : "081",                
            }
        ]
    }
}
Response Item Description
order Container
  id Unique identifier for the order.
  contact id of the contact (belonging to a customer) who ordered.
  customer id of the customer who ordered.
  title A given title, to help people identify the order.
  reference Customer’s reference for the order, e.g. a purchase order number.
  date Date order was placed
  package If present, details the package attached to the order. Has a single value or null..
  jobs Container item for job items.
    job Container item for each job.
      id unique identifier for the job.
      product product.code for the job.
      title A given title, to help people identify the job.
      reference Customer’s reference for the job, e.g. a purchase job number.

Request 'order' by code

GET Syntax
/orders/<order.code>

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

HTTP request
GET http://dev.flyerlink.com/api.php/orders/XYYVP?format=json
Parameter Description
format json or xml
HTTP response (JSON)
{
    "order" : {
        "id" : "XYTVP",
        "contact" : "653569",
        "customer" : "LIANFI22",
        "title" : "Ordered online",
        "reference" : "Reference",
        "date":"26\/04\/2011",
        "totals":[{
                "total" : "144",
                "balance" : "0"
            }
        "jobs" : [{
                "id" : "1648885",
                "title" : "Initial Flyers",
                "reference" : "Reference",
                "product" : "LEGA54V",
                "totals":[{
                    "transfer" : "55.50",
                    "selling" : "144",
                    "total" : "144"
                    "currency" : "GBP"
                }
                "complete" : "yes",
                "status" : "081",                
            }
        ]
    }
}
Response Item Description
order Container
  id Unique identifier for the order.
  contact id of the contact (belonging to a customer) who ordered.
  customer id of the customer who ordered.
  title A given title, to help people identify the order.
  reference Customer’s reference for the order, e.g. a purchase order number.
  package If present, details the package attached to the order. Has a single value or null..
  jobs Container item for job items.
    job Container item for each job.
      id unique identifier for the job.
      product product.code for the job.

Change the requested order

PUT Syntax
/orders/<order.code>

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

HTTP request
PUT http://dev.flyerlink.com/api.php/orders/XYYVP?format=json&reference=201502-Black3
Parameter Description
format json or xml
reference Customer's reference for the order; text.

List jobs in an order

GET Syntax
/orders/<order.code>/jobs

Lists the jobs in the requested order item; a minimal version of
GET /orders/<order.code>.

HTTP request
GET http://dev.flyerlink.com/api.php/orders/XYYVP/jobs?format=json
Parameter Description
format json or xml
HTTP response (JSON)
{
    "jobs" : [{
            "code" : "1648885",
        }
    ]
}
Response Item Description
jobs Container
  job Container item.
    code job.id

Create an order

POST Syntax
/orders

Creates an order.

HTTP request
POST http://dev.flyerlink.com/api.php/orders
format=xml&title=order&customer=HOTEST&contact=13057&reference=#123
Parameter Description
format json or xml
title Order title, name or description
customer your customer code
contact must be a contact of your customer
reference a purchase order or note
HTTP response (XML)
<response status="ok">
  <id>DVQLK</id>
</response>

See also:

Create a job with an existing order id.

HTTP request
POST http://dev.flyerlink.com/api.php/jobs
order=XYTPP&format=xml
 
 

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.