Peecho API


Peecho’s print API enables your platform or app to sell digital content as high quality printed products. This API documentation will show you how to integrate with Peecho’s print on demand service so you can start selling! For questions contact support@peecho.com.

Request catalogue

The Product Catalogue consists of offerings. These offerings are representations of the product types that you can order through the print API and contain all information needed to complete an order.

Information given in the offering includes product price, shipping price, price per page, preferred currency, etc. If you want to see a full list of parameters, you can check application / xml below.

List offerings

The List offerings displays the list offerings for a certain merchant or application.

To customize your list of offerings, log into your Peecho dashboard, click on “Application”, then “Details” and find “Custom setting” in the bottom right corner of the screen. From there you can add or remove offerings as you please.

In the table with parameters below, we mention applicationApiKey and merchantApiKey. You can find the application API key and the merchant API key in your personal dashboard. First, click on the wheel in the right top corner of your dashboard and click “general settings”. On the left hand side of this page, you can find the option “Print API” in the menu. Click on this menu item to find the print API information you need.

REQUEST

Parameters
applicationApiKey string

Unique string identifier of the application.

merchantApiKey string

Unique string identifier of the merchant.

currencies string

Express offering prices in various currencies. ALL returns all available currencies.

RESPONSE

Headers
Content-Type application/xml
200 application/xml
                        
                        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
  <offerings>
    <offering>
      <id>921</id>
      <price>3.00</price>
      <countryShippingPrice>2.50</countryShippingPrice>
      <expressShippingPrice>0.00</expressShippingPrice>
      <regionShippingPrice>8.00</regionShippingPrice>
      <worldShippingPrice>39.00</worldShippingPrice>
      <pricePerPage>0.10</pricePerPage>
      <cheapestShippingPrice>2.50</cheapestShippingPrice>
      <name>Softcover full colour small (portrait)</name>
      <currency>EUR</currency>
      <priceByCurrency>
        <value baseAmount="3.00000" amount="3.00000" currency="EUR" rate="1.0"/>
      </priceByCurrency>
      <pricePerPageByCurrency>
        <value baseAmount="0.10000" amount="0.10000" currency="EUR" rate="1.0"/>
      </pricePerPageByCurrency>
      <cheapestShippingPriceByCurrency>
        <value baseAmount="2.50000" amount="2.50000" currency="EUR" rate="1.0"/>
      </cheapestShippingPriceByCurrency>
      <vatPercentage>6</vatPercentage>
      <defaultNumberOfPages>0</defaultNumberOfPages>
      <minNumberOfPages>22</minNumberOfPages>
      <maxNumberOfPages>500</maxNumberOfPages>
      <dimensionWidth>148</dimensionWidth>
      <dimensionHeight>210</dimensionHeight>
      <adjustedDimensionWidth>0.0</adjustedDimensionWidth>
      <adjustedDimensionHeight>0.0</adjustedDimensionHeight>
      <minDimensionWidth>105</minDimensionWidth>
      <minDimensionHeight>150</minDimensionHeight>
      <ignoreOrientation>false</ignoreOrientation>
      <minimumQuantity>1</minimumQuantity>
      <maximumQuantity>1000</maximumQuantity>
      <numberOfPrintsLeft>0</numberOfPrintsLeft>
      <addShipping>true</addShipping>
      <freeShipping>false</freeShipping>
      <sourceFileHost></sourceFileHost>
      <mustWaitForCompletion>false</mustWaitForCompletion>
      <dimensionUnit>mm</dimensionUnit>
      <elements>
        <name>cover</name>
        <url>cover</url>
      </elements>
      <elements>
        <name>content</name>
        <url>content</url>
      </elements>
      <catalogueItemCode>EU-glo-S-p</catalogueItemCode>
      <catalogueCategoryCode>glo</catalogueCategoryCode>
      <merchantApiKey>your-merchant-api-key</merchantApiKey>
      <applicationApiKey>your-application-api-key</applicationApiKey>
      <fixedSize>false</fixedSize>
      <checkoutDisplayIncVat>false</checkoutDisplayIncVat>
      <checkoutDisplayIncShipping>false</checkoutDisplayIncShipping>
      <defaultCurrency>EUR</defaultCurrency>
      <ratioDeviation>0.95</ratioDeviation>
      <shippingSupplements>
        <id>1089</id>
        <percentage>35</percentage>
        <quantity>20</quantity>
      </shippingSupplements>
      <shippingSupplements>
        <id>1090</id>
        <percentage>25</percentage>
        <quantity>100</quantity>
      </shippingSupplements>
      <shippingSupplements>
        <id>1091</id>
        <percentage>20</percentage>
        <quantity>250</quantity>
      </shippingSupplements>
      <quantityDiscounts>
        <id>794</id>
        <discount>15</discount>
        <minimumQuantity>10</minimumQuantity>
      </quantityDiscounts>
      <quantityDiscounts>
        <id>795</id>
        <discount>25</discount>
        <minimumQuantity>100</minimumQuantity>
      </quantityDiscounts>
      <quantityDiscounts>
        <id>839</id>
        <discount>35</discount>
        <minimumQuantity>500</minimumQuantity>
      </quantityDiscounts>
      <quantityDiscounts>
        <id>840</id>
        <discount>50</discount>
        <minimumQuantity>2000</minimumQuantity>
      </quantityDiscounts>
      <tieredPageDiscounts>
        <id>2</id>
        <discount>10</discount>
        <minimumNumberOfPages>100</minimumNumberOfPages>
      </tieredPageDiscounts>
      <tieredPageDiscounts>
        <id>3</id>
        <discount>20</discount>
        <minimumNumberOfPages>200</minimumNumberOfPages>
      </tieredPageDiscounts>
      <fixedPrice>false</fixedPrice>
    </offering>
  </offerings>
