Skip to content

Check a cover PDF at Lulu

POST
/api/v1/lulu/validations/cover
curl --request POST \
--url https://digize.com/api/v1/lulu/validations/cover \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "sourceUrl": "https://example.com", "podPackageId": "example", "pageCount": 1 }'

Starts Lulu checking a cover PDF at a public https address against the book it’s for (its SKU and the interior’s page count, which set the spine). Read the result with lulu.validate.result. Free.

Needs the commerce:read permission.

Idempotency-Key
string
>= 1 characters <= 255 characters

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-1f2d3c4b5a69
Media typeapplication/json
object
sourceUrl
required
string format: uri
<= 2000 characters
podPackageId
required

Lulu’s POD package id for the book, such as 0600X0900.BW.STD.PB.060UW444.MXX (6 × 9 in, black and white, standard, paperback, 60# white paper, matte cover); lulu.products lists common ones. The older 27-character form without dots is taken too.

string
>= 1 characters <= 100 characters
pageCount
required

The interior’s pages, counting both sides of each sheet.

integer
>= 1 <= 1200

Example generated

{
"sourceUrl": "https://example.com",
"podPackageId": "example",
"pageCount": 1
}

Done

Media typeapplication/json
object
id
required

Lulu’s id for the check, for lulu.validate.result.

string
kind
required
string
Allowed values: interior cover
sourceUrl
required
string
status
required

VALIDATING or NORMALIZING while Lulu works, VALIDATED or NORMALIZED once the file is fine, ERROR when it isn’t.

string | null
done
required
boolean
ok
required
boolean
errors
required
Array<string>
pageCount
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
validPodPackageIds
required

For an interior: the SKUs it fits, when Lulu says.

Array<string>

Example

{
"kind": "interior"
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

A request with the same Idempotency-Key is still running (conflict).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The Idempotency-Key was used with a different request.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}