Lulu

App · 14 actions

Quote, validate and track books printed through Lulu.

Actions

ActionWhat it does
Calculate cover dimensionsCalculate cover dimensions.
Calculate print job costCreate a Print-Job cost calculation.
Cancel print jobCancel a print job before it enters production.
Create print jobCreate a new Print-Job.
Get cover validationRetrieve a single cover validation record.
Get interior validationRetrieve a single file validation record.
Get print jobRetrieve a single Print-Job.
Get print job costsRetrieve Print-Job Costs.
Get print job statisticsRetrieve the number of Print-Jobs in each status.
Get print job statusRetrieve Print-Job Status.
List print jobsRetrieve a list of Print-Jobs.
List shipping optionsRetrieve List of Shipping Options.
Validate cover PDFValidate cover file.
Validate interior PDFValidate interior file.

Calculate cover dimensions

Calculate cover dimensions.

Inputs

Pod package IDpod_package_idtextRequired
POD Package ID of the book.
Interior page countinterior_page_countnumberRequired
Interior page count.
Unitunittext
Requested unit of cover dimensions. Defaults to print points.One of: pt, mm, inch.

Outputs

dataobject
The response from Lulu.
Example output
{
  "data": {
    "height": "example",
    "unit": "pt",
    "width": "example"
  }
}

Calculate print job cost

Create a Print-Job cost calculation.

Inputs

