openapi: 3.0.0
servers:
- url: https://api.lulu.com/
info:
description: "\n# Getting Started\nThe Lulu Printer API is designed to deliver all\
\ the data a Lulu print partner needs to print and fulfill orders from the Lulu\
\ Univeral Publishing Platform (UPP).\n\nTo get started, you\u2019ll need to complete\
\ the following steps.\n\n**Establish an order server**\n\nTo allow Lulu to be\
\ able to send you orders to fulfill, you will first need to host your own order\
\ server. Your server URL must adhere to https:// standards and provide an API\
\ key for API authenticaion, or a username and secret for basic authentication.\
\ API key is the preferred method for authentication, but the Lulu UPP supports\
\ both authentication methods. Be sure to specify which type you implement while\
\ working with Lulu, as it changes the way Lulu communicates with your server.\n\
\n**Provide Lulu with authorization credentials** \n\nOnce your server is up and\
\ ready to recieve orders, inform your designated Lulu Developer Lead with your\
\ chosen authorization method and subsequent credentials.\n\n**Lulu will now provide\
\ an API Key for order signals**\n\nYour designated Lulu Developer Lead will create\
\ an instance for you in the UPP and generate an API key for use with the `/printer-signals/`\
\ endpoint. Lulu will communicate this API key to you via email. Please ensure\
\ you include this key in the header of any requests.\n\n**Test orders can now\
\ begin**\n\nOnce you have communicated your readiness, the Lulu Developer Lead\
\ sends a series of test orders to ensure your integration is working as expected.\
\ Your designated Lulu Developer will work with you directly during this process\
\ and will be available for any technical questions you may have along the way.\n\
\n**Install production level authorization credentials for customer orders**\n\
\nOnce the testing phase is complete, send your production level server URL and\
\ dedicated authorization credentials for Lulu customer orders. We recommend the\
\ URL and credentials differ from your test server to eliminate any confusion\
\ between test and actual orders.\nAdditionally, Lulu will provide you a production\
\ level `/printer-signals/` endpoint URL and dedicated authoriztion credentials\
\ matching the authorization method of your choice.\n\n**Ready!**\n\nAfter the\
\ Printer API implementation is complete, Lulu will conduct product testing and\
\ send live orders for you to fulfill and delight our customers.\n\n# What Order\
\ Data Will I Receive?\nTo receive orders from the Lulu Universal Publishing Platform,\
\ set up your server to receive a JSON-formatted object in the following format:\n\
* `id`: ID of the order to be printed, known to Lulu as the order id. This ID\
\ is communicated in three meaningful sections. The first section is the lulu\
\ order id, the second is the shipment number beginning at one, increasing by\
\ every split shipment Lulu performs, the third is the fulfillment-attempt increasing\
\ everytime Lulu resends the order.\n* `external_id`: An external identifier of\
\ the order in an external system\n* `line_of_business_id`: Identifier of Lulus\
\ internal business line of the order\n* `shipping_address`: An address for shipping\
\ the order. Fedex has a 30-35 character limit for address fields. Also, Fedex APIs are limited to\
\ Latin-1 characters. Other sources state a 35 character limit per address line.\n * `title`:\
\ The end customer's title\n * `first_name`: The end customer's first name\n\
\ * `last_name`: The end customer's last name\n * `organization`: The end\
\ customer's organization name\n * `street1`: The end customer's street\n \
\ * `street2` (optional): The end customer's street\n * `city`: The end customer's\
\ city\n * `postcode`: The end customer's post code\n * `state`: The end\
\ customer's state name - ANSI INCITS 38:2009 alpha-2 - required for US\n *\
\ `country`: The end customer's country - ISO 3166-1 alpha-2\n * `email`: The\
\ end customer's email - used in case of problems during delivery\n * `phone`:\
\ The end customer's phone number - used in case of problems during delivery\n\
\ * `is_business`: Identifies if address is a business\n* `shipping_option`:\
\ the specific shipping method to be used to ship the item to Lulu's end customer,\
\ ex. \"fedex_smart_post\".\n* `line_items`: Used for data about the items included\
\ in the order.\n * `id`: ID of the item to be printed. This is known to Lulu\
\ as the item id.\n * `external_id`: External identifier of the line item in\
\ an external system\n * `quantity`: Quantity that should be produced\n \
\ * `title`: The title of the item to be printed as dictated by Lulu's end customer\n\
\ * `isbn`: ISBN number associated with the title of the book\n * `end_user_price`:\
\ End user price of the book including currency, may be used for international\
\ shipping and customs\n * `pages`: The number of pages in the item\n *\
\ `contains_adult_content`: True if the item could be classified as explicit content.\
\ False otherwise\n * `pod_package_id`: Identifier that describes the book\
\ configuration\n * `foil_stamp_title_text`: Title text that should gets ambossed\
\ on the spine, if the `pod_package_id` represents a linen wrapped book. If both\
\ foil_stamp_title_text and foil_stamp_author_text are blank the foil stamping\
\ should be omitted.\n * `foil_stamp_author_text`: Author text that should\
\ gets ambossed on the spine, if the `pod_package_id` represents a linen wrapped\
\ book. If both foil_stamp_title_text and foil_stamp_author_text are blank the\
\ foil stamping should be omitted.\n * `parent_order_id`: Reference of the\
\ parent/original order-id when this is a re-order.\n * `parent_line_item_id`:\
\ Reference of the parent/original order-line-item-id when this is a re-order.\n\
\ * `reorder_cause`: Cause / problem discovered in an original order that resulted\
\ in a re-order.\n * `reorder_description`: Optional description of re-order\
\ or details related to `reorder_cause`.\n * `files`: Data about the specific\
\ files to be printed.\n * `url`: URL to the order file\n * `size`:\
\ Size of the file in bytes - used for validation\n * `md5sum`: md5 sum\
\ of the file - used for validation\n * `type`: The type of file, typically\
\ \"COVER\" or \"INTERIOR\"\n* `packing_slip`\n * `use_external_ids`: Whether\
\ to show external-ids of order and line-items on the packing slip.\n * `logo`:\
\ Packing slip logo image for downloading. The logo should be printed on the packing\
\ slip.\n * `url`: URL to the order file\n * `size`: Size of the\
\ file in bytes - used for validation\n * `md5sum`: md5 sum of the file\
\ - used for validation\n * `type`: The type of file, typically \"PACKING_SLIP_LOGO\"\
\n * `message`: Message that should be printed on the packing slip. This message\
\ may contain line breaks, that are escaped as \"\\\\\\n\" in the json-payload.\n\
* `return_address`\n * `title`: Author or Merchant's title\n * `first_name`:\
\ Author or Merchant's first name\n * `last_name`: Author or Merchant's last\
\ name\n * `organization`: Author or Merchant's organization name\n * `street1`:\
\ Author or Merchant's street\n * `street2` (optional): Author or Merchant's\
\ street\n * `city`: Author or Merchant's city\n * `postcode`: Author or\
\ Merchant's post code\n * `state`: Author or Merchant's state name - ANSI\
\ INCITS 38:2009 alpha-2 - required for US\n * `country`: Author or Merchant's\
\ country - ISO 3166-1 alpha-2\n * `email`: Author or Merchant's email - used\
\ in case of problems during delivery\n * `phone`: Author or Merchant's phone\
\ number - used in case of problems during delivery\n * `is_business`: Identifies\
\ if address is a business\n\n# Example Order\n```json\n{\n \"id\": \"2012345-1.1\"\
,\n \"external_id\": \"my-external-order-id\",\n \"line_of_business_id\": \"\
PRINTAPI\",\n \"shipping_address\": {\n \"title\": \"Mr.\",\n \"first_name\"\
: \"John\",\n \"last_name\": \"Doe\",\n \"organization\": \"Lulu\",\n\
\ \"street1\": \"123 Main Street\",\n \"street2\": \"Suite 300\",\n\
\ \"postcode\": \"27560\",\n \"city\": \"Morrisville\",\n \"state\"\
: \"NC\",\n \"country\": \"US\",\n \"email\": \"JohnDoe@lulu.com\",\n\
\ \"phone\": \"9182938475\",\n \"is_business\": true\n },\n \"\
shipping_option\": \"fedex_smart_post\",\n \"line_items\": [\n {\n \
\ \"id\": \"20578\",\n \"external_id\": \"my-external-line-item-id\"\
,\n \"title\": \"The Quick Brown Fox Jumps Over the Lazy Dog\",\n \
\ \"quantity\": 10,\n \"isbn\": \"978-0615832432\",\n \
\ \"pages\": \"52\",\n \"contains_adult_content\": false,\n \
\ \"end_user_price\": \"30.00 $\",\n \"pod_package_id\": \"0600X0900BWSTDPB060UW444\"\
,\n \"foil_stamp_title_text\": \"The Quick Brown Fox Jumps Over the Lazy\
\ Dog\",\n \"foil_stamp_author_text\": \"William Strunk Jr.\",\n \
\ \"parent_order_id\": \"2000123\",\n \"parent_line_item_id\": \"\
10234\",\n \"reorder_cause\": \"Color Cast (Too Blue, Red, Etc)\",\n\
\ \"reorder_description\": \"Page 1-15 contain too much Red\",\n \
\ \"files\": [\n {\n \"url\": \"https://api.lulu.com/file/api/v2/files/38905/data/?principal_id=e3f7ac8f-031d-4b5a-a706-6a82394aec23&expiration=1537898103&signature=Sa-Bjz2cYam1C51lPzLkR3a5uA4\"\
,\n \"size\": 146316,\n \"md5sum\": \"51f90ada43925da11c0642c49c8c6fcd\"\
,\n \"type\": \"COVER\"\n },\n {\n\
\ \"url\": \"https://api.lulu.com/file/api/v2/files/38903/data/?principal_id=e3f7ac8f-031d-4b5a-a706-6a82394aec23&expiration=1537898103&signature=xOhkUKI0jlt4DAdajMQYWv71Les\"\
,\n \"size\": 1701494,\n \"md5sum\": \"7115a85ab5a6da2bb5fac6e3a37744d0\"\
,\n \"type\": \"INTERIOR\"\n }\n ]\n \
\ }\n ],\n \"packing_slip\": {\n \"use_external_ids\": true,\n \
\ \"logo\": {\n \"url\": \"https://api.lulu.com/file/api/v2/files/38905/data/?principal_id=e3f7ac8f-031d-4b5a-a706-6a82394aec23&expiration=1537898103&signature=Sa-Bjz2cYam1C51lPzLkR3a5uA4\"\
,\n \"size\": 146316,\n \"md5sum\": \"51f90ada43925da11c0642c49c8c6fcd\"\
,\n \"type\": \"PACKING_SLIP_LOGO\"\n },\n \"message\": \"\
Printed, bound, and packed with care at Lulu.com\\\\nHave a question about your\
\ order? Reach our support team at www.lulu.com/support.\"\n },\n \"return_address\"\
: {\n \"title\": \"\",\n \"first_name\": \"\",\n \"last_name\"\
: \"\",\n \"organization\": \"Fulfillment Center\",\n \"street1\": \"\
627 Davis Drive\",\n \"street2\": \"Suite 300\",\n \"postcode\": \"\
27560\",\n \"city\": \"Morrisville\",\n \"state\": \"NC\",\n \"\
country\": \"US\",\n \"email\": \"support@lulu.com\",\n \"phone\": \"\
8442120689\",\n \"is_business\": true\n }\n}\n```\n# How Do I Create\
\ a Packing Slip?\n\nYou will use the following fields of the order data payload\
\ to generate the packing slip:\n* `id`: to be used as the order number on the\
\ packing slip; use this value if `use_external_ids` is `false`\n* `external_id`:\
\ to be used as the order number on the packing slip; use this value if `use_external_ids`\
\ is `true`\n* `shipping_address`: to be used in the \"Received by\" section of\
\ the packing slip\n* `shipping_option`: determines the \"Ship Method\" to be\
\ shown on the packing slip\n* `line_items`\n * `id`: to be used in the \"\
Item ID\" field of the packing slip; use this value if `use_external_ids` is `false`\n\
\ * `external_id`: to be used in the \"Item ID\" field of the packing slip;\
\ use this value if `use_external_ids` is `true`\n * `quantity`: quantity of\
\ the line item\n * `title`: to be used in the \"Item Description\" field of\
\ the packing slip; note this value may be an empty string\n * `pages`: number\
\ of pages in the line item\n* `packing_slip`\n * `use_external_ids`: denotes\
\ the values to be used for the order and line item ids\n * `logo`\n \
\ * `url`: URL for the logo image to be printed on the packing slip\n * `message`:\
\ text to be printed on the packing slip; note this string may contain line breaks\n\
* `return_address`: to be used in the \"Return to\" section of the packing slip\n\
\nSee the above \"What Order Data Will I Receive?\" section for more details on\
\ each of these fields.\n\nContact your Lulu representative to obtain a sample\
\ packing slip.\n\n# What if Errors Occur?\n\nWe provide two ways for you to POST\
\ error signals to the `/printer-signals/` endpoint.\_ The first is designed to\
\ be used if there is an error on the order as a whole - if, for instance, we\
\ send you a shipping method you do not support, or if the shipping address has\
\ too many characters for the carrier you use.\nThe message you include with this\
\ error is at your discretion; the more specific error you send back, the quicker\
\ we can address the problem on our end and resubmit the order to you.\n\nIn the\
\ instances we receive an error in a printer signal from you on the order, we\
\ will try to correct the data.\_ If we are able to correct the data, we will\
\ manually submit a new order (with a new order number) to you via the API.\n\n\
A sample payload for an error of this type follows.\n```json\n{\n \"date_time\"\
: \"2019-07-18 16:25:08\",\n \"order_id\": \"9473-1.1\",\n \"type\": \"ERROR\"\
,\n \"message\": \"Invalid shipping method\"\n}\n```\n\nThe second way to POST\
\ error signals is using a `line_item_errors` array. This is designed to be used\
\ when there are problems with one or more items in the order.\nIf\_you encounter\
\ an issue with a particular item and are unable to process/print it, you can\
\ send us an error back about that item while continuing to process and print\
\ the other valid line items in the order.\nAs with the previous error signal,\
\ the messages you include are at your discretion. \n\nA sample payload for an\
\ error containing a `line_item_errors` array follows.\n```json\n{\n \"date_time\"\
: \"2019-07-18 16:53:08\",\n \"order_id\": \"6475-1.1\",\n \"type\": \"ERROR\"\
,\n \"line_item_errors\": [\n {\n \"line_item_id\": \"9192\",\n \
\ \"cause\": \"COVER\",\n \"message\": \"RIP error; corrupt file\"\n },\n\
\ {\n \"line_item_id\": \"9194\",\n \"cause\": \"INTERIOR\",\n \
\ \"message\": \"RIP error; missing glyphs\" \n },\n {\n \"line_item_id\"\
: \"9198\",\n \"cause\": \"OTHER\",\n \"message\": \"Unsupported product\
\ SKU\"\n }\n ]\n}\n```\nSee the \"Signals\" section below for additional\
\ information. \n"
title: Lulu Printer Documentation
version: v2
x-logo:
url: https://api.lulu.com/api-docs/assets/logo-lulu-api.svg
altText: LULU API logo
paths:
/printer-signals/:
post:
description: Printers use the following requests to send order updates to Lulu.
operationId: sendSignal
parameters:
- description: This header must be sent to provide the used version of Lulus
UPP API.
in: header
name: lulu-upp-api-version
schema:
default: v2
type: string
requestBody:
content:
application/json:
schema:
properties:
date_time:
description: Datetime when the signal was created at the printer.
([ISO 8601](https://www.w3.org/TR/NOTE-datetime))
format: date-time
type: string
line_item_errors:
items:
properties:
cause:
description: The cause of an error
enum:
- INTERIOR
- COVER
- OTHER
example: INTERIOR
type: string
line_item_id:
description: ID of the line item the error belongs to
example: '20578'
type: string
message:
description: The message describing the cause of a line-item
error
example: font invalid or not embedded
type: string
type: array
message:
description: The message describing the cause of an order ERROR
signal.
example: Canceled by Lulu
type: string
order_id:
description: ID of the order to which this Signal belongs
example: 2012345-1.1
type: string
shipments:
description: Shipments of a Shipped signal. Required in Shipped
signals.
items:
properties:
line_items:
items:
properties:
id:
description: ID of the line item that was shipped
example: '20578'
type: string
quantity:
description: Quantity of the line item that was shipped
example: 10
format: int32
type: integer
type: object
type: array
tracking:
description: Tracking ID of the shipment
example: '123456789'
type: string
type: array
shipping_option:
description: Identifier of the shipping option that was used to
ship the order. Required for SHIPPED signals.
example: fedex_smart_post
type: string
type:
enum:
- PRODUCTION_STARTED
- SHIPPED
- ERROR
example: PRODUCTION_STARTED
type: string
required:
- type
- order_id
- date_time
example:
date_time: '2018-05-14T10:25:08Z'
order_id: 2012345-1.1
shipments:
- line_items:
- id: '20578'
quantity: 10
tracking: '123456789'
shipping_option: fedex_smart_post
type: SHIPPED
example:
date_time: '2018-05-14T10:25:08Z'
order_id: 2012345-1.1
shipments:
- line_items:
- id: '20578'
quantity: 10
tracking: '123456789'
shipping_option: fedex_smart_post
type: SHIPPED
responses:
201:
description: Signal delivered successfully
400:
content:
application/json:
schema:
example:
attribute_1:
- This field is required.
attribute_2:
- This field is required.
title: Bad Request
example:
attribute_1:
- This field is required.
attribute_2:
- This field is required.
description: Bad Request
401:
content:
application/json:
schema:
example:
detail: Authentication credentials were not provided.
properties:
detail:
type: string
required:
- detail
title: Unauthorized
example:
detail: Authentication credentials were not provided.
description: Unauthorized
403:
content:
application/json:
schema:
example:
detail: You do not have permission to perform this action.
properties:
detail:
type: string
required:
- detail
title: Forbidden
example:
detail: You do not have permission to perform this action.
description: Forbidden
security:
- apikeyAuth: []
summary: Send an order update (signal) to Lulu
tags:
- Signals
x-code-samples:
- lang: Python
source: "import requests\n\nurl = 'https://api.lulu.com/printer-signals/'\n\
\npayload = \"\"\"\n{\n \"date_time\": \"2018-05-14T10:25:08Z\",\n \
\ \"order_id\": \"2012345-1.1\",\n \"shipments\": [\n {\n \
\ \"line_items\": [\n {\n \"id\"\
: \"20578\",\n \"quantity\": 10\n }\n\
\ ],\n \"tracking\": \"123456789\"\n }\n \
\ ],\n \"shipping_option\": \"fedex_smart_post\",\n \"type\": \"\
SHIPPED\"\n}\n\"\"\"\n\nheaders = { \n 'Content-Type': 'application/json',\n\
\ 'Cache-Control': 'no-cache',\n 'lulu-upp-api-key': 'Check Authentication\
\ menu', \n 'lulu-upp-api-version': 'This header must be sent to provide\
\ the used version of Lulus UPP API.', \n}\n\nresponse = requests.request('POST',\
\ url, data=payload, headers=headers)\n\nprint(response.text)"
- lang: Node
source: "var request = require(\"request\");\n\nvar options = {\n method:\
\ 'POST',\n url: 'https://api.lulu.com/printer-signals/',\n headers:\
\ {\n 'Cache-Control': 'no-cache',\n 'lulu-upp-api-key': 'Check Authentication\
\ menu',\n 'lulu-upp-api-version': 'This header must be sent to provide\
\ the used version of Lulus UPP API.',\n 'Content-Type': 'application/json'\n\
\ },\n body: {\n \"date_time\": \"2018-05-14T10:25:08Z\",\n \"order_id\"\
: \"2012345-1.1\",\n \"shipments\": [\n {\n \"line_items\"\
: [\n {\n \"id\": \"20578\",\n \
\ \"quantity\": 10\n }\n ],\n \
\ \"tracking\": \"123456789\"\n }\n ],\n \"shipping_option\"\
: \"fedex_smart_post\",\n \"type\": \"SHIPPED\"\n},\n json: true,\n\
\ };\n\nrequest(options, function (error, response, body) {\n if (error)\
\ throw new Error(error);\n\n console.log(body);\n});"
- lang: Ruby
source: "require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.lulu.com/printer-signals/\"\
)\n\nhttp = Net::HTTP.new(url.host, url.port)\n\nrequest = Net::HTTP::Post.new(url)\n\
request[\"Content-Type\"] = 'application/json'\nrequest[\"lulu-upp-api-key\"\
] = 'Check Authentication menu'\nrequest[\"lulu-upp-api-version\"] = 'This\
\ header must be sent to provide the used version of Lulus UPP API.'\nrequest[\"\
Cache-Control\"] = 'no-cache'\n\nrequest.body = \"{\" +\n\t\" \\\"date_time\\\
\": \\\"2018-05-14T10:25:08Z\\\",\" +\n\t\" \\\"order_id\\\": \\\"2012345-1.1\\\
\",\" +\n\t\" \\\"shipments\\\": [\" +\n\t\" {\" +\n\t\" \
\ \\\"line_items\\\": [\" +\n\t\" {\" +\n\t\" \
\ \\\"id\\\": \\\"20578\\\",\" +\n\t\" \
\ \\\"quantity\\\": 10\" +\n\t\" }\" +\n\t\" ],\"\
\ +\n\t\" \\\"tracking\\\": \\\"123456789\\\"\" +\n\t\" \
\ }\" +\n\t\" ],\" +\n\t\" \\\"shipping_option\\\": \\\"fedex_smart_post\\\
\",\" +\n\t\" \\\"type\\\": \\\"SHIPPED\\\"\" +\n\t\"}\"\n\nresponse\
\ = http.request(request)\nputs response.read_body"
- lang: Java
source: "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType\
\ = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType,\n\
\ \"{\" +\n\t\" \\\"date_time\\\": \\\"2018-05-14T10:25:08Z\\\",\"\
\ +\n\t\" \\\"order_id\\\": \\\"2012345-1.1\\\",\" +\n\t\" \\\"shipments\\\
\": [\" +\n\t\" {\" +\n\t\" \\\"line_items\\\": [\" +\n\
\t\" {\" +\n\t\" \\\"id\\\": \\\"20578\\\
\",\" +\n\t\" \\\"quantity\\\": 10\" +\n\t\" \
\ }\" +\n\t\" ],\" +\n\t\" \\\"tracking\\\"\
: \\\"123456789\\\"\" +\n\t\" }\" +\n\t\" ],\" +\n\t\" \\\"\
shipping_option\\\": \\\"fedex_smart_post\\\",\" +\n\t\" \\\"type\\\"\
: \\\"SHIPPED\\\"\" +\n\t\"}\"\n);\n\nRequest request = new Request.Builder()\n\
\ .url(\"https://api.lulu.com/printer-signals/\")\n .post(body)\n\
\ .addHeader(\"Content-Type\", \"application/json\")\n .addHeader(\"lulu-upp-api-key\"\
, \"Check Authentication menu\") \n .addHeader(\"lulu-upp-api-version\"\
, \"This header must be sent to provide the used version of Lulus UPP API.\"\
) \n .addHeader(\"Cache-Control\", \"no-cache\")\n .build();\n\nResponse\
\ response = client.newCall(request).execute();"
- lang: cURL
source: "curl -X POST \\\n https://api.lulu.com/printer-signals/\n\
\ -H 'lulu-upp-api-key: Check Authentication menu' \\ -H 'lulu-upp-api-version:\
\ This header must be sent to provide the used version of Lulus UPP API.'\
\ \\\n -H 'Cache-Control: no-cache' \\\n -H 'Content-Type: application/json'\
\ \\\n -d '{\n \"date_time\": \"2018-05-14T10:25:08Z\",\n \"order_id\"\
: \"2012345-1.1\",\n \"shipments\": [\n {\n \"line_items\"\
: [\n {\n \"id\": \"20578\",\n \
\ \"quantity\": 10\n }\n ],\n \
\ \"tracking\": \"123456789\"\n }\n ],\n \"shipping_option\"\
: \"fedex_smart_post\",\n \"type\": \"SHIPPED\"\n}'"
components:
examples:
Signal:
value:
date_time: '2018-05-14T10:25:08Z'
order_id: 2012345-1.1
shipments:
- line_items:
- id: '20578'
quantity: 10
tracking: '123456789'
shipping_option: fedex_smart_post
type: SHIPPED
parameters:
IsOwnFilter:
description: If set to true, only the resources owned by the token-principle
will be returned. If set to false, the resources not owned by the token-principle
will be returned.
in: query
name: is_own
required: false
schema:
type: boolean
OrderingFilter:
description: Which field to use when ordering the results.
in: query
name: ordering
required: false
schema:
type: string
Page:
description: 'Result page, default: 1'
in: query
name: page
schema:
type: integer
PageSize:
description: The default is 100.
in: query
name: page_size
schema:
type: integer
PathId:
description: Id of the resource
in: path
name: id
required: true
schema:
type: string
PathUserId:
description: User Id of the resource
in: path
name: user_id
required: true
schema:
format: uuid
type: string
UserIdFilter:
description: Filter by ID of the user who created the resource
in: query
name: user_id
required: false
schema:
format: uuid
type: string
responses:
BadRequest:
content:
application/json:
schema:
example:
attribute_1:
- This field is required.
attribute_2:
- This field is required.
title: Bad Request
example:
attribute_1:
- This field is required.
attribute_2:
- This field is required.
description: Bad Request
Conflict:
content:
application/json:
schema:
example:
attribute_1:
- This field is in conflict.
title: Conflict
example:
attribute_1:
- This field is in conflict.
description: Conflict
Forbidden:
content:
application/json:
schema:
example:
detail: You do not have permission to perform this action.
properties:
detail:
type: string
required:
- detail
title: Forbidden
example:
detail: You do not have permission to perform this action.
description: Forbidden
NotFound:
description: Not Found
Unauthorized:
content:
application/json:
schema:
example:
detail: Authentication credentials were not provided.
properties:
detail:
type: string
required:
- detail
title: Unauthorized
example:
detail: Authentication credentials were not provided.
description: Unauthorized
Unavailable:
content:
application/json:
schema:
example:
detail: The requested service is currntly not available.
properties:
detail:
type: string
required:
- detail
title: Service Unavailable
example:
detail: The requested service is currntly not available.
description: Unavailable
schemas:
BadRequestError:
example:
attribute_1:
- This field is required.
attribute_2:
- This field is required.
title: Bad Request
ConflictError:
example:
attribute_1:
- This field is in conflict.
title: Conflict
Error:
example:
detail: Error explanation.
properties:
detail:
type: string
required:
- detail
title: General Error
ForbiddenError:
example:
detail: You do not have permission to perform this action.
properties:
detail:
type: string
required:
- detail
title: Forbidden
LineItemError:
properties:
cause:
description: The cause of an error
enum:
- INTERIOR
- COVER
- OTHER
example: INTERIOR
type: string
line_item_id:
description: ID of the line item the error belongs to
example: '20578'
type: string
message:
description: The message describing the cause of a line-item error
example: font invalid or not embedded
type: string
Pagination:
properties:
count:
example: 1
type: integer
next:
example: https://api.lulu.com/resources/?page=1&page_size=1
type: string
previous:
example: https://api.lulu.com/resources/?page=1&page_size=1
type: string
Shipment:
properties:
line_items:
items:
properties:
id:
description: ID of the line item that was shipped
example: '20578'
type: string
quantity:
description: Quantity of the line item that was shipped
example: 10
format: int32
type: integer
type: object
type: array
tracking:
description: Tracking ID of the shipment
example: '123456789'
type: string
Signal:
properties:
date_time:
description: Datetime when the signal was created at the printer. ([ISO
8601](https://www.w3.org/TR/NOTE-datetime))
format: date-time
type: string
line_item_errors:
items:
properties:
cause:
description: The cause of an error
enum:
- INTERIOR
- COVER
- OTHER
example: INTERIOR
type: string
line_item_id:
description: ID of the line item the error belongs to
example: '20578'
type: string
message:
description: The message describing the cause of a line-item error
example: font invalid or not embedded
type: string
type: array
message:
description: The message describing the cause of an order ERROR signal.
example: Canceled by Lulu
type: string
order_id:
description: ID of the order to which this Signal belongs
example: 2012345-1.1
type: string
shipments:
description: Shipments of a Shipped signal. Required in Shipped signals.
items:
properties:
line_items:
items:
properties:
id:
description: ID of the line item that was shipped
example: '20578'
type: string
quantity:
description: Quantity of the line item that was shipped
example: 10
format: int32
type: integer
type: object
type: array
tracking:
description: Tracking ID of the shipment
example: '123456789'
type: string
type: array
shipping_option:
description: Identifier of the shipping option that was used to ship the
order. Required for SHIPPED signals.
example: fedex_smart_post
type: string
type:
enum:
- PRODUCTION_STARTED
- SHIPPED
- ERROR
example: PRODUCTION_STARTED
type: string
required:
- type
- order_id
- date_time
UnauthorizedError:
example:
detail: Authentication credentials were not provided.
properties:
detail:
type: string
required:
- detail
title: Unauthorized
UnavailableError:
example:
detail: The requested service is currntly not available.
properties:
detail:
type: string
required:
- detail
title: Service Unavailable
securitySchemes:
apikeyAuth:
description: 'To receive orders, Lulu supports two established methods of Authorization,
Basic Authorization and API Key Authorization.
Which method applies to you will be your choice.
**Basic Authorization**
Orders will be sent along with a username and secret in the header. When choosing
this method, you will generate these
values and communicate them to Lulu before the testing phase in order for
Lulu to ensure they accompany all orders.
**API Key**
Orders will be sent with an API Key in the header for use in Authorization.
When choosing this method, you will generate
this key and communicate it to Lulu before the testing phase in order for
Lulu to ensure it accompanies all order payloads.
**Send your Lulu generated API Key in the Header when communicating Signals**.
To signal the progress of your orders, all requests to the Lulu /printer-signals/
endpoint must be accompanied by a
Lulu generated API key in the header parameter called lulu-upp-api-key.
'
in: header
name: lulu-upp-api-key
type: apiKey
tags: []
security:
- oauth2: []
- apikeyAuth: []