Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Spine Calculation Integration

http service

May 2008
Release v1.21
Business with Lightning Source: Part 9 – Guide 1
e
Lightning Source, Inc. – Business Confidential

© 2003 - 2008 by Lightning Source Incorporated,


an Ingram Industries company

All rights reserved

Commercial publishing customers of Lightning Source, Incorporated may


distribute this documentation internally and under the terms of Non-Disclosure
with Lightning Source, Incorporated for the purposes of integrating with
Lightning Source, Incorporated fulfillment systems and services.
For information about additional permission to reproduce portions of this
documentation, please write to Office of the Chief Technology Officer,
Lightning Source, Incorporated, 1246 Heil Quaker Blvd, La Vergne, TN 37086.

eBusiness with Lightning Source: Part 9 – Guide 1


Spine Calculation Integration

9.1 eBusiness with Lightning Source – Spine Calculation 04/04/08) Page 2


Lightning Source, Inc. – Business Confidential

Table of Contents

1 Introduction .....................................................................................................4

2 Integration Overview ......................................................................................5

3 Integration Detail ............................................................................................6


3.1 Request Transaction (http call to LSI) ......................................................7
3.2 Response Transaction (http response from LSI) .......................................8
3.3 Examples...................................................................................................8
3.3.1 Valid Request............................................................................................ 8
3.3.2 Invalid Requests........................................................................................ 9
3.3.2.1 Example 1.............................................................................................................. 9
3.3.2.2 Example 2.............................................................................................................. 9
3.3.2.3 Example 3.............................................................................................................. 9

9.1 eBusiness with Lightning Source – Spine Calculation 04/04/08) Page 3


Lightning Source, Inc. – Business Confidential

1 Introduction

Lightning Source Inc. (LSI) provides digital content distribution, wholesale and
print services to the publishing and commercial industries. This document is part
of a series of documents, eBusiness with Lightning Source, which describe how
to integrate appropriate information systems with LSI. Its purpose is to introduce
the various interfaces which are available to LSI partners.
This Integration Manual describes the policies and procedures for integrating a
website with the Spine Calculator service provided by LSI. This Integration
Manual is intended to be a “living document” that will be periodically updated and
distributed by LSI as required.

9.1 eBusiness with Lightning Source – Spine Calculation 04/04/08) Page 4


Lightning Source, Inc. – Business Confidential

2 Integration Overview
LSI customers submitting digitally certified1 content to LSI need to use templates
and spine calculations which match the standards used by LSI for automated
content import. For customers whose content creation steps are automated, LSI
provides a web-based Spine Calculator Service. A typical application is
illustrated below.

Author
Online
Content
Creation
Spine Calculation Integration

“Hidden” http request


(book parameters)

Publisher

“Hidden” http response


(<Value> or <Error>)

Publisher

Digitally Certified Content


(via LSI website or
automated content submission)

Publisher

1
Digitally certified content is content which has been specially formatted to minimize or eliminate
manual processing during the setup process. Please refer to the LSI Operating Manual and/or
your LSI Customer Service representative for additional information on digital certification for
content submission.

9.1 eBusiness with Lightning Source – Spine Calculation 04/04/08) Page 5


Lightning Source, Inc. – Business Confidential

3 Integration Detail
To obtain a Spine Calculation Value, an http or https “transaction” is sent to the
LSI Spine Calculator Service. LSI’s Spine Calculator Service then replies with an
http page containing either the value requested or an error.

NOTE:
In addition to the integration described in detail below, a fully SOAP-complaint
URL is available at:
http://www.lightningsource.com/LSISecure/PubResources/SOAP/SpineCalc.asmx
The methods available via the SOAP URL will return double precision numbers
for the results, and throw SOAP exceptions in error cases.

9.1 eBusiness with Lightning Source – Spine Calculation 04/04/08) Page 6


Lightning Source, Inc. – Business Confidential

3.1 Request Transaction (http call to LSI)


