Lulu
App · 14 actions
Quote, validate and track books printed through Lulu.
Actions
| Action | What it does |
|---|---|
| Calculate cover dimensions | Calculate cover dimensions. |
| Calculate print job cost | Create a Print-Job cost calculation. |
| Cancel print job | Cancel a print job before it enters production. |
| Create print job | Create a new Print-Job. |
| Get cover validation | Retrieve a single cover validation record. |
| Get interior validation | Retrieve a single file validation record. |
| Get print job | Retrieve a single Print-Job. |
| Get print job costs | Retrieve Print-Job Costs. |
| Get print job statistics | Retrieve the number of Print-Jobs in each status. |
| Get print job status | Retrieve Print-Job Status. |
| List print jobs | Retrieve a list of Print-Jobs. |
| List shipping options | Retrieve List of Shipping Options. |
| Validate cover PDF | Validate cover file. |
| Validate interior PDF | Validate interior file. |
Calculate cover dimensions
Calculate cover dimensions.
Inputs
- Pod package ID
pod_package_idtextRequired - POD Package ID of the book.
- Interior page count
interior_page_countnumberRequired - Interior page count.
- Unit
unittext - 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 items
line_itemslistRequired - The line items that should be calculated
- City
citytextRequired - City.
- Country code
country_codetextRequired - [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country code
- Email
emailtext - Email.
- Is business
is_businesstrue/false - Only relevant for US addresses. Some US carriers don't deliver to business-addresses on Saturday.Default:
false. - Name
nametext - Full name of the person, including first and last name.
- Organization
organizationtext - Name of an organization. Required if no person name is given.
- Phone number
phone_numbertextRequired - Validation Regex Pattern: `^\+?[\d\s\-.\/()]{8,20}$`
- Postcode
postcodetextRequired - Required for most countries
- State code
state_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)
- Street1
street1textRequired - First address line
- Street2
street2text - Second address line
- Title
titletext - Title.One of:
MR,MISS,MRS,MS,DR. - Shipping option
shipping_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
- Id
idtextRequired - 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 email
contact_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 ID
external_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 items
line_itemslistRequired - The line items of a Print-Job, defining it's Printables and their quantities. The property name 'items' can be used instead.
- Production delay
production_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. - City
citytextRequired - City.
- Country code
country_codetextRequired - [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country code
- Email
emailtextRequired - 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 business
is_businesstrue/false - Only relevant for US addresses. Some US carriers don't deliver to business-addresses on Saturday.Default:
false. - Name
nametextRequired - Full name of the person, including first and last name.
- Organization
organizationtext - Name of an organization. Required if no person name is given.
- Phone number
phone_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}$`
- Postcode
postcodetextRequired - Required for most countries
- State code
state_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)
- Street1
street1textRequired - First address line
- Street2
street2text - Second address line
- Title
titletext - Title.One of:
MR,MISS,MRS,MS,DR. - Recipient tax ID
recipient_tax_idtext - The recipient’s tax identification number. Required for shipping addresses to Brazil, Chile, and Mexico.
- Shipping level
shipping_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
- Id
idnumberRequired - 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
- Id
idnumberRequired - 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
- Id
idtextRequired - 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
- Id
idtextRequired - 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
- Page
pagenumber - Result page, default: 1
- Page size
page_sizenumber - The default is 100.
- Created after
created_aftertext - Filter by creation timestamp after the given ([ISO 8601](https://www.w3.org/TR/NOTE-datetime)) timestamp.
- Created before
created_beforetext - Filter by creation timestamp before the given ([ISO 8601](https://www.w3.org/TR/NOTE-datetime)) timestamp.
- Modified after
modified_aftertext - Filter by modification timestamp after the given ([ISO 8601](https://www.w3.org/TR/NOTE-datetime)) timestamp.
- Modified before
modified_beforetext - Filter by modification timestamp before the given ([ISO 8601](https://www.w3.org/TR/NOTE-datetime)) timestamp.
- Status
statustext - Filter by status
- Id
idtext - Filter by id
- Ordering
orderingtext - 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
- Id
idtextRequired - 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
- Page
pagenumber - Result page, default: 1
- Page size
page_sizenumber - The default is 100.
- Created after
created_aftertext - Filter by creation timestamp after the given ([ISO 8601](https://www.w3.org/TR/NOTE-datetime)) timestamp.
- Created before
created_beforetext - Filter by creation timestamp before the given ([ISO 8601](https://www.w3.org/TR/NOTE-datetime)) timestamp.
- Modified after
modified_aftertext - Filter by modification timestamp after the given ([ISO 8601](https://www.w3.org/TR/NOTE-datetime)) timestamp.
- Modified before
modified_beforetext - Filter by modification timestamp before the given ([ISO 8601](https://www.w3.org/TR/NOTE-datetime)) timestamp.
- Status
statustext - Filter by status
- Id
idtext - Filter by id
- Order ID
order_idtext - Filter by order_id
- Exclude line items
exclude_line_itemstrue/false - Leave the list of line_items out of the Print-Jobs in the response.
- Search
searchtext - 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`
- Ordering
orderingtext - 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
- Currency
currencytext - Currency to base cost calculations on, defaults to USD. Available currencies are AUD, CAD, EUR, GBP, and USD.
- Line items
line_itemslistRequired - The line items that should be calculated
- Country
countrytextRequired - [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country code
- City
citytext - City.
- Is business
is_businesstrue/false - Only relevant for US addresses. Some US carriers don't deliver to business-addresses on Saturday.Default:
false. - Is postbox
is_postboxtrue/false - Is postbox.Default:
false. - Name
nametext - Full name of the person, including first and last name.
- Organization
organizationtext - Name of an organization. Required if no person name is given.
- Phone number
phone_numbertext - Validation Regex Pattern: `^\+?[\d\s\-.\/()]{8,20}$`
- Postcode
postcodetext - Postcode.
- State
statetext - 2 or 3 letter state codes (officially called [ISO-3166-2 subdivision codes](https://en.wikipedia.org/wiki/ISO_3166-2)).
- Street1
street1text - First address line
- Street2
street2text - Second address line
Outputs
datalist- The response from Lulu.
Example output
{
"data": []
}Validate cover PDF
Validate cover file.
Inputs
- Source url
source_urltextRequired - Public url of the cover source file
- Pod package ID
pod_package_idtextRequired - POD Package ID of the book.
- Interior page count
interior_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 url
source_urltextRequired - Public url of the interior source file
- Pod package ID
pod_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": []
}
}