</root>

                      
                        
                      

Show a list of filtered offerings

This function allows you to filter the parameters of the offerings. You can use one or more of the following parameters to filter.

REQUEST

Parameters
applicationApiKey string

Unique string identifier of the application.

numberOfPages number

Filters the available offerings based on the minimum and maximum number of pages needed to print the document.

fileType string

Should be PDF, JPG, JPEG, GIF or PNG. When specifying PDF the width and height are in mm, otherwise it is in pixels.

width number -
height number -
recipientCountry string

Filters the available offerings based on the recipient country. Not all products can be sent to all countries. Use this to know for sure we can send an order to the recipient country.

currencies string

Expresses offering prices in various currencies. ALL returns all available currencies.

publicationId number

Unique string identifier of the publication.

RESPONSE

Headers
Content-Type application/xml
200 application/xml
                        
                        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
  <numberOfPages>56</numberOfPages>
  <minNrOfPages>4</minNrOfPages>
  <maxNrOfPages>1100</maxNrOfPages>
  <minAspectRatio>0.32626262</minAspectRatio>
  <maxAspectRatio>1.6429588</maxAspectRatio>
  <offerings>
    <offering>
      <id>1619281</id>
      <price>6.00</price>
      <countryShippingPrice>0.00</countryShippingPrice>
      <expressShippingPrice>0.00</expressShippingPrice>
      <regionShippingPrice>0.00</regionShippingPrice>
      <worldShippingPrice>0.00</worldShippingPrice>
      <pricePerPage>0.20</pricePerPage>
      <cheapestShippingPrice>3.50</cheapestShippingPrice>
      <name>Hardcover A4 (portrait)</name>
      <currency>EUR</currency>
      <priceByCurrency>
        <value baseAmount="6.00000" amount="6.00000" currency="EUR" rate="1.0"/>
        <value baseAmount="6.00000" amount="7.07220" currency="USD" rate="1.1787"/>
      </priceByCurrency>
      <pricePerPageByCurrency>
        <value baseAmount="0.20000" amount="0.20000" currency="EUR" rate="1.0"/>
        <value baseAmount="0.20000" amount="0.23574" currency="USD" rate="1.1787"/>
      </pricePerPageByCurrency>
      <cheapestShippingPriceByCurrency>
        <value baseAmount="3.50000" amount="3.50000" currency="EUR" rate="1.0"/>
        <value baseAmount="3.50000" amount="4.12545" currency="USD" rate="1.1787"/>
      </cheapestShippingPriceByCurrency>
      <vatPercentage>6</vatPercentage>
      <defaultNumberOfPages>0</defaultNumberOfPages>
      <minNumberOfPages>24</minNumberOfPages>
      <maxNumberOfPages>298</maxNumberOfPages>
      <dimensionWidth>210</dimensionWidth>
      <dimensionHeight>297</dimensionHeight>
      <adjustedDimensionWidth>210.0</adjustedDimensionWidth>
      <adjustedDimensionHeight>297.0</adjustedDimensionHeight>
      <minDimensionWidth>0</minDimensionWidth>
      <minDimensionHeight>0</minDimensionHeight>
      <ignoreOrientation>false</ignoreOrientation>
      <minimumQuantity>1</minimumQuantity>
      <maximumQuantity>1000</maximumQuantity>
      <numberOfPrintsLeft>-1</numberOfPrintsLeft>
      <addShipping>true</addShipping>
      <freeShipping>false</freeShipping>
      <sourceFileHost></sourceFileHost>
      <mustWaitForCompletion>false</mustWaitForCompletion>
      <dimensionUnit>mm</dimensionUnit>
      <elements>
        <name>cover</name>
        <url>cover</url>
      </elements>
      <elements>
        <name>content</name>
        <url>content</url>
      </elements>
      <catalogueItemCode>EU-hcl-M-p</catalogueItemCode>
      <catalogueCategoryCode>hch</catalogueCategoryCode>
      <merchantApiKey>your-merchant-api-key</merchantApiKey>
      <applicationApiKey>your-application-api-key</applicationApiKey>
      <fixedSize>true</fixedSize>
      <checkoutDisplayIncVat>false</checkoutDisplayIncVat>
      <checkoutDisplayIncShipping>false</checkoutDisplayIncShipping>
      <defaultCurrency>EUR</defaultCurrency>
      <ratioDeviation>0.95</ratioDeviation>
      <shippingSupplements>
        <id>1143</id>
        <percentage>35</percentage>
        <quantity>20</quantity>
      </shippingSupplements>
      <shippingSupplements>
        <id>1144</id>
        <percentage>30</percentage>
        <quantity>100</quantity>
      </shippingSupplements>
      <shippingSupplements>
        <id>1145</id>
        <percentage>25</percentage>
        <quantity>250</quantity>
      </shippingSupplements>
      <quantityDiscounts>
        <id>137</id>
        <discount>10</discount>
        <minimumQuantity>10</minimumQuantity>
      </quantityDiscounts>
      <quantityDiscounts>
        <id>392</id>
        <discount>15</discount>
        <minimumQuantity>50</minimumQuantity>
      </quantityDiscounts>
      <quantityDiscounts>
        <id>647</id>
        <discount>20</discount>
        <minimumQuantity>100</minimumQuantity>
      </quantityDiscounts>
      <tieredPageDiscounts>
        <id>32</id>
        <discount>10</discount>
        <minimumNumberOfPages>100</minimumNumberOfPages>
      </tieredPageDiscounts>
      <tieredPageDiscounts>
        <id>33</id>
        <discount>20</discount>
        <minimumNumberOfPages>200</minimumNumberOfPages>
      </tieredPageDiscounts>
      <fixedPrice>false</fixedPrice>
    </offering>
  </offerings>
