/collection/importsSend a collection file (our own export, CLZ Comics, League of Comic Geeks, or any sheet with a series or title column) as CSV text or as rows, up to 25,000 rows; send a large one gzip-compressed (Content-Encoding: gzip, up to 32 MiB inflated). It’s matched to the catalog and its copies added in the background, the way the import screen does it: poll GET /collection/imports/{id} until it’s complete, then GET /collection/imports/{id}/rows for what became of each row. Copies are keyed by what each row says, so sending the same file again, or a newer export of the same collection, adds only what’s new. Rows more than one series could match are held back unless needsReview is import; books the catalog doesn’t have yet are left out. With review, it stops after matching instead: read its rows, then commit it with your choices (POST /collection/imports/{id}/commit) or cancel it. Undo the whole import with POST /collection/imports/{id}/undo. Counts against the daily bulk quota.
collector.createCollectionImport()collection:writeIdempotency-KeyX-Request-Idobject
csvstringThe file as CSV text, header first (comma, semicolon or tab separated). Our own export, CLZ Comics and League of Comic Geeks exports are recognised; any sheet with a series or title column works. Send csv or rows.
1–26214400 characters
rowsarray of array of stringThe rows as cells, header first: up to 25,000 rows after it. Send csv or rows.
2–25001 items
fileNamestringThe file’s name, shown in your import history.
1–255 characters
defaultStatusenumRows without a status column become copies you own, or wishes.
default "owned"
ownedwishlistneedsReviewenumRows more than one series could match (no year or volume to tell them apart): held back for you to check (skip), or imported as the best guess (import).
default "skip"
skipimportreviewbooleanStop after matching: the import waits in review until you commit it (POST /collection/imports/{id}/commit) with your choices (rows to leave out, another series for a row, books to add to the catalog), or cancel it. Without it, the matched rows are imported straight away.
default false
fileHashstringThe original file’s SHA-256 (hex), when you send rows read from it (an .xlsx): the import is recorded under it, as the import screen records a file. Otherwise it’s the hash of what you send.
202AcceptedThe import, queued.
object
invalid_requestinvalid_jsoninvalid_encodinginvalid_idempotency_key
invalid_request: The query or body doesn’t match the schema (see errors[]).
invalid_json: The body isn’t JSON.
invalid_encoding: The body says Content-Encoding: gzip but isn’t gzip.
invalid_idempotency_key: The Idempotency-Key isn’t 1–255 visible ASCII characters.
unauthorized: Not signed in (no session or token, or an expired one).
idempotency_in_progressimports_busy
idempotency_in_progress: The first request with this key is still running.
imports_busy: Three of your imports are still running.
payload_too_large: The body is over 4,194,304 bytes, this operation’s limit, or over 33,554,432 bytes once inflated (Content-Encoding: gzip).
idempotency_key_reusedimport_emptyimport_too_largeimport_unreadable
idempotency_key_reused: This key was used for a different request.
import_empty: No header row, or no rows after it.
import_too_large: More than 25,000 rows: send it in parts.
import_unreadable: No series or title column (or catalog ids) to match rows by, or a cell far too long.
rate_limitedtemporarily_blockedquota_exceededimport_rate_limited
rate_limited: Over the caller’s limit: the per-minute burst or the per-day quota (RateLimit headers; wait Retry-After seconds).
temporarily_blocked: Too many refused requests in a row: blocked for a while (Retry-After says how long).
quota_exceeded: Over this operation’s daily quota (the "bulk" bucket).
import_rate_limited: Thirty imports in the last hour, from the app included.
internal: Something went wrong on our side (quote the requestId).
not_available: Imports aren’t available on this deployment.
not_migrated: A review, or more than 10,000 rows, before the database update for them is applied.