Create a new Print-Job (as Reprint)
Changed onUsage of printable_id
The immutable printable_id can be used for re-orders so that the files don't have to be transferred again. Given there is an already created and validated Print-Job, you can use the printable_id of each line-item to create re-orders for that particular printable. As the normalized files are already on the server, you omit the complete printable_normalization object from the request and send a valid printable_id instead.
Shipping Information & Metadata
Print-Jobs have to contain a shipping_address as well as a shipping_level. Lulu offers five different service levels that differ in speed and traceability.
Additional Metadata
A few additional metadata fields can be specified in the Print-Job as well:
- contact_email for questions related to the Print-Job itself,
- production_delay allows you to specify a delay (between 60 minutes and 2,880 minutes) before the Print-Job goes to production,
- external_id allows you to link the Print-Job to an internal order number or other reference.
File Handling and Normalization
If there is an existing printable for the given printable_id the already processed and normalized files are used for production. If there are are problems with the printable_id, the PrintJob will be rejected or cancelled and an error message will be displayed.
Automation and Payment
After a Print-Job has been created successfully, it will remain in an UNPAID state until it is paid for through the developer portal. However, you can automate the process by putting a credit card on file. Then, the Print-Job will automatically transition to the PRODUCTION_DELAY status and your card will charged when the Print-Job is sent to production.
Request
- Base URLhttps://api.lulu.com
- AuthOAuth 2Client credentialsImplicithttps://api.lulu.com/auth/realms/glasstree/protocol/openid-connect/auth?nonce=jwt_loginPasswordToken URLhttps://api.lulu.com/auth/realms/glasstree/protocol/openid-connect/token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"contact_email": "test@test.com",
"external_id": "demo-time",
"line_items": [
{
"external_id": "item-reference-1",
"printable_normalization": {
"cover": {
"source_url": "https://www.dropbox.com/s/7bv6mg2tj0h3l0r/lulu_trade_perfect_template.pdf?dl=1&raw=1"
},
"interior": {
"source_url": "https://www.dropbox.com/s/r20orb8umqjzav9/lulu_trade_interior_template-32.pdf?dl=1&raw=1"
},
"pod_package_id": "0600X0900.BW.STD.PB.060UW444.MXX"
},
"quantity": 30,
"title": "My Book"
}
],
"production_delay": 120,
"shipping_address": {
"city": "Lübeck",
"country_code": "GB",
"name": "Hans Dampf",
"phone_number": "844-212-0689",
"postcode": "PO1 3AX",
"state_code": "",
"street1": "Holstenstr. 48"
},
"shipping_level": "MAIL"
}Response
Created
Example response
{
"contact_email": "test@test.com",
"costs": {
"line_item_costs": null,
"shipping_cost": null,
"total_cost_excl_tax": null,
"total_cost_incl_tax": null,
"total_tax": null
},
"date_created": "2017-08-07T08:47:26.485456Z",
"date_modified": "2017-08-07T08:47:26.485490Z",
"estimated_shipping_dates": {
"arrival_max": "2017-08-12",
"arrival_min": "2017-08-10",
"dispatch_max": "2017-08-09",
"dispatch_min": "2017-08-07"
},
"external_id": "demo-time",
"id": 1,
"line_items": [
{
"external_id": "item-reference-1",
"id": 1,
"printable_id": "11606ab3-9355-46d3-ae90-338db6f5d271",
"printable_normalization": null,
"quantity": 20,
"status": {
"messages": {
"info": "Line-item is currently being validated"
},
"name": "CREATED"
},
"title": "My Book"
}
],
"production_delay": 120,
"production_due_time": null,
"shipping_address": {
"city": "Lübeck",
"country_code": "DE",
"is_business": false,
"name": "Hans Dampf",
"phone_number": "844-212-0689",
"postcode": "23552",
"state_code": "",
"street1": "Holstenstr. 40",
"street2": "",
"warnings": {
"type": "validation_warning",
"path": "external",
"code": "REPLACED",
"message": "street1: Holstenstr. 40 -> Holstenstraße 40"
},
"suggested_address": {
"country_code": "DE",
"state_code": null,
"postcode": 23552,
"city": "Lübeck",
"street1": "Holstenstraße 40\"",
"street2": null
}
},
"shipping_level": "MAIL",
"shipping_option_level": "MAIL",
"status": {
"changed": "2017-08-07T08:47:26.480493Z",
"message": "Print-job is currently being validated",
"name": "CREATED"
}
}Changes
- warning
the
/request property's maxLength was set to30 - warning
the
/request property's maxLength was set to35 - warning
the
/request property's maxLength was set to30 - warning
the
/request property's maxLength was set to30 - warning
the
/request property's maxLength was set to30
- warning
- info
the
//request property's maxLength was increased from27to100
- info