</root>

                      
                        
                      

Get Offerings for a publication

A publication contains the information about the file that you want to print. Each of them has a unique id that you can use with this call to get all the offerings.

REQUEST

Parameters
publicationId string

Unique string identifier of the publication.

applicationApiKey string

Unique string identifier of the application.

RESPONSE

Headers
Content-Type application/xml
200 application/xml
                        
                        <?xml version="1.0"?>
<root>
<pricingExpireDate>2011-09-13T16:00:00.000+02:00</pricingExpireDate>
<offerings>
  <offering>
     <id>1</id>
     <price>1.00</price>
     <countryShippingPrice>0.00</countryShippingPrice>
     <regionShippingPrice>0.00</regionShippingPrice>
     <worldShippingPrice>0.00</worldShippingPrice>
     <pricePerPage>1.00</pricePerPage>
     <name>boek a5</name>
     <downloadLocation>http://cloud.peecho.com/1/</downloadLocation>
     <currency>EUR</currency>
     <priceByCurrency>
        <value amount="1.00" currency="EUR"/>
        <value amount="1.37" currency="USD"/>
     </priceByCurrency>
     <pricePerPageByCurrency>
        <value amount="0.00" currency="EUR"/>
        <value amount="0.00" currency="USD"/>
     </pricePerPageByCurrency>
     <countryShippingPriceByCurrency>
        <value amount="0.00" currency="EUR"/>
        <value amount="0.00" currency="USD"/>
     </countryShippingPriceByCurrency>
     <regionShippingPriceByCurrency>
        <value amount="0.00" currency="EUR"/>
        <value amount="0.00" currency="USD"/>
     </regionShippingPriceByCurrency>
     <worldShippingPriceByCurrency>
        <value amount="0.00" currency="EUR"/>
        <value amount="0.00" currency="USD"/>
     </worldShippingPriceByCurrency>
     <vatPercentage>19</vatPercentage>
     <defaultNumberOfPages>12</defaultNumberOfPages>
     <minNumberOfPages>0</minNumberOfPages>
     <maxNumberOfPages>100</maxNumberOfPages>
     <dimensionWidth>0</dimensionWidth>
     <dimensionHeight>0</dimensionHeight>
     <minimumQuantity>1</minimumQuantity>
     <addShipping>true</addShipping>
     <recommended>false</recommended>
     <dimensionUnit>mm</dimensionUnit>
     <elements>
        <id>1</id>
        <name>content</name>
        <url/>
     </elements>
     <elements>
        <id>2</id>
        <name>cover</name>
        <url>cover</url>
     </elements>
     <catalogueItemCode>boek a5</catalogueItemCode>
     <merchantApiKey>your-merchant-api-key</merchantApiKey>
     <applicationApiKey>your-application-api-key</applicationApiKey>
     <fixedSize>false</fixedSize>
  </offering>