The request transaction should have the following form:
http://www.lightningsource.com/LSISecure/PubResources/
SpineCalc.asmx/CalculateSpineWidthForBookTypeId?BookTypeId=<boo
ktypeid> &PageCount=<nnn>&Units=<units>
where:
• <booktypeid> indicates which style of book is being created; the following
table demonstrates some of the valid values:
<booktypeid>
Value Description
4 5 x 8 in or 203 x 127 mm Perfect Bound
43 5.5 x 8.5 in or 216 x 140 mm (Demy 8vo) Blue Cloth w/Jacket
44 5.5 x 8.5 in or 216 x 140 mm (Demy 8vo) Case Laminate
46 5.5 x 8.5 in or 216 x 140 mm (Demy 8vo) Gray Cloth w/Jacket
1 5.5 x 8.5 in or 216 x 140 mm (Demy 8vo) Perfect Bound
8 6 x 9 in or 229 x 152 mm Blue Cloth w/Jacket
9 6 x 9 in or 229 x 152 mm Case Laminate
11 6 x 9 in or 229 x 152 mm Gray Cloth w/Jacket
2 6 x 9 in or 229 x 152 mm Perfect Bound
49 6.14 x 9.21 in or 234 x 156 mm (Royal 8vo) Perfect Bound
54 6.14 x 9.21in or 234 x 156mm (Royal 8vo) Blue Cloth w/Jacket
52 6.14 x 9.21in or 234 x 156mm (Royal 8vo) Case Laminate
56 6.14 x 9.21in or 234 x 156mm (Royal 8vo) Gray Cloth w/Jacket
67 6.69 x 9.61 in or 244 x 170 mm (Pinched Crown) Perfect Bound
68 7 x 10 in or 254 x 178 mm Case Laminate
66 7 x 10 in or 254 x 178 mm Perfect Bound
50 7.44 x 9.69 in or 246 x 189 mm (Crown 4vo) Perfect Bound
3 7.5 x 9.25 in or 235 x 191 mm Perfect Bound
6 8.25 x 11 in or 280 x 210 mm Perfect Bound
64 8.268 x 11.693 in or 297 x 210 mm (A4) Perfect Bound
83 8.5 x 11 in or 280 x 216 mm Full Color Perfect Bound (48-480 page book)
82 8.5 x 11 in or 280 x 216 mm Full Color Saddle Stitch (4-47 page Booklet)
81 8.5 x 8.5 in or 216 x 216 mm Full Color Perfect Bound (48-480 page book)
80 8.5 x 8.5 in or 216 x 216 mm Full Color Saddle Stitch (4-47 page Booklet)

NOTE:
New book types are added from time to time by LSI. Please check with your
customer service representative if you need to calculate a spine width for a
book type not listed above.

• <nnn> is the total number of pages, including front and back matter, of your
book; do not include the cover in your count
• <units> indicates whether inches or millimeters will be returned
o set <units> = “mm” to receive millimeters
o set <units> = “in” to receive inches

9.1 eBusiness with Lightning Source – Spine Calculation 04/04/08) Page 7


Lightning Source, Inc. – Business Confidential

3.2 Response Transaction (http response from LSI)


The response transaction will have the following form:
<?xml version="1.0" encoding="utf-8"?>
<CalculationResult xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://webservices.lightningsource.com/BookSpineCalculator">
<Value>nn.nnn</Value>
</CalculationResult>
where <nn.nnn> is the spine calculation, to 3 significant digits, in the units
requested.
Should any parameter be invalid, the response transaction will generate an error
with following form:
<?xml version="1.0" encoding="utf-8"?>
<CalculationResult xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://webservices.lightningsource.com/BookSpineCalculator">
<Error>error text</Error>
<Value>0</Value>
</CalculationResult>

3.3 Examples

3.3.1 Valid Request


Request:
http://www.lightningsource.com/LSISecure/PubResources/SpineCalc.asmx/
CalculateSpineWidthForBookTypeId?BookTypeId=52&PageCount=500&
Units=mm
Response:
<?xml version="1.0" encoding="utf-8"?>
<CalculationResult xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://webservices.lightningsource.com/BookSpineCalculator">
<Value>28.575</Value>
</CalculationResult>

9.1 eBusiness with Lightning Source – Spine Calculation 04/04/08) Page 8


Lightning Source, Inc. – Business Confidential

3.3.2 Invalid Requests


3.3.2.1 Example 1
Request:
http://www.lightningsource.com/LSISecure/PubResources/SpineCalc.asmx/
CalculateSpineWidthForBookTypeId?BookTypeId=52&PageCount=0&Uni
ts=mm
Response:
<?xml version="1.0" encoding="utf-8"?>
<CalculationResult xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://webservices.lightningsource.com/BookSpineCalculator">
<Error>Please enter a page count between 108 and 828</Error>
<Value>0</Value>
</CalculationResult>

3.3.2.2 Example 2
Request:
http://www.lightningsource.com/LSISecure/PubResources/SpineCalc.asmx/
CalculateSpineWidthForBookTypeId?BookTypeId=badbooktype&PageCou
nt=100&Units=in
Response:
<?xml version="1.0" encoding="utf-8"?>
<CalculationResult xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://webservices.lightningsource.com/BookSpineCalculator">
<Error>Invalid book type id: badbooktype</Error>
<Value>0</Value>
</CalculationResult>

3.3.2.3 Example 3
Request:
http://www.lightningsource.com/LSISecure/PubResources/SpineCalc.asmx/
CalculateSpineWidthForBookTypeId?BookTypeId=1&PageCount=100&U
nits=badunits
Response:
<?xml version="1.0" encoding="utf-8"?>
<CalculationResult xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://webservices.lightningsource.com/BookSpineCalculator">
<Error>Invalid units requested - please specify in for inches or mm
for millimeters</Error>
<Value>0</Value>
</CalculationResult>

9.1 eBusiness with Lightning Source – Spine Calculation 04/04/08) Page 9

You might also like