Build a book
const url = 'https://digize.com/api/v1/books/example/builds';const options = { method: 'POST', headers: { 'Idempotency-Key': '5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69', 'x-api-key': '<x-api-key>', 'Content-Type': 'application/json' }, body: '{"podPackageId":"example","coverOnly":false}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://digize.com/api/v1/books/example/builds \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \ --header 'x-api-key: <x-api-key>' \ --data '{ "podPackageId": "example", "coverOnly": false }'Sets the book as it is now to print and ebook files, in the background: the interior PDF at its trim and theme, the cover (sized by Lulu for a Lulu SKU, by KDP’s rule otherwise) and the EPUB. It’s building at first; list the builds to see when it’s ready. Refused while another build of the book is going. With coverOnly, only the cover is set, for a look at it (books.cover.get shows it), and it isn’t listed with the builds.
Needs the books:write permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Makes the request safe to send again: for 24 hours the same key and request answer the first response without repeating the change.
Example
5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Done
object
building while the Workflow sets it, then ready or failed.
The spine’s width, in points.
The whole cover (back, spine and front, with bleed), in points.
A build of the cover alone, for the Cover tab’s preview: no interior or EPUB, the spine sized for the last build’s pages or the words’.
object
object
object
object
object
object
object
object
object
object
object
Words meant for the author left on the page: a writer’s marker, or a note about checking facts or publishing.
object
A figure’s caption or words call the author by name in a book told in the first person.
object
The text mentions a part the book doesn’t have, such as a foreword or a chapter past the last.
object
A chart’s or diagram’s smallest words print under 7 pt at its printed size.
object
object
Example
{ "status": "building", "coverRule": "lulu", "trim": "5x8", "theme": "classic", "warnings": [ { "kind": "sample" } ]}What was sent isn’t valid (invalid).
object
object
object
Example
{ "error": { "code": "invalid" }}No key, or one that’s unknown, off or expired.
object
object
object
Example
{ "error": { "code": "invalid" }}The key doesn’t have the permission this needs.
object
object
object
Example
{ "error": { "code": "invalid" }}Nothing has that id (not_found).
object
object
object
Example
{ "error": { "code": "invalid" }}A request with the same Idempotency-Key is still running (conflict).
object
object
object
Example
{ "error": { "code": "invalid" }}The Idempotency-Key was used with a different request.
object
object
object
Example
{ "error": { "code": "invalid" }}Over the rate limit; see retry-after.
object
object
object
Example
{ "error": { "code": "invalid" }}