</offerings>
</root>

                      
                        
                      
Place Order

With a digital file and a corresponding offering, you are able to place print orders. With the information provided through the API, we are able to take care of printing, shipping, as well as customer service for you. Once you have integrated with our print API, we take care of everything so you can relax and make money.

With Peecho’s Print API, there are three ways through which you can place an order.

New Order.

This call allows you to place an order without the need to immediately send a source file, also known as “asynchronous print”. This is ideal for situations in which an order is placed before a source file can be generated.

After using the “New Order” call, an order will we placed in our system. The order will first appear in OPEN state, with another call needed to set it to PAID. Once an order is payed, you can then provide the source file.

REQUEST

Parameters
merchantApiKey number

Unique string identifier of the merchant.

offeringId number

Unique integer identifier of your offering.

emailAddress string

Customer email address for order reference and optional customer service communication.

merchantReference string

Use your own internal id as a reference to couple this order to your internal systems.

paymentReference string

Reference for the payment provider, this should be a globally unique identifier. Use a UUID.

title string

API

locale string

The locale of the end customer. E-mails sent from our systems will be in this language. Defaults to English (‘en’).

currency string

The currency used to pay with. Defaults to Euro (‘EUR’).

spineColorHex string test123

This will give the spine of the printed book or magazine a solid color. Use hexadecimal notation .

RESPONSE

Headers
Content-Type application/xml
200 application/xml
                        
                        <?xml version="1.0"?>
<order>
<externalOrderId>4194</externalOrderId>
<signedPutUrl>http://peecho-test-order.s3.amazonaws.com</signedPutUrl>
<signedPutPath>1/4194/</signedPutPath>
<base64EncodedPolicy>encoded-policy </base64EncodedPolicy>
<signature>3XRuQ96XNs10porjx30=</signature>
<apiVersion>0</apiVersion>
<id>4194</id>
<orderState>OPEN</orderState>
<quantity>1</quantity>
</order>

                      
                        
                      

New order based on the URL

This call allows you to create an order from the URL of a source document (either PDF or image).

After using this call on your end, an order will we placed in our system. The order will first appear in OPEN state, with another call needed to set it to PAID. When using this call, you do need to send us a source file right away.

REQUEST

Parameters
merchantApiKey string

Unique string identifier of the merchant.

offeringId number

Unique integer identifier of your offering.

numberOfPages number

Filters the available offerings based on the minimum and maximum number of pages needed to print the document.

sourceUrl string

The full URL to the source document

sourceWidth number

The width in mm of the source PDF document.

sourceHeight number

The height in mm of the source PDF document.

coverSourceUrl string