Line itemsline_itemslistRequired
The line items that should be calculated
CitycitytextRequired
City.
Country codecountry_codetextRequired
[ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country code
Emailemailtext
Email.
Is businessis_businesstrue/false
Only relevant for US addresses. Some US carriers don't deliver to business-addresses on Saturday.Default: false.
Namenametext
Full name of the person, including first and last name.
Organizationorganizationtext
Name of an organization. Required if no person name is given.
Phone numberphone_numbertextRequired
Validation Regex Pattern: `^\+?[\d\s\-.\/()]{8,20}$`
PostcodepostcodetextRequired
Required for most countries
State codestate_codetext
2 or 3 letter state codes (officially called [ISO-3166-2 subdivision codes](https://en.wikipedia.org/wiki/ISO_3166-2)). They are required for some countries (e.g. US, MX, CA, AU)
Street1street1textRequired
First address line
Street2street2text
Second address line
Titletitletext
Title.One of: MR, MISS, MRS, MS, DR.
Shipping optionshipping_optiontextRequired
The shipping option levelOne of: MAIL, PRIORITY_MAIL (Priority mail), GROUND_HD (Ground hd), GROUND_BUS (Ground bus), GROUND, EXPEDITED, EXPRESS.

Outputs

dataobject
The response from Lulu.
Example output
{
  "data": {
    "currency": "example",
    "fees": [],
    "fulfillment_cost": {
      "tax_rate": "example",
      "total_cost_excl_tax": "example",
      "total_cost_incl_tax": "example",
      "total_tax": "example"
    },
    "line_item_costs": [],
    "shipping_address": {
      "city": "example",
      "country_code": "example",
      "email": "example",
      "is_business": false,
      "name": "example",
      "organization": "example",
      "phone_number": "example",
      "postcode": "example",
      "state_code": "example",
      "street1": "example",
      "street2": "example",
      "suggested_address": {
        "city": "example",
        "country_code": "example",
        "postcode": "example",
        "state_code": "example",
        "street1": "example",
        "street2": "example"
      },
      "title": "MR",
      "warnings": []
    },
    "shipping_cost": {
      "tax_rate": "example",
      "total_cost_excl_tax": "example",
      "total_cost_incl_tax": "example",
      "total_tax": "example"
    },
    "total_cost_excl_tax": "example",
    "total_cost_incl_tax": "example",
    "total_discount_amount": "example",
    "total_tax": "example"
  }
}

Cancel print job

Cancel a print job before it enters production.

Inputs

IdidtextRequired
Id of the resource

Outputs

dataobject
The response from Lulu.
Example output
{
  "data": {
    "changed": "example",
    "message": "example",
    "name": "CREATED"
  }
}

Create print job

Create a new Print-Job.

Inputs

Contact emailcontact_emailtextRequired
Email address that should be contacted if questions regarding the Print-Job arise. Lulu recommends to use the email of a person who is responsible for placing the Print-Job like a developer or business owner.
External IDexternal_idtext
Arbitrary string to identify and connect a print job to your systems. Set it to an order number, a purchase order or whatever else works for your particular use case.
Line itemsline_itemslistRequired
The line items of a Print-Job, defining it's Printables and their quantities. The property name 'items' can be used instead.
Production delayproduction_delaynumber
Delay before a newly created Print-Job is sent to production. Minimum is 60 minutes, maximum is 2880 minutes (=48 hours). As most cancellation requests occur right after an order has been placed, it makes sense to wait for some time before sending an order to production. Once production has started, orders cannot be canceled anymore.From 60 to 2880. Default: 60.
CitycitytextRequired
City.
Country codecountry_codetextRequired
[ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country code
EmailemailtextRequired
Shipping carriers require an email address for notifications or handling delivery issues. If no email is given, the default email in the user profile will be used.
Is businessis_businesstrue/false
Only relevant for US addresses. Some US carriers don't deliver to business-addresses on Saturday.Default: false.
NamenametextRequired
Full name of the person, including first and last name.
Organizationorganizationtext
Name of an organization. Required if no person name is given.
Phone numberphone_numbertextRequired
Shipping carriers require a phone number for handling delivery issues. If no phone number is given, the default in the API user profile will be used. Validation Regex Pattern for phone numbers `^\+?[\d\s\-.\/()]{8,20}$`
PostcodepostcodetextRequired
Required for most countries
State codestate_codetext
2 or 3 letter state codes (officially called [ISO-3166-2 subdivision codes](https://en.wikipedia.org/wiki/ISO_3166-2)). They are required for some countries (e.g. US, MX, CA, AU)
Street1street1textRequired
First address line
Street2street2text
Second address line
Titletitletext
Title.One of: MR, MISS, MRS, MS, DR.
Recipient tax IDrecipient_tax_idtext
The recipient’s tax identification number. Required for shipping addresses to Brazil, Chile, and Mexico.
Shipping levelshipping_leveltextRequired
The shipping level that this Print-Job is shipped withOne of: MAIL, PRIORITY_MAIL (Priority mail), GROUND_HD (Ground hd), GROUND_BUS (Ground bus), GROUND, EXPEDITED, EXPRESS.

Outputs

dataobject
The response from Lulu.
Example output
{
  "data": {
    "contact_email": "example",
    "costs": {
      "line_item_costs": {
        "cost_excl_discounts": "example",
        "discounts": [],
        "quantity": 1.0,
        "tax_rate": "example",
        "total_cost_excl_discounts": "example",
        "total_cost_excl_tax": "example",
        "total_cost_incl_tax": "example",
        "total_tax": "example",
        "unit_tier_cost": "example"
      },
      "shipping_cost": {
        "tax_rate": "example",
        "total_cost_excl_tax": "example",
        "total_cost_incl_tax": "example",
        "total_tax": "example"
      },
      "total_cost_excl_tax": "example",
      "total_cost_incl_tax": "example",
      "total_tax": "example"
    },
    "estimated_shipping_dates": {
      "arrival_max": "example",
      "arrival_min": "example",
      "dispatch_max": "example",
      "dispatch_min": "example"
    },
    "external_id": "example",
    "id": 1.0,
    "line_items": [],
    "order_id": "example",
    "production_delay": 1,
    "production_due_time": "example",
    "shipping_address": {
      "city": "example",
      "country_code": "example",
      "email": "example",
      "is_business": false,
      "name": "example",
      "organization": "example",
      "phone_number": "example",
      "postcode": "example",
      "state_code": "example",
      "street1": "example",
      "street2": "example",
      "suggested_address": {
        "city": "example",
        "country_code": "example",
        "postcode": "example",
        "state_code": "example",
        "street1": "example",
        "street2": "example"
      },
      "title": "MR",
      "warnings": []
    },
    "shipping_level": "MAIL",
    "tax_country": "example"
  }
}

Get cover validation

Retrieve a single cover validation record.

Inputs

IdidnumberRequired
Id of the resource

Outputs

dataobject
The response from Lulu.
Example output
{
  "data": {
    "errors": [],
    "id": 1,
    "source_url": "example",
    "status": "NORMALIZING"
  }
}

Get interior validation

Retrieve a single file validation record.

Inputs

IdidnumberRequired
Id of the resource

Outputs

dataobject
The response from Lulu.
Example output
{
  "data": {
    "errors": [],
    "id": 1,
    "page_count": "example",
    "source_url": "example",
    "status": "VALIDATING",
    "valid_pod_package_ids": []
  }
}

Get print job

Retrieve a single Print-Job.

Inputs

IdidtextRequired
Id of the resource

Outputs

dataobject
The response from Lulu.
Example output
{
  "data": {
    "child_job_ids": [],
    "items": [],
    "line_items": [],
    "parent_job_id": 1.0
  }
}

Get print job costs

Retrieve Print-Job Costs.

Inputs

IdidtextRequired
Id of the resource

Outputs

dataobject
The response from Lulu.
Example output
{
  "data": {
    "currency": "example",
    "fees": [],
    "fulfillment_cost": {
      "tax_rate": "example",
      "total_cost_excl_tax": "example",
      "total_cost_incl_tax": "example",
      "total_tax": "example"
    },
    "line_item_costs": [],
    "shipping_cost": {
      "tax_rate": "example",
      "total_cost_excl_tax": "example",
      "total_cost_incl_tax": "example",
      "total_tax": "example"
    },
    "total_cost_excl_tax": "example",
    "total_cost_incl_tax": "example",
    "total_discount_amount": "example",
    "total_tax": "example"
  }
}

Get print job statistics

Retrieve the number of Print-Jobs in each status.

Inputs

Pagepagenumber
Result page, default: 1
Page sizepage_sizenumber
The default is 100.
Created aftercreated_aftertext
Filter by creation timestamp after the given ([ISO 8601](https://www.w3.org/TR/NOTE-datetime)) timestamp.
Created beforecreated_beforetext
Filter by creation timestamp before the given ([ISO 8601](https://www.w3.org/TR/NOTE-datetime)) timestamp.
Modified aftermodified_aftertext
Filter by modification timestamp after the given ([ISO 8601](https://www.w3.org/TR/NOTE-datetime)) timestamp.
Modified beforemodified_beforetext
Filter by modification timestamp before the given ([ISO 8601](https://www.w3.org/TR/NOTE-datetime)) timestamp.
Statusstatustext
Filter by status
Ididtext
Filter by id
Orderingorderingtext
Which field to use when ordering the results.

Outputs

dataobject
The response from Lulu.
Example output
{
  "data": {
    "count": 1.0,
    "status": "CREATED"
  }
}

Get print job status

Retrieve Print-Job Status.

Inputs

IdidtextRequired
Id of the resource

Outputs

dataobject
The response from Lulu.
Example output
{
  "data": {
    "changed": "example",
    "message": "example",
    "name": "CREATED"
  }
}

List print jobs

Retrieve a list of Print-Jobs.

Inputs

Pagepagenumber
Result page, default: 1
Page sizepage_sizenumber
The default is 100.
Created aftercreated_aftertext
Filter by creation timestamp after the given ([ISO 8601](https://www.w3.org/TR/NOTE-datetime)) timestamp.
Created beforecreated_beforetext
Filter by creation timestamp before the given ([ISO 8601](https://www.w3.org/TR/NOTE-datetime)) timestamp.
Modified aftermodified_aftertext
Filter by modification timestamp after the given ([ISO 8601](https://www.w3.org/TR/NOTE-datetime)) timestamp.
Modified beforemodified_beforetext
Filter by modification timestamp before the given ([ISO 8601](https://www.w3.org/TR/NOTE-datetime)) timestamp.
Statusstatustext
Filter by status
Ididtext
Filter by id
Order IDorder_idtext
Filter by order_id
Exclude line itemsexclude_line_itemstrue/false
Leave the list of line_items out of the Print-Jobs in the response.
Searchsearchtext
Search across the fields `id`, `external_id`, `order_id`, `status`, `line_item_id`, `line_item_external_id`, `line_item_title`, `line_item_tracking_id` and `shipping_address`
Orderingorderingtext
Which field to use when ordering the results.

Outputs

dataobject
The response from Lulu.
Example output
{
  "data": {
    "count": 1,
    "next": "example",
    "previous": "example",
    "results": []
  }
}

List shipping options

Retrieve List of Shipping Options.

Inputs

Currencycurrencytext
Currency to base cost calculations on, defaults to USD. Available currencies are AUD, CAD, EUR, GBP, and USD.
Line itemsline_itemslistRequired
The line items that should be calculated
CountrycountrytextRequired
[ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country code
Citycitytext
City.
Is businessis_businesstrue/false
Only relevant for US addresses. Some US carriers don't deliver to business-addresses on Saturday.Default: false.
Is postboxis_postboxtrue/false
Is postbox.Default: false.
Namenametext
Full name of the person, including first and last name.
Organizationorganizationtext
Name of an organization. Required if no person name is given.
Phone numberphone_numbertext
Validation Regex Pattern: `^\+?[\d\s\-.\/()]{8,20}$`
Postcodepostcodetext
Postcode.
Statestatetext
2 or 3 letter state codes (officially called [ISO-3166-2 subdivision codes](https://en.wikipedia.org/wiki/ISO_3166-2)).
Street1street1text
First address line
Street2street2text
Second address line

Outputs

datalist
The response from Lulu.
Example output
{
  "data": []
}

Validate cover PDF

Validate cover file.

Inputs

Source urlsource_urltextRequired
Public url of the cover source file
Pod package IDpod_package_idtextRequired
POD Package ID of the book.
Interior page countinterior_page_countnumberRequired
Interior page count.

Outputs

dataobject
The response from Lulu.
Example output
{
  "data": {
    "errors": [],
    "id": 1,
    "source_url": "example",
    "status": "NORMALIZING"
  }
}

Validate interior PDF

Validate interior file.

Inputs

Source urlsource_urltextRequired
Public url of the interior source file
Pod package IDpod_package_idtext
POD Package ID of the book. Required to run extended validation.

Outputs

dataobject
The response from Lulu.
Example output
{
  "data": {
    "errors": [],
    "id": 1,
    "page_count": "example",
    "source_url": "example",
    "status": "VALIDATING",
    "valid_pod_package_ids": []
  }
}

On this page