Product Queries

A product is defined by three attributes: paper, format and binding (e.g. 90g white, DIN A4, hardcover). Not all combinations of these three attributes are technically possible, so a given combination may not exist as a product.

Product specification query

This interface is used to list all products (all possible combinations of the attributes above). Each product also has a numeric ID, which is used for ordering. New products may be added over time, and existing ones may become unavailable, but one product ID will always reference the same product (not the other way round).

For every product, attributes like printing area and paper weight are given. These attributes have to be considered for the correct formatting of the PDFs (especially the cover). For more information about this topic, see our products webpage.

Request

  • Method: GET
  • URL: https://www.epubli.de/api/partner/products/list.xml
  • Parts:
    • partner: partner name
  • Reply: 'epubli_products' in XML (see example) or 'epubli_api_error'

Example

  • URL: https://www.epubli.de/api/demo/products/list.xml
  • Reply:
  • <?xml version="1.0" encoding="UTF-8"?>
    <epubli_products xmlns="http://www.epubli.de/spec" version="1.0">
      <product id="1">
    
        <attributes>
          <paper>
            <description>90g weiß, matt</description>
            <grammature>90</grammature>
          </paper>
          <format>
            <description>DIN A4 hoch (21,0 x 29,7 cm)</description>
            <height>297</height>
            <width>210</width>
          </format>
          <binding>
            <description>Hardcover</description>
          </binding>
        </attributes>
    
        <bleed>
          <cover>
            <top>11</top>
            <bottom>11</bottom>
            <inner>0</inner>
            <outer>11</outer>
          </cover>
          <content>
            <top>3</top>
            <bottom>3</bottom>
            <inner>3</inner>
            <outer>3</outer>
          </content>
          <spine>
            <top>17</top>
            <bottom>17</bottom>
          </spine>
        </bleed>
    
        <options>
          <cover_surface>
            <cover_surface id="1">matt</cover_surface>
            <cover_surface id="2">glossy</cover_surface>
          </cover_surface>
          <content_color>
            <content_color id="1">bw</content_color>
            <content_color id="2">4c</content_color>
          </content_color>
        </options>
    
        <limits>
          <page_min>36</page_min>
          <page_max>960</page_max>
        </limits>
    
      </product>
    
      <product id="3">
        ...
      <epubli_products>
    

Product properties

For a given product (by ID), number of pages and color attribute (4c or bw), this interface will provide information about the finished book with these properties. The requests to this interface has to be authenticated.

The response contains the following information: list price (excl. VAT), spine width, weight and the actual number of pages. For hard- and soft-cover products, the information about the spine width needs to be considered for the spine PDF. The price given is the net price per copy.

Request

  • Method: POST
  • URL: https://www.epubli.de/api/partner/product/productId/pagecount_pages_colors_copies_copies.xml
  • Parts:
    • partner: partner name
    • productId: product number (see product specifications)
    • pagecount: number of pages
    • colors: colored (4c) or black and white (bw)
    • copies: number of copies
  • POST parameters: authentication parameters
  • Reply: 'product_calculation' in XML (see example) or 'epubli_api_error'

Example

  • URL: https://www.epubli.de/api/demo/product/1/35_pages_4c_1_copies.xml
  • Reply:
  • <?xml version="1.0" encoding="UTF-8"?>
    <product_calculation xmlns="http://www.epubli.de/spec" version="1.0" >
    
      <attributes>
        <product id="1">
          <paper>90g weiß, matt</paper>
          <format>DIN A4 hoch (21,0 x 29,7 cm)</format>
          <binding>Hardcover</binding>
        </product>
        <pages>36</pages>
        <color>4c</color>
        <copies>1</copies>
      </attributes>
    
      <results>
        <spine unit="mm">5.2972</spine>
        <weight unit="g">1023</weight>
      </results>
    
      <price unit="EUR">
        <net>18.5</net>
      </price>
    
    </product_calculation>
    

    « Back to the API menu