The full URL to the cover. If not provided, the cover will be generated from the document. Please note, this parameter applies exclusively for hardcovers. The covers of matte and glossy magazines are always generated from the document.

spineSourceUrl string

The full URL to the spine.

filetype string

Should be PDF, JPG, JPEG, GIF or PNG. When specifying PDF the width and height are in mm, otherwise it is in pixels.

merchantReference string

Use your own internal id as a reference to link this order to your internal systems.

paymentReference string

Reference for the payment provider, this should be a globally unique identifier. Use a UUID.

title string

API

locale string

The locale of the end customer. E-mails sent from our systems will be in this language. Defaults to English (‘en’).

currency string

The currency used to pay with. Defaults to Euro (‘EUR’).

spineColorHex string

This will give the spine of the printed book or magazine a solid color. Use hexadecimal notation .

textColor string

Color of text on spine.

textSize string

Size of text on spine.

textCenter string

Text in the center part spine.

textTop string

Text in the top part spine.

textBottom string

Text in the bottom part spine.

fontFamily string

Font of spine text. (Arial, DarkCourier, Georgia, GochiHand, Helvetica, Tahoma, TimesNewRoman, Verdana)

RESPONSE

An XML representation of the new order including the policy and signature to be used when sending files to the order bucket.

Headers
Content-Type application/xml
200 application/xml
                        
                        <?xml version="1.0"?>
<order>
  <externalOrderId>4194</externalOrderId>
  <signedPutUrl>http://peecho-test-order.s3.amazonaws.com</signedPutUrl>
  <signedPutPath>1/4194/</signedPutPath>
  <base64EncodedPolicy>encoded-policy </base64EncodedPolicy>
  <signature>3XRuQ96XNs10porjx30=</signature>
  <apiVersion>0</apiVersion>
  <id>4194</id>
  <orderState>OPEN</orderState>
  <quantity>1</quantity>
</order>

                      
                        
                      

New order based on a publication

This call allows you to create an order from a publication uploaded in your Peecho account.

You first need to create the publication in our system before placing an order. To do so, create a Peecho account, login to the dashboard, and upload a publication. Once done, you can retrieve the publication ID from the URL of the publication’s detail page.

REQUEST

Parameters
merchantApiKey string

Unique string identifier of the merchant.

offeringId string

Unique integer identifier of your offering.

publicationId string

Unique integer identifier of your publication.

merchantReference string

Use your own internal id as a reference to link this order to your internal systems.

paymentReference string

Reference for the payment provider, this should be a globally unique identifier. Use a UUID.

title string

Publication title

RESPONSE

An XML representation of the new order including the policy and signature to be used when sending files to the order bucket.

Headers
Content-Type application/xml
200 application/xml
                        
                        <?xml version="1.0"?>
<order>
  <externalOrderId>4194</externalOrderId>
  <signedPutUrl>http://peecho-test-order.s3.amazonaws.com</signedPutUrl>
  <signedPutPath>1/4194/</signedPutPath>
  <base64EncodedPolicy>encoded-policy </base64EncodedPolicy>
  <signature>3XRuQ96XNs10porjx30=</signature>
  <apiVersion>0</apiVersion>
  <id>4194</id>
  <orderState>OPEN</orderState>
  <quantity>1</quantity>
</order>

                      
                        
                      
Set Details

Once an order has been placed, you have option of adding additional information.

Specifying additional details

For an existing order, you have the ability to adjust the first name, last name, shipping address, zip code, city, state and country.

The shipping address must have the following structure:

<?xml version="1.0"?>
<address>
    <firstName>recipientFirstName</firstName>
    <lastName>recipientLastName</lastName>
    <addressLine1>shippingAddressLine1</addressLine1>
    <addressLine2>shippingAddressLine2</addressLine2>
    <zipCode>shippingZipCode</zipCode>
    <city>shippingCity</city>
    <state>state</state>
    <country>Netherlands</country>
    <countryCode>NL</countryCode>
</address>

REQUEST

Parameters
externalOrderId string

Unique external string identifying the order.

shippingAddressXml string

XML representation of the shipping address.

emailAddress string

Customer email address for order reference and optional customer service communication.

billingAddressXml string

XML representation of the billing address.

customerName string

Name of the customer.

quantity number

Number of copies requested. Defaults to 1.

currency string

