API reference / Collectors
A collector’s copies: what each copy is (issue, edition, variant) and its history, the codes on it, bulk changes, imports and the full export.
/api/v1/collection/exportThe whole collection as a file download, streamed: CSV (with a UTF-8 byte order mark, for spreadsheets) or JSON ({ format, version, exported_at, columns, items }). The columns round-trip through the importer. 20 exports an hour.
collector.exportCollection()collection:read(API keys are coming soon)X-Request-Id| Name | In | Type | About |
|---|---|---|---|
formatoptional | query | enum | Default csv.One of csv, json |
statusoptional | query | enum | Only copies in this state.One of owned, wishlist, sold |
string
invalid_request: The query or body doesn’t match the schema (see errors[]).
unauthorized: Not signed in (no session or token, or an expired one).
rate_limited: More than 20 exports an hour; wait the Retry-After seconds.
internal: Something went wrong on our side (quote the requestId).
curl 'https://collection.id/api/v1/collection/export' \
-H "Authorization: Bearer $COLLECTOR_TOKEN"await collector.exportCollection({ query: { … } });/api/v1/collection/imports/{id}/undoRemoves the copies an import created that haven’t been edited since, with their photos, on every plan. Copies you added photos to stay unless includePhotographed is true. The body is optional. A very large import may answer done: false: call again to continue.
collector.undoCollectionImport()collection:write(API keys are coming soon)X-Request-Id| Name | In | Type | About |
|---|---|---|---|
idrequired | path | string (uuid) | The import’s id. |
object
includePhotographedbooleanoptionaldefault falseobject
idstring (uuid)requiredThe import.
removedintegerrequiredCopies removed by this request.
removedTotalintegerrequiredCopies removed by the whole undo so far.
remainingintegerrequiredCopies still to remove: call again while done is false.
donebooleanrequiredkeptEditedintegerrequiredCopies kept because they were edited after the import.
keptPhotographedintegerrequiredCopies kept because you added photos to them.
photosRemovedintegerrequiredinvalid_request: The query or body doesn’t match the schema (see errors[]).
invalid_json: The body isn’t JSON.
unauthorized: Not signed in (no session or token, or an expired one).
not_found: Nothing at that address.
import_not_found: No import of yours with that id.
import_already_undone: The import was already undone.
undo_window_passed: Imports can be undone for a limited time only.
internal: Something went wrong on our side (quote the requestId).
not_available: Undo isn’t available until a database update is applied.
curl -X POST 'https://collection.id/api/v1/collection/imports/<id>/undo' \
-H "Authorization: Bearer $COLLECTOR_TOKEN" \
-H 'Content-Type: application/json' \
-d @body.jsonawait collector.undoCollectionImport({ path: { id }, body: { … } });/api/v1/collection/items/{id}/changesThe copy’s issue and variant changes, newest first.
collector.listCopyChanges()collection:read(API keys are coming soon)If-None-MatchX-Request-Id| Name | In | Type | About |
|---|---|---|---|
idrequired | path | string (uuid) |
object
Newest first.
unauthorized: Not signed in (no session or token, or an expired one).
not_found: Nothing at that address.
internal: Something went wrong on our side (quote the requestId).
curl 'https://collection.id/api/v1/collection/items/<id>/changes' \
-H "Authorization: Bearer $COLLECTOR_TOKEN"await collector.listCopyChanges({ path: { id } });/api/v1/collection/items/{id}/changes/{changeId}/undoPuts the copy back as it was before the change. Only its latest change can be undone.
collector.undoCopyChange()collection:write(API keys are coming soon)Idempotency-KeyX-Request-Id| Name | In | Type | About |
|---|---|---|---|
idrequired | path | string (uuid) | |
changeIdrequired | path | string (uuid) |
object
changedbooleanrequiredFalse when the copy already was that.
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).
not_found: Nothing at that address.
idempotency_in_progress: The first request with this key is still running.
already_undone: That change was already undone.
cannot_undo: Only the copy’s latest change can be undone.
changed_since: The copy changed since; undo the later change first.
idempotency_key_reused: This key was used for a different request.
internal: Something went wrong on our side (quote the requestId).
not_migrated: The database update this needs isn’t applied yet.
curl -X POST 'https://collection.id/api/v1/collection/items/<id>/changes/<changeId>/undo' \
-H "Authorization: Bearer $COLLECTOR_TOKEN" \
-H "Idempotency-Key: $(uuidgen)"await collector.undoCopyChange({ path: { id, changeId } });/api/v1/collection/items/{id}/codesBarcodes, ISBNs, ISSNs and distributor codes added to the copy, with their review.
collector.listCopyCodes()collection:read(API keys are coming soon)If-None-MatchX-Request-Id| Name | In | Type | About |
|---|---|---|---|
idrequired | path | string (uuid) |
object
unauthorized: Not signed in (no session or token, or an expired one).
not_found: Nothing at that address.
internal: Something went wrong on our side (quote the requestId).
curl 'https://collection.id/api/v1/collection/items/<id>/codes' \
-H "Authorization: Bearer $COLLECTOR_TOKEN"await collector.listCopyCodes({ path: { id } });/api/v1/collection/items/{id}/codesKeeps a code the catalog doesn’t know on the copy (yours to search and scan at once) and sends it for review; once approved, it matches for everyone. Check it first: a code the catalog knows changes what the copy is instead (repoint). 30 codes a day.
collector.addCopyCode()collection:write(API keys are coming soon)Idempotency-KeyX-Request-Id| Name | In | Type | About |
|---|---|---|---|
idrequired | path | string (uuid) |
object
textstringrequired1–60 charactersaddOnstring or nulloptionalat most 5 charactersformatstring or nulloptionalat most 20 characterskindenum or nulloptionalOne ofupcisbnissndistributor
notestring or nulloptionalat most 1000 charactersobject
invalid_request: The query or body doesn’t match the schema (see errors[]).
invalid_json: The body isn’t JSON.
invalid_idempotency_key: The Idempotency-Key isn’t 1–255 visible ASCII characters.
invalid_code: Not a valid barcode, ISBN, ISSN or code (check digits).
unauthorized: Not signed in (no session or token, or an expired one).
not_found: Nothing at that address.
idempotency_in_progress: The first request with this key is still running.
already_added: The copy already has this code.
already_known: The catalog knows this code: change the copy to it instead.
known_elsewhere: Another edition has this code.
already_proposed: This code is already waiting for review.
idempotency_key_reused: This key was used for a different request.
rate_limited: More than 30 codes today; wait the Retry-After seconds.
internal: Something went wrong on our side (quote the requestId).
curl -X POST 'https://collection.id/api/v1/collection/items/<id>/codes' \
-H "Authorization: Bearer $COLLECTOR_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d @body.jsonawait collector.addCopyCode({ path: { id }, body: { … } });/api/v1/collection/items/{id}/codes/{codeId}Takes the code off the copy, and withdraws it from review if it’s still waiting.
collector.removeCopyCode()collection:write(API keys are coming soon)X-Request-Id| Name | In | Type | About |
|---|---|---|---|
idrequired | path | string (uuid) | |
codeIdrequired | path | string (uuid) |
object
ok"true"requiredunauthorized: Not signed in (no session or token, or an expired one).
not_found: Nothing at that address.
internal: Something went wrong on our side (quote the requestId).
curl -X DELETE 'https://collection.id/api/v1/collection/items/<id>/codes/<codeId>' \
-H "Authorization: Bearer $COLLECTOR_TOKEN"await collector.removeCopyCode({ path: { id, codeId } });/api/v1/collection/items/{id}/codes/checkWhat a code names, compared with this copy: the copy itself, another issue or edition to change the copy to, or nothing the catalog knows yet. Changes nothing. 120 checks an hour.
collector.checkCopyCode()collection:read(API keys are coming soon)X-Request-Id| Name | In | Type | About |
|---|---|---|---|
idrequired | path | string (uuid) |
object
textstringrequired1–60 charactersaddOnstring or nulloptionalat most 5 charactersformatstring or nulloptionalat most 20 characterskindenum or nulloptionalOne ofupcisbnissndistributor
notestring or nulloptionalat most 1000 charactersobject
codeobjectrequiredkindenumrequiredOne ofupcisbnissndistributor
codestringrequiredaddonstringrequireddisplaystringrequiredhintsarray of stringrequiredWhat the code itself says (the add-on’s cover and printing...).
currentbooleanrequiredThe copy already is what the code names, or already has the code.
What the code names.
Weaker: the code’s series at the copy’s number.
The code, when it’s already on this copy.
invalid_request: The query or body doesn’t match the schema (see errors[]).
invalid_json: The body isn’t JSON.
invalid_code: Not a valid barcode, ISBN, ISSN or code (check digits).
unauthorized: Not signed in (no session or token, or an expired one).
not_found: Nothing at that address.
rate_limited: More than 120 checks an hour; wait the Retry-After seconds.
internal: Something went wrong on our side (quote the requestId).
curl -X POST 'https://collection.id/api/v1/collection/items/<id>/codes/check' \
-H "Authorization: Bearer $COLLECTOR_TOKEN" \
-H 'Content-Type: application/json' \
-d @body.jsonawait collector.checkCopyCode({ path: { id }, body: { … } });/api/v1/collection/items/{id}/repointRanked issues to change the copy to before searching: what its barcodes name, the issues next to it, the same number in other volumes.
collector.listCopyRepointOptions()collection:read(API keys are coming soon)If-None-MatchX-Request-Id| Name | In | Type | About |
|---|---|---|---|
idrequired | path | string (uuid) |
object
Best first.
unauthorized: Not signed in (no session or token, or an expired one).
not_found: Nothing at that address.
internal: Something went wrong on our side (quote the requestId).
curl 'https://collection.id/api/v1/collection/items/<id>/repoint' \
-H "Authorization: Bearer $COLLECTOR_TOKEN"await collector.listCopyRepointOptions({ path: { id } });/api/v1/collection/items/{id}/repointChanges the copy’s issue, edition or variant. Only what the copy is changes: its purchase, grade, notes, your own value and its QR labels stay as they were. The change goes in the copy’s history, where it can be undone.
collector.repointCopy()collection:write(API keys are coming soon)Idempotency-KeyX-Request-Id| Name | In | Type | About |
|---|---|---|---|
idrequired | path | string (uuid) |
object
issueIdstring (uuid)requirededitionIdstring (uuid) or nulloptionalpendingVariantIdstring (uuid) or nulloptionalcodeobject or nulloptionalkindenumrequiredOne ofupcisbnissndistributor
codestringrequired1–40 charactersaddonstringoptionaldefault ""object
changedbooleanrequiredFalse when the copy already was that.
invalid_request: The query or body doesn’t match the schema (see errors[]).
invalid_json: The body isn’t JSON.
invalid_idempotency_key: The Idempotency-Key isn’t 1–255 visible ASCII characters.
invalid_code: The code that led here isn’t a valid code.
unauthorized: Not signed in (no session or token, or an expired one).
forbidden: That isn’t yours to change.
not_found: Nothing at that address.
idempotency_in_progress: The first request with this key is still running.
invalid_target: The issue or edition can’t take a copy.
edition_mismatch: The edition isn’t one of that issue’s.
invalid_pending_variant: That pending variant isn’t yours, or isn’t of that issue.
repoint_rate_limited: Too many changes today; try again tomorrow.
idempotency_key_reused: This key was used for a different request.
internal: Something went wrong on our side (quote the requestId).
not_migrated: The database update this needs isn’t applied yet.
curl -X POST 'https://collection.id/api/v1/collection/items/<id>/repoint' \
-H "Authorization: Bearer $COLLECTOR_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d @body.jsonawait collector.repointCopy({ path: { id }, body: { … } });/api/v1/collection/items/bulkThe library’s bulk tools, for up to 500 copies a request: update (status, sold date and price, for trade, asking price, location), retag (add and remove tags) or delete (also removes their photos). More than one copy needs Pro. A write that fails after earlier batches went through reports them in error.details.saved.
collector.bulkCopies()collection:write(API keys are coming soon)Idempotency-KeyX-Request-Idobject or object or object
Option 1: object
action"update"requiredidsarray of string (uuid)required1–500 itemspatchobjectrequiredstatusenumoptionalOne ofownedwishlistsold
sold_onstring (date) or nulloptionalsale_price_centsinteger or nulloptional0–2000000000for_tradebooleanoptionalasking_price_centsinteger or nulloptional0–2000000000locationstring or nulloptionalat most 480 charactersOption 2: object
action"retag"requiredidsarray of string (uuid)required1–500 itemsaddarray of stringoptionalat most 30 items · default []removearray of stringoptionalat most 30 items · default []Option 3: object
action"delete"requiredidsarray of string (uuid)required1–500 itemsobject
changedintegerrequiredCopies changed (or deleted).
invalid_request: The query or body doesn’t match the schema (see errors[]).
invalid_json: The body isn’t JSON.
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).
feature_required: Changing more than one copy needs Pro.
idempotency_in_progress: The first request with this key is still running.
idempotency_key_reused: This key was used for a different request.
internal: Something went wrong on our side (quote the requestId).
curl -X POST 'https://collection.id/api/v1/collection/items/bulk' \
-H "Authorization: Bearer $COLLECTOR_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H 'Content-Type: application/json' \
-d @body.jsonawait collector.bulkCopies({ body: { … } });