Print-Jobs

Create a new Print-Job (as Reprint)

Changed on

Usage 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.

post/print-jobs/ 

Request

Request body

contact_emailstring email required

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_idstring

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.

idnumber required
order_idstring

Reference to the order, which this PrintJob has created

production_delayinteger

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.

production_due_timestring date-time

Target timestamp of when this job will move into production (ISO 8601)

shipping_level'MAIL' | 'PRIORITY_MAIL' | 'GROUND_HD' | 'GROUND_BUS' | 'GROUND' | 'EXPEDITED' | 'EXPRESS' required

The shipping level that this Print-Job is shipped with

tax_countrystring

ISO 3166-1 alpha-2 country code of the tax country determined for this job

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

contact_emailstring email required

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_idstring

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.

idnumber required
order_idstring

Reference to the order, which this PrintJob has created

production_delayinteger

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.

production_due_timestring date-time

Target timestamp of when this job will move into production (ISO 8601)

shipping_level'MAIL' | 'PRIORITY_MAIL' | 'GROUND_HD' | 'GROUND_BUS' | 'GROUND' | 'EXPEDITED' | 'EXPRESS' required

The shipping level that this Print-Job is shipped with

tax_countrystring

ISO 3166-1 alpha-2 country code of the tax country determined for this job

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 to 30

    • warning

      the / request property's maxLength was set to 35

    • warning

      the / request property's maxLength was set to 30

    • warning

      the / request property's maxLength was set to 30

    • warning

      the / request property's maxLength was set to 30

    • info

      the // request property's maxLength was increased from 27 to 100