The currency used to pay with. Defaults to Euro (‘EUR’).

merchantReference string

Use your own internal id as a reference to link this order to your internal systems.

RESPONSE

Headers
Content-Type application/xml
200 application/xml
                        
                        OK

                      
                        
                      
Completing an order

To be completed, an order first needs to be marked as paid and you must provide a URL for us to retrieve the source file.

Set order as paid

Once an order is set as paid, the order is deemed complete. This step is only required if you use your own payment procedure rather than the Peecho checkout. If you choose, we are able to send a customized email to your customer to inform him / her when the order is completed and another when it is shipped.

Java:

String secretKey = "merchantSecretKey";
String merchantApiKey = "merchantApiKey";
String externalOrderId = "1234";
String data = merchantApiKey + externalOrderId;
Mac m = Mac.getInstance("HmacSHA1");
m.init(new SecretKeySpec(secretKey.getBytes("UTF-8"), "HmacSHA1"));
byte[] hash = m.doFinal(data.getBytes("UTF-8"));
String secret = new String(Base64.encodeBase64(hash));

/*
You get as result: LmzDnZGhdSI3D3aWXrQNcY0GDqI=

(using org.apache.commons.codec.binary for base64 and javax.crypto for Mac).
*/

REQUEST

Parameters
externalOrderId string

Unique external string identifying the order.

merchantApiKey string

Unique string identifier of the merchant.

secret string

Base64 encoded HMAC SHA1 Hash of merchantApiKey + externalOrderId using your merchantSecretKey as HMAC-key.

RESPONSE

Headers
                        
                        This service either returns 'ERROR' or 'OK'.

                      
                        
                      

Set source URL

Set the source URL of an order - only applicable for asynchronous source generation (if you generate a PDF after the order procedure has been completed).

String secretKey = "merchantSecretKey";
String externalOrderId = "1234";
String merchantReference = "merchantReference";
String sourceUrl = "http://somesourceurl.com/a.pdf"
String data = externalOrderId + merchantReference + sourceUrl;
Mac m = Mac.getInstance("HmacSHA1");
m.init(new SecretKeySpec(secretKey.getBytes("UTF-8"), "HmacSHA1"));
byte[] hash = m.doFinal(data.getBytes("UTF-8"));
String secret = new String(Base64.encodeBase64(hash));

/*
You get as result: MjavkJnEj5SrkHYWtO65KDWEw3M=

(using org.apache.commons.codec.binary for base64 and javax.crypto for Mac).
*/

REQUEST

Parameters
orderId string

The Peecho order identification.

sourceUrl string

The full URL to the source document

merchantApiKey string

Unique string identifier of the merchant.

secret string

Base64 encoded HMAC SHA1 Hash of externalOrderId + merchantReference + sourceUrl using your merchantSecretKey as HMAC-key.

backgroundColor string

Background color of spine.

textColor string

Color of text on spine.

textSize string

Size of text on spine.

textCenter string

Text in the center part spine.

textTop string

Text in the top part spine.

textBottom string

Text in the bottom part spine.

fontFamily string

Font of spine text. (Arial, DarkCourier, Georgia, GochiHand, Helvetica, Tahoma, TimesNewRoman, Verdana)

spineSourceUrl string

The full URL to the spine.

RESPONSE

Headers
                        
                        This service either returns 'OK' or an error status.

                      
                        
                      
Request status

You are able to request the status of your order through the dashboard. Orders can have different statuses in our system. When the order is “open”, placing of the order has not yet been finalized. When the order is “in moderation”, our customer happiness team will check if the file has been processed correctly and suitable for print. When an order moves to “in production”, the print facility has received it and is working on printing the product. Status “shipped” means the order has been shipped from the print facility. Usually shipping can take up to 5 working days to get to your customers doorstep.

If something is wrong with the order, there is the possibility to cancel the order before it is sent to the production facility. If done, the status will be appear as “cancelled”.

In the unlikely case we receive complaints from your customers about printing mistakes, we will discuss with your customer if they prefer us to send them a new copy (the order will end up “in production” again) or if they would like to receive a refund, then the order status will become “refunded”.

Get order state

Display the current order state.

REQUEST

Parameters
merchantApiKey string

Unique string identifier of the merchant.

externalOrderId string

Unique external string identifying the order.

