Cloudprinter order API XML

This documentation describes the Cloudprinter order API XML v2.1

Table of content

Getting started


To get started with Cloudprinter please contact us at info@cloudprinter.com to get your account created. To each account is associated an API key, which is used as authentication in all API calls.

Basics


This API is Used for deliverying order from Cloudprinter to a production. XML document posted to the productions API.

The order document in XML format is posted at the productions order endpoint. The document consists of one order, one or more items and reference to the needed production files for the specific product.

Communication

The XML document is delivered with a HTTP POST request to a API endpoint over HTTPS or HTTP. The HTTP response code 200 indicate success, all other response codes are treated as error.

Order XML format


The order XML document containes all needed information for printing and shipping the products. This example is a very basic order with one item.

Example order XML

<______?xml version="1.0" encoding="UTF-8"?>
<order>
  <apikey>13b37bb1ed6d3403e158abe719b4f6d0</apikey>
  <id>123456780000</id>
  <date>2016-07-14 08:25:08</date>
  <priority>2</priority>
  <creator>
    <id>1</id>
    <name>CloudPrinter.com</name>
    <version>2.1</version>
    <date>2016-01-20 08:25:08</date>
  </creator>
  <client>
    <id>999</id>
    <name>YourCompany</name>
    <date>2016-01-20 08:25:08</date>
    <reference>d15ddd390457e4f581e0835a979465df</reference>
  </client>
  <address>
    <company>Example company</company>
    <type>delivery</type>
    <name>Example name</name>
    <street1>Example street 1234</street1>
    <street2 />
    <city>Example city</city>
    <zip>99999</zip>
    <country>US</country>
    <email>email@example.com</email>
    <phone>1234567890</phone>
    <state>NY</state>
  </address>
  <shipping>
    <method>fedex_national_2_day</method>
    <consignor>The Book Company</consignor>
  </shipping>
  <item>
    <id>123456780001</id>
    <count>1</count>
    <title>Building High-Availability RESTful Services</title>
    <product>textbook_cw_a3_p_fc</product>
    <desc>Textbook Casewrap (PUR, 3 mm board) A3 Portrait DIG FC 80OFF</desc>
    <file>
      <type>cover</type>
      <format>pdf</format>
      <url>https://s3-eu-west-1.amazonaws.com/13b37bb1ed6d3403e158abe719b4f6d0.cloudprinter.com/29c1d90b21bd7c8d28ba1fd1ae7646eb_cover.pdf</url>
      <md5sum>4578c3ecf64e47581b175d542f8b0160</md5sum>
      <size>20785</size>
    </file>
    <file>
      <type>book</type>
      <format>pdf</format>
      <url>https://s3-eu-west-1.amazonaws.com/13b37bb1ed6d3403e158abe719b4f6d0.cloudprinter.com/29c1d90b21bd7c8d28ba1fd1ae7646eb_book.pdf</url>
      <md5sum>1ef89e74e628e223ae94aa4586330833</md5sum>
      <size>77459</size>
    </file>
    <pages>44</pages>
    <option>
      <option>80off</option>
      <desc>80 gsm Offset</desc>
      <count>44</count>
    </option>
    <option>
      <option>cover_gloss</option>
      <desc>Gloss finish on book cover</desc>
      <count>1</count>
    </option>
  </item>
</order>

Parameters

Name Type Description Required
apikey string API key specific to the production required
id string Cloudprinters order id required
date string Order date required
priority string The number of days for production optional
Creator Type Description Required
creator array Information on the creator of the document required
creator : id string ID of the creator service required
creator : name string Name of the creator service required
creator : version string Version of the document creator required
creator : date string Date of document generation required
client array Information on the client business required
client : id string ID of the client business required
client : name string Name of the client business required
client : reference string The order reference of the client business required
client : date string Order date registered by the client business optional
Address Type Description Required
address array List of delivery addresses required
address : company string End customers company name optional
address : firstname string End customers firstname required
address : lastname string End customers lastname required
address : street1 string End customers street name required
address : street2 string End customers street name optional
address : zip string End customers zip/postal code required
address : city string End customers city name required
address : state string End customers state name - ANSI INCITS 38:2009 alpha-2 - required for US optional
address : country string End customers country - ISO 3166-1 alpha-2 required
address : email string End customers email address - used in case of problems during delivery optional
address : phone string End customers phone number - used in case of problems during delivery optional
shipping
shipping array Information on shipping required
shipping : method string The shipping carrier and service for the order required
shipping : consignor string The consignor name for the shipping label required
item
item array One or more items can be added required
item : id string Cloudprinters item id required
item : count string The number of copies to produce of this specific item required
item : title string The title of the item project optional
item : product string The name of the product required
item : desc string Short description text of the product optional
item : pages string The number of pages in the book block optional
item : file array One or more files can be added optional
item : file : type string The type of file - valid values are: "product", "cover", "book" required
item : file : format string The format of file - valid values are: "pdf", "jpg" required
item : file : url string URL to the product file for the specific item required
item : file : md5sum string Md5 sum of the file - used for validation required
item : file : size string Size of the file in bytes - used for validation required
item : options array zero or more files can be added optional
item : options : option string Productions product id for the addon required
item : options : desc string The quantity of the addon required required
item : options : count string Short description of the addon required
file
file array Zero or more files can be added optional
file : type string The type of file - valid values are: "delivery_note", "promotion", "reorder_doc" required
file : url string URL to the order file required
file : md5sum string Md5 sum of the file - used for validation required
file : size string Size of the file in bytes - used for validation required