Product categories (read-only) | |
---|---|
GET | /product_categories/<prodcat> |
Product groups | |
GET | /product_groups/<prodgrp> |
POST | /product_groups/<prodgrp> |
Product specifications | |
GET | /products/<product> |
POST | /products |
Product pricing | |
GET | /products/<product>/prices |
POST | /products/<product>/prices |
To expose your products using FLAPI, do the following, in order:
Create a product group, if you have not already, using
POST /product_groups/
Create a product, using
POST /products/
Specify product pricing, using
POST /products/<product.id>/prices
Our API is not only suited to web-2-print, but also handles other goods or service workflows. You choose the workflow for a product by selecting a product type.
Product Type | file required | physical item | stock-managed | default weight |
---|---|---|---|---|
1: printed item | ✓ | ✓ | ✓ | |
2: stock-pick item | ✓ | ✓ | ✓ | |
3: service | ||||
4: electronic / file-only | ✓ |
Product Hierarchy
|
|||||
Products
|
Product categories (read-only) | |
---|---|
GET | /product_categories/<prodcat> |
Product groups | |
GET | /product_groups/<prodgrp> |
POST | /product_groups/<prodgrp> |
Product specifications | |
GET | /products/<product> |
POST | /products |
Product pricing | |
GET | /products/<product>/prices |
POST | /products/<product>/prices |
To expose your products using FLAPI, do the following, in order:
Create a product group, if you have not already, using
POST /product_groups/
Create a product, using
POST /products/
Specify product pricing, using
POST /products/<product.id>/prices
Our API is not only suited to web-2-print, but also handles other goods or service workflows. You choose the workflow for a product by selecting a product type.
Product Type | file required | physical item | stock-managed | default weight |
---|---|---|---|---|
1: printed item | ✓ | ✓ | ✓ | |
2: stock-pick item | ✓ | ✓ | ✓ | |
3: service | ||||
4: electronic / file-only | ✓ |
We have provided a number of product categories that should suit all likely web-2-print products. Please map your product groups to the product category that is the best fit.
If you cannot find a product category to suit, please request a new product category by contacting API Support.
/product_categories/<product_category.code>
Retrieves a product category.
Parameter | Description |
---|---|
format | json or xml |
GET http://dev.flyerlink.com/api.php/product_categories/BUSCARD?format=json
{ "product_category" : { "code" : "BUSCARD", "prodzone" : "BUSCARD", "name" : "Business Cards" } }
Response Item | Description | |
---|---|---|
product_category | Container item | |
code | Unique identifier for the product category. | |
name | The product category’s name, in the current language. | |
prodzone | The product zone that this product category belongs to. |
A product group may contain many products, and every product belongs to one product group.
We recommend that you group products by similar production or marketing details. For example, all products with a certain finishing type could belong to the same product group, regardless of their page_size, colour_type, or quantity.
/product_groups/<product_group.code>
Retrieves a product group.
Parameter | Description |
---|---|
format | json or xml |
GET http://dev.flyerlink.com/api.php/product_groups/BC?format=json
{ "product_group" : { "code" : "BC", "name" : "Regular Business Cards", "url_slug" : "regular-business-cards", "prodcat" : "BUSCARD" } }
Response Item | Description | |
---|---|---|
product_group | Container item | |
code | Unique identifier for the product category. | |
name | The product category’s name, in the current language. | |
url_slug | The url string (for your public websites) that displays the page for this product group. E.g. my.domain.com/url-slug | |
prodcat | The product category that this product group belongs to. |
/product_groups
Creates a new product group, ready for new products.
* = required parameter.
Parameter | Type | Description |
---|---|---|
format | string | json or xml |
name* | char(40) | Name for the new product group |
prodcat | char(8) | An existing product_category.code. |
workgrp | char(8) | The workgroup.code for the workgroup who makes the product: your own workgroup.code, or your supplier’s workgroup.code. |
description | memo | This is a concise product description. We suggest you follow the standard style of specification that printing.com products use. |
commonname | char(70) | The name that is common to the intended market rather than the (perhaps unknown) name that you give your product. |
restrictions | memo | Any limitations that customers should know about a product, such as how many fabrics an embroidered item of clothing can use. |
supplierofwg | char(8) | workgroup.id for the group of users a product can be supplied to. This is only used if the product group is being made by a OpenSource Supplier. Enter the code of the selling workgroup who that supplier belongs to. |
bulletpoint | char(60) | Short feature list for sales websites. |
meta_title | char(100) | SEO meta-data |
meta_description | char(128) | SEO meta-data |
preflight_type | char(2) | If users will use FileCheck for this product group, choose one of the published preflight profiles; see Enumerated types: Preflight Types. |
supplieready_preflight_type | char(2) | These additional preflight types perform conversions to the layout of the artwork, to conform to generic supplier specifications. See Enumerated types: Supplieready Preflight Types. |
opensource | Boolean | true for OpenSource; false for Marketplace. |
POST http://dev.flyerlink.com/api.php/product_groups/BC format=xml
<?xml version="1.0" encoding="UTF-8"?> <response status="ok"> <id>772</id> </response>
Response Item | Description | |
---|---|---|
response | Container item with status attribute. | |
id | Unique identifier for the product group. |
/products/
Retrieves all products, optionally filtered, limited to 300 items.
Parameter | Description |
---|---|
format | json or xml |
code | product.id filter. Use a URL-safe ? for (any number of characters) wildcards. Use this parameter as an alternative to /products/<product> |
name | product.name filter. Use a URL-safe ? for (any number of characters) wildcards. |
width | Filter for width and height. Specifying both will return products with the required width and height. To return both orientations, query twice, e.g. &width=297&height=210and merge with &width=210&height=297 |
height | |
quantity | When quantity used with code, the response includes the calculated pricing for the required quantity. |
language | When language is present, the response includes the notes item, which contains design and special memos. |
GET http://dev.flyerlink.com/api.php/products?format=json
/products/<product.code>
GET http://dev.flyerlink.com/api.php/products/MBG3L5T?format=json
{ "product" : { "id" : "MBG3L5T", "name" : "Premium Gloss Folded Leaflet :: 3 Panel Land A5", "filetype" : "PDF", "width" : "630.0000", "height" : "148.0000", "bleed" : "1.5000", "rununits" : "1", "reverse" : "4", "allowmulti" : "t", "partnercode" : null, "prices" : { "selling" : [223, 259, 281, 303, 317, 330, 343, 356, null, null], "transfer" : [ ... ] }, "variations" : [{ "code" : "A", "finishes" : [{ "code" : "FROLL3", "name" : "3 Panel Roll Fold" }, { "code" : "FZFOLD", "name" : "3 panel Z Fold" }, { "code" : "FMBCUSTM", "name" : "Custom Fold" }, { "code" : "NF", "name" : "Do Not Fold - supply flat" } ] } ] } }
Response Item | Description | |||||
---|---|---|---|---|---|---|
product | Container item, with status attribute. | |||||
id | Unique identifier for the product. | |||||
name | Brief one-line name that summarises and identifies the product uniquely. | |||||
filetype | Usually the file extension, e.g. "PDF". Leave blank for no file. | |||||
templatesizes_id | Determines the dimensions and page count of the product, as an alternative to width, height and bleed. | |||||
width |
width and height define the finished size of the product. The PDF page size is (width or height) + bleed * 2, and the bleed is internal to the document edge. |
|||||
height | ||||||
bleed | ||||||
rununits | Number of items (sheets) that form a quantity of 1. Most products will have a value of 1; use higher values if your product consists of many identical parts, e.g. a set of cards with parts having different content. | |||||
reverse | Number of inks printed on the reverse, e.g. 0, 1, or 4. | |||||
allowmulti | Allows multiple files to be submitted, one per page, e.g. two PDF files for a two-sided business card. | |||||
partnercode | If your product has a code in another system, you can log it here. | |||||
prices | Prices for each revenue stream. | |||||
selling |
Each is an array of floats, corresponding to [1..10] batches, and the price of each batch thereafter, up to product.maxbatches.
|
|||||
transfer | ||||||
production | ||||||
variations | Container for variation items (where present). | |||||
variation | Container: a variation item. | |||||
code | A variation group (not a foreign key; has scope only within this product). When creating or changing a job that uses this product, then for that job, you need to choose one finish from each variation group. | |||||
finishes | Container for finish items. | |||||
finish | Container: a finish item. | |||||
code | finish.code | |||||
name | finish.name; a short, one-line description. |
When quantity is used with code, the response includes the quantities item, containing calculated pricing for the required quantity.
Note that quantity should be a multiple of units, up to the limit of (maxbatch * units); see POST /products/.
GET http://dev.flyerlink.com/api.php/products/FZMBGA4V?quantity=1000&format=json
{ "product" : { "id" : "FZMBGA4V", ... "prices" : { ... }, "variations" : [{ ... }], "quantities" : [{ "quantity" : 1000, "batches" : 2, "selling_price" : 84, "transfer_price" : 40.2 } ] } }
Response Item | Description | ||
---|---|---|---|
quantities | Container item, for quantity items. | ||
quantity | = product.units * quantities.batches | ||
batches | Number of batches required for exactly this quantity. | ||
selling_price | Price for each revenue stream: float value. The selling_price is what is charged to the end-user; transfer_price is what the reseller is charged. | ||
transfer_price |
When language is used with code, the response includes the notes item.
GET http://dev.flyerlink.com/api.php/products/CSBUS41?language=en_GB&format=json
{ "product" : { "id" : "CSBUS41", ... "prices" : { ... }, "variations" : [{ ... }], "notes" : { "design" : "...", "special" : "..." } } }
Response Item | Description | ||
---|---|---|---|
notes | Container item. | ||
design | Provides hints to designers about the design of this product. | ||
special | Provide information about the intended purpose of the product, or instructions about how it should be sold. |
Creates a new product.
Name, description, notes (etc) will be added only in your own language.
* indicates required.
/products/<product.code>
POST http://dev.flyerlink.com/api.php/products/MBG3L5T name=API%20Product%20Example&description=Product%20Description¬es=Design%20Notes&special=Special%20Instructions&producttype_id=1&websitecolour=5&mindays=0&days=4&maxdays=99&backstopdays=4&units=1000&maxbatch=0&rev=1&defunct=0&nocarecall=0&editrev=0&pageno=19&prodgr=00&gdelivery=t&partnercode=555&height=50&width=70&format=json
Parameter | Description |
---|---|
format | json or xml |
Ownership and Publication | |
partnercode | Your assigned partner code. |
defunct | Set 1 (true) to make the product unavailable; 0 (false) to make it live. |
Descriptive | |
name | product.name. Should be unique in your product list. |
description | Product description. Concisely describes the specification on websites. We suggest you adopt the style of printing.com’s product descriptions. |
notes | Design notes. |
special | Special instructions – help for those in a Studio. |
Physical Attributes | |
templatesizes_id | If supplied, this determines the dimensions of the product, otherwise you must supply the width, height, bleed, units, and rev. |
width | The finished size of the product. Correct assignment of width and height will ensure the required orientation, e.g. for landscape, &width=297&height=210, and for portrait, &width=210&height=297. |
height | |
bleed | |
websitecolour | Specifies the printing, and its visual indication on websites. See Enumerated types. |
units |
units = the quantity of 1 batch. maxbatch is a limit on the maximum number of batches (and therefore quantity) that may be ordered in a single job. |
maxbatch | |
prodgr | product group code. |
producttype_id |
1: printed item; See product types. |
Production Schedule | |
gdelivery | Set 1 (true) to make the product a ‘guaranteed fixed turnaround’; 0 (false) to use mindays and maxdays. |
custom_service_levels |
If gdelivery=0, then days is the lower limit; backstopdays is the upper limit, defining a range of days that the producer needs to make the product, e.g. "5 to 7" days. If the product was created with custom_service_levels=1, then mindays is the minimum you allow and maxdays is the maximum you allow. |
days | |
backstopdays | |
mindays | |
maxdays | |
Flyerlink CRM | |
nocarecall | When 1 (true), the workgroup will not receive reminders to seek customer feedback/care call. |
Localization | |
language | (TBC) |
/products/<product.id>/prices
Retrieves pricing for the requested product. All available service levels are returned, though usually only one will be present.
selling = price that a workgroup sells at.
transfer = price that a workgroup buys at.
production = cost that a workgroup incurs from third party suppliers (Marketplace, or workgroup suppliers).
GET http://dev.flyerlink.com/api.php/products/MBG3L5T?/prices?format=json
{ "services" : [{ "adddays" : "2", "batches" : [{ "selling" : 64, "transfer" : <float>, "production" : 0, "_attrs" : { "batch" : 1 } } ... <other 'batch' items> ... }, { "selling" : 164, "transfer" : <float>, "production" : 0, "_attrs" : { "batch" : 10 } }, { "selling" : 7, "transfer" : <float>, "production" : 0, "_attrs" : { "batch" : "runon" } } ] } ] }
/products/<product.id>/prices/
Sets pricing for the requested product.
Important: Each price has three aspects, and all possible combinations of [turnaround], [batches], [transaction type] for the product must be set in one request. The pricing for a product is wiped immediately before your new data is entered, so any omitted combinations will be erased.
Be sure to include data for your product’s ‘base turnaround’ where turnaround = product.days. This is the only turnaround that you must specify; pricing for other turnaround values (within your allowed range) is optional.
The format of each entry is:
prices[turnaround][batches][type]=value.
All three must be included in a request.
Below is the simplest example, for a turnaround of 2 production days, and only 1 batch. Note: we've put line-feeds before each & for legibility.
POST http://dev.flyerlink.com/api.php/products/MBG3L5T/prices territory=TEMP &prices[2][1][selling]=50 &prices[2][1][transfer]=40 &prices[2][1][production]=0 &format=json
Jump to contents page of
|