paymentReference string

Reference for the payment provider, this should be a globally unique identifier. Use a UUID.

RESPONSE

An XML representation of the order, including status.

Headers
                        
                        <?xml version="1.0"?>
<orderState>
<externalOrderId>4194</externalOrderId>
<paymentReference>payment reference</paymentReference>
<merchantReference>some reference</merchantReference>
<orderState>MODERATION</orderState>
<price>0.00</price>
<priceRetail>1.00</priceRetail>
<priceWholesale>1.00</priceWholesale>
<shippingRetail>0.00</shippingRetail>
<shippingWholesale>0.00</shippingWholesale>
<vat>0.00</vat>
<created>2011-09-27T14:25:54.000+02:00</created>
<quantity>1</quantity>
<title>title</title>
<shipping>
    <firstName>John</firstName>
    <lastName>Doe</lastName>
    <street>42 first street</street>
    <zipCode>11111</zipCode>
    <city>New York</city>
    <state>NY</state>
    <countryCode>US</countryCode>
    <country>United States</country>
</shipping>
<history>
    <historyEntry>
        <entryDate>2013-04-24T12:53:13.000+02:00</entryDate>
        <why>set_paid rest api call</why>
        <state>PAID</state>
    </historyEntry>
    <historyEntry>
        <entryDate>2013-04-24T13:06:46.000+02:00</entryDate>
        <state>MODERATION</state>
    </historyEntry>
</history>
</orderState>

                      
                        
                      
Update shipping address

After placing an order, you can still modify the shipping address. You can adjust the first name, last name, shipping address, zip code, city, state and country.

Update address

Update the order shipping address.

The shipping address must have the following structure:

<?xml version="1.0"?>
<address>
    <firstName>recipientFirstName</firstName>
    <lastName>recipientLastName</lastName>
    <addressLine1>shippingAddressLine1</addressLine1>
    <addressLine2>shippingAddressLine2</addressLine2>
    <zipCode>shippingZipCode</zipCode>
    <city>shippingCity</city>
    <state>state</state>
    <country>Netherlands</country>
    <countryCode>NL</countryCode>
</address>

REQUEST

Parameters
orderId string

Unique string identifier of the order.

merchantApiKey string

Unique string identifier of the merchant.

shippingAddressXml string

XML representation of the shipping address. <?xml version=“1.0”?>

recipientFirstName recipientLastName shippingAddressLine1 shippingAddressLine2 shippingZipCode shippingCity state Netherlands NL

RESPONSE

Headers
Add comment

After placing an order, you can add comments to inform us about specific information on the order. When adding a comment to an order, it will only be seen by Peecho employees. Be aware, it is always faster to send an email to support@peecho.com.

Adding a comment

You can supply additional comments to your orders that can be viewed in dashboard order “Details” page.

REQUEST

Parameters
orderId string

Unique string identifier of the order.

comment string

Comment text with maximum of 250 characters.

merchantApiKey string

Unique string identifier of the merchant.

RESPONSE

Headers
Approve order

Use this call to approve your orders if you moderate the orders yourself before sending to production. You can compare the source file with the processed file to be sure it will be printed correctly, then approve it for production yourself. But it is free to let moderations be done by our customer happiness team. They have years of experience and will always be nice to your customers.

Approve order

Set the order as approved and send it to production.

REQUEST

Parameters
orderId string

Unique string identifier of the order.

merchantApiKey string

Unique string identifier of the merchant.

RESPONSE

Headers
Put order on hold

Use this call to put your orders on hold if you moderate them. You can do this when you need to check something with your customer before you send it to production.

Put order on hold

Set the order state as on hold.

REQUEST

Parameters
orderId string

Unique string identifier of the order.

merchantApiKey string

Unique string identifier of the merchant.

RESPONSE

Headers
Download print-ready files

Use this call if you want to download the print-ready processed files to compare with the original file before sending the order to print.

Download print-ready files

Retrieve the download URL of the processed PDF files.

REQUEST

Parameters
orderId string

Unique string identifier of the order.

merchantApiKey string

Unique string identifier of the merchant.

RESPONSE

A JSON representation of the print-ready files containing its download URLs.

Headers
Content-Type application/json
200 application/json
                        
                        {
  "cover":"cover-download-url",
  "content":"content-download-url"
}