コンテンツにスキップ

物理明細を追加

POST
/rest/v1/addPhysicalCopy
curl --request POST \
--url https://game.retrogather.com/rest/v1/addPhysicalCopy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "gameId": 1, "mode": "materialize", "quantity": 1, "buyDate": "2026-04-15", "buyPrice": 1, "buyPlace": "example", "rating": 1, "memo": "example", "attributes": [ "example" ], "editionRef": { "kind": "base" }, "makeActive": true, "revision": "example" }'

PREMIUM. Physical copies / 所有ソフト追加: library entry required (use addToLibrary if missing). Choose mode by intent: materialize = record details of the copy the user already owns (only when no copies exist; inherits library fields). additional = the user got another copy; when no copies exist it creates TWO rows atomically (the inherited original + the new one). quantity defaults to 1. makeActive:true makes the new copy the representative and overwrites the library’s purchase data, rating, memo and attributes; tell the user. Pass revision from getPhysicalCopies or from the previous successful add/update/remove. Do not send that revision to removePhysicalCopy; start a remove preview instead. Re-read after uncertain results; do not blindly retry.

Plans: PREMIUM. Scopes: library:write.

Media typeapplication/json
object
gameId
required
integer
>= 1
mode
required

Materialize: record the already-owned copy from library values (only when no copies exist). additional: add another purchased copy; when no copies exist it creates TWO rows (the inherited original plus the new one). Never inferred from row count.

string
Allowed values: materialize additional
quantity
integer
>= 1
buyDate

YYYY-MM-DD. null clears.

string | null format: date
buyPrice

Price in JPY. null clears.

number | null
buyPlace
string | null
rating

1 (lowest) to 5 (highest). null clears.

integer | null
>= 1 <= 5
memo
string | null
attributes

Attribute IDs or exact labels from listAttributes. Replaces the whole set; [] clears.

Array<string>
editionRef
One of:
object
kind
required
string
Allowed value: base
Allowed values: base
makeActive

True selects this copy as representative and mirrors its purchase data, rating, memo, attributes and images to the library. false/omitted keeps the representative; it never deactivates a copy.

boolean
revision
required

Opaque whole-game revision. Required for add and makeActive:true. After a successful add, update, or remove, reuse that response’s revision for the next physical-copy write. Call getPhysicalCopies when you do not yet have a revision, after revision_conflict, after unavailable/saved:true/lost responses, or when another client may have changed the copies.

string
>= 1 characters

Tool result JSON (no MCP envelope). Delete previews also return 200 with confirmToken.

Media typeapplication/json
Any of:
object
item
required
object
physicalId
required
string
gameId
required
integer
quantity
integer
isActive
boolean
buyDate
string
buyPrice
number
buyPlace
string
rating
integer
memo
string
attributes
Array<object>
object
id
required
string
label
string
custom
boolean
key
additional properties
any
editionRef
Any of:
object
kind
required
string
Allowed value: base
Allowed values: base
key
additional properties
any
createdAt
string
updatedAt
string
key
additional properties
any
createdPhysicalIds
required
Array<string>
activePhysicalId
string
remainingCount
required
integer
libraryEntryRetained
required
boolean
librarySynced
required
boolean
revision
required
string
key
additional properties
any
Example
{
"item": {
"editionRef": {
"kind": "base"
}
}
}

Invalid_input (arguments, broken JSON body)

Media typeapplication/json

Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.

object
error
string
code
string
message
string
retryable
boolean
retryAfterSec
integer
requestId
string
resetAt
string
remaining
integer
scopes
Array<string>
upgradeUrl
string
key
additional properties
any
Examplegenerated
{
"error": "example",
"code": "example",
"message": "example",
"retryable": true,
"retryAfterSec": 1,
"requestId": "example",
"resetAt": "example",
"remaining": 1,
"scopes": [
"example"
],
"upgradeUrl": "example"
}

Missing or invalid API key

Media typeapplication/json

Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.

object
error
string
code
string
message
string
retryable
boolean
retryAfterSec
integer
requestId
string
resetAt
string
remaining
integer
scopes
Array<string>
upgradeUrl
string
key
additional properties
any
Examplegenerated
{
"error": "example",
"code": "example",
"message": "example",
"retryable": true,
"retryAfterSec": 1,
"requestId": "example",
"resetAt": "example",
"remaining": 1,
"scopes": [
"example"
],
"upgradeUrl": "example"
}

Insufficient_scope, plan_required, or access_suspended

Media typeapplication/json

Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.

object
error
string
code
string
message
string
retryable
boolean
retryAfterSec
integer
requestId
string
resetAt
string
remaining
integer
scopes
Array<string>
upgradeUrl
string
key
additional properties
any
Examplegenerated
{
"error": "example",
"code": "example",
"message": "example",
"retryable": true,
"retryAfterSec": 1,
"requestId": "example",
"resetAt": "example",
"remaining": 1,
"scopes": [
"example"
],
"upgradeUrl": "example"
}

Target or tool not found

Media typeapplication/json

Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.

object
error
string
code
string
message
string
retryable
boolean
retryAfterSec
integer
requestId
string
resetAt
string
remaining
integer
scopes
Array<string>
upgradeUrl
string
key
additional properties
any
Examplegenerated
{
"error": "example",
"code": "example",
"message": "example",
"retryable": true,
"retryAfterSec": 1,
"requestId": "example",
"resetAt": "example",
"remaining": 1,
"scopes": [
"example"
],
"upgradeUrl": "example"
}

Already_exists or revision_conflict (stale revision: re-read, then retry)

Media typeapplication/json

Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.

object
error
string
code
string
message
string
retryable
boolean
retryAfterSec
integer
requestId
string
resetAt
string
remaining
integer
scopes
Array<string>
upgradeUrl
string
key
additional properties
any
Examplegenerated
{
"error": "example",
"code": "example",
"message": "example",
"retryable": true,
"retryAfterSec": 1,
"requestId": "example",
"resetAt": "example",
"remaining": 1,
"scopes": [
"example"
],
"upgradeUrl": "example"
}

Burst or daily quota exceeded. See resetAt.

Media typeapplication/json

Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.

object
error
string
code
string
message
string
retryable
boolean
retryAfterSec
integer
requestId
string
resetAt
string
remaining
integer
scopes
Array<string>
upgradeUrl
string
key
additional properties
any
Examplegenerated
{
"error": "example",
"code": "example",
"message": "example",
"retryable": true,
"retryAfterSec": 1,
"requestId": "example",
"resetAt": "example",
"remaining": 1,
"scopes": [
"example"
],
"upgradeUrl": "example"
}
Retry-After
integer

Seconds

Unexpected server failure. Retrying the same call will not help.

Media typeapplication/json

Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.

object
error
string
code
string
message
string
retryable
boolean
retryAfterSec
integer
requestId
string
resetAt
string
remaining
integer
scopes
Array<string>
upgradeUrl
string
key
additional properties
any
Examplegenerated
{
"error": "example",
"code": "example",
"message": "example",
"retryable": true,
"retryAfterSec": 1,
"requestId": "example",
"resetAt": "example",
"remaining": 1,
"scopes": [
"example"
],
"upgradeUrl": "example"
}

Temporary failure or maintenance. Retry after Retry-After.

Media typeapplication/json

Entry errors (auth, routing, quota) use error; tool errors use code and message. Check retryable when present.

object
error
string
code
string
message
string
retryable
boolean
retryAfterSec
integer
requestId
string
resetAt
string
remaining
integer
scopes
Array<string>
upgradeUrl
string
key
additional properties
any
Examplegenerated
{
"error": "example",
"code": "example",
"message": "example",
"retryable": true,
"retryAfterSec": 1,
"requestId": "example",
"resetAt": "example",
"remaining": 1,
"scopes": [
"example"
],
"upgradeUrl": "example"
}
Retry-After
integer

Seconds