Skip to content

Change a listing

PATCH
/api/v1/books/listings/{id}
curl --request PATCH \
--url https://digize.com/api/v1/books/listings/example \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "label": "example", "url": "https://example.com", "externalId": "example", "price": 1, "currency": "example", "status": "draft", "checklist": [ "example" ] }'

Changes a listing: its address, ID, price, the checklist steps done, or its status. Marking it live publishes the book and tells automations and webhooks (books.book.published); a book with no live listing left goes back to ready.

Needs the books:write permission.

id
required
string
>= 1 characters <= 64 characters
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
label

For other: the store’s name, such as Kobo.

string
<= 60 characters
url
Any of:
string format: uri
<= 2000 characters
externalId
Any of:
string
<= 40 characters
price
Any of:
integer
<= 100000000
currency

Left out, the workspace’s.

string
>= 3 characters <= 3 characters
status
string
Allowed values: draft live
checklist

The checklist steps done, by id.

Array<string>
<= 20 items

Done

Media typeapplication/json
object
id
required
string
bookId
required
string
store
required

store the workspace’s own, lulu the Lulu Bookstore, amazon (KDP), ingramspark, or other.

string
Allowed values: store lulu amazon ingramspark other
kind
required
string
Allowed values: print ebook
label
required

Another store’s own name.

string
storeLabel
required
string
url
required
string | null
externalId
required

Its ID there: an ASIN at Amazon, the ISBN at IngramSpark.

string | null
price
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
currency
required
string
status
required

live once readers can buy it there: the book is published.

string
Allowed values: draft live
productId
required
string | null
exportKey
required
string | null
checklist
required

The checklist steps ticked off.

Array<string>
steps
required

The store’s checklist.

Array<object>
object
id
required
string
title
required
string
detail
required
string
done
required
boolean
liveAt
required
Any of:
string format: date-time
createdAt
required
string format: date-time
updatedAt
required
string format: date-time

Example

{
"store": "store",
"kind": "print",
"status": "draft"
}

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"
}
}