在庫の変更を読む
拠点・保管場所・個体の変更を、カーソルの続きから返します。data は読み取り時点の値なので、受け手は id で上書き保存するだけで済みます。カーソルなしで呼ぶと先頭から返り、全件を同期できます。削除はなく、無効化は isActive、個体が在庫から出たことは status で表れます。
hasMore が true の間は、nextCursor を付けて続けて読みます。
/inventory/changesAuthorizationOAuth2 アクセストークン · header必須認可コードフロー(PKCE S256 必須)。認可・トークン・更新のリクエストには resource=https://api.toreca-cloud.com/partner/v1 を付けます。アクセストークンは15分、リフレッシュトークンは90日有効で、更新のたびに入れ替わります。
inventory:readcursorstring前回の nextCursor。中身は解釈しないでください。
limitintegerincludestring追加で受け取るものをカンマ区切りで指定します。sealed:BOX・パック・構築済みデッキの個体も返します(指定しなければカードの個体だけ)。snkrdunk:個体の card.snkrdunk / product.snkrdunk にスニダンの商品を載せます。処理が重いので、指定するときは limit を200以下にしてください。cursorは include によらず同じ位置を指します。途中から指定し始めたときや、同期済みの個体に新しい項目を反映したいときは、一度cursorなしで先頭から読み直してください。
変更
changesChange[]必須プロパティを表示プロパティを非表示
Change の配列typestring必須sitelocationitemidstring<uuid>必須dataSite | Location | InventoryItem必須読み取り時点の拠点・保管場所・個体。type が site なら Site、location なら Location、item なら InventoryItem です。
プロパティを表示プロパティを非表示
idstring<uuid>codestringnamestringkindstringcountryCodestringtimezonestringaddressobject | null拠点の住所。登録した項目だけが入ります。
プロパティを表示プロパティを非表示
postalCodestringregionstringlocalitystringline1stringline2stringisActivebooleancreatedAtstring<date-time>updatedAtstring<date-time>locationsLocation[]プロパティを表示プロパティを非表示
Location の配列idstring<uuid>siteIdstring<uuid>codestringnamestringkindstringisActivebooleancreatedAtstring<date-time>updatedAtstring<date-time>idstring<uuid>siteIdstring<uuid>codestringnamestringkindstringisActivebooleancreatedAtstring<date-time>updatedAtstring<date-time>idstring<uuid>必須createdAtstring<date-time>必須updatedAtstring<date-time>必須assetNumberstring必須sourceKindstring必須purchasereceipttenant_transferproductKindstring必須個体の種類。box・pack・deck は include=sealed のときだけ返ります。
cardboxpackdeckstatusstring必須versioninteger必須siteIdstring<uuid> | null必須プロパティを表示プロパティを非表示
string<uuid>nulllocationIdstring<uuid> | null必須プロパティを表示プロパティを非表示
string<uuid>nullgradeUnitGrade | null必須プロパティを表示プロパティを非表示
serviceCodestring必須serviceNamestring必須serviceKindstring必須third_partyinternalcodestring必須labelstring必須numericScorenumber | null必須プロパティを表示プロパティを非表示
numbernullnullcertificationNumberstring | null必須プロパティを表示プロパティを非表示
stringnullcertificationVerifiedboolean必須conditionNotestring | null必須プロパティを表示プロパティを非表示
stringnullacquisitionAmountMinorinteger | null必須プロパティを表示プロパティを非表示
integernullacquisitionCostBasisstring必須仕入額の区分。actual はトレカクラウドの買取額か実物と照合した外部の買取額、estimated は外部の買取から推定した額、recorded は入庫や訂正で入力した額や移管元から引き継いだ額、unset は未設定。
actualestimatedrecordedunsetpurchaseobject | null必須個体を売り手から買い取った記録。外部の買取にも紐付いていない入庫の個体や、移管で受け入れた個体は null。売り手の情報や買取の金額は返しません。
プロパティを表示プロパティを非表示
purchasedAtstring<date-time>必須買取日。外部の買取なら到着日時、トレカクラウドの買取なら成立日時(acquiredAt と同じ)。
sourcestring必須toreca_cloud はトレカクラウドでの買取、external は店舗の別の買取システムでの買取。
toreca_cloudexternalmatchstring必須confirmed は実物の認定番号と照合して確定済み、estimated は取込時の推定。トレカクラウドの買取は常に confirmed。
confirmedestimatedcertificationNumberstring | null必須外部の買取明細の認定番号。estimated の間は候補で、実物の番号とは限りません。トレカクラウドの買取は null(個体の certificationNumber を見てください)。
nullcurrencystring必須acquiredAtstring<date-time>必須個体が店舗の在庫に入った日時。買取日は purchase.purchasedAt を見てください。
lastMovedAtstring<date-time>必須allocationstring必須yoursothersnoneholdableboolean必須holdRefusalstring | null必須holdable が false の理由。いま確保すると返るエラーコードと同じ値です。unit_unavailable は在庫にない(確保中・出品中・店舗の出庫予約に入っている・売却済みなど)、unit_not_allocated はほかの連携先に割り当て済みか、店舗が別の用途に確保している(allocated の接続では自分に割り当てられていない)、receipt_not_confirmed はお客様の着金確認待ちの買取品です。理由が重なるときは、この順で最初の1つを返します。holdable が true のときは null。今後、値が増えることがあります。
unit_unavailableunit_not_allocatedreceipt_not_confirmednullcommitmentobject | null必須プロパティを表示プロパティを非表示
idstring<uuid>必須purposestring必須oripasalelabelstring必須externalRefstring | null必須プロパティを表示プロパティを非表示
stringnullnullmarketValueMarketValue | null必須プロパティを表示プロパティを非表示
amountMinorinteger必須currencystring必須pricedAtstring<date-time>必須nullconditionTagsobject[]必須プロパティを表示プロパティを非表示
object の配列idstring<uuid>必須namestring必須photosobject必須プロパティを表示プロパティを非表示
frontobject | null必須プロパティを表示プロパティを非表示
urlstring<uri>必須updatedAtstring<date-time>必須nullbackobject | null必須プロパティを表示プロパティを非表示
urlstring<uri>必須updatedAtstring<date-time>必須nullcardobject | null必須カードの個体のカード。BOX・パック・デッキの個体は null。
プロパティを表示プロパティを非表示
idstring<uuid>必須namestring必須localizedNamesobject必須cardNumberstring | null必須プロパティを表示プロパティを非表示
stringnulllanguageCodestring必須variantstring | null必須プロパティを表示プロパティを非表示
stringnullfinishstring | null必須プロパティを表示プロパティを非表示
stringnullimageUrlstring | null必須プロパティを表示プロパティを非表示
stringnullrarityobject | null必須プロパティを表示プロパティを非表示
codestring必須namestring必須nullsetobject | null必須プロパティを表示プロパティを非表示
idstring<uuid>必須codestring必須namestring必須nameEnstring | null必須プロパティを表示プロパティを非表示
stringnullnullgameGame必須プロパティを表示プロパティを非表示
idstring<uuid>codestringnamestringsnkrdunkSnkrdunkProduct | nullinclude=snkrdunk のときだけキーごと載ります。null はリンクがないという意味です。
プロパティを表示プロパティを非表示
productIdstring必須urlstring<uri>必須nullproductobject | null必須BOX・パック・デッキの個体の商品。カードの個体は null。
プロパティを表示プロパティを非表示
idstring<uuid>必須kindstring必須boxpackdecknamestring必須productCodestring | null必須janCodestring | null必須languageCodestring必須imageUrlstring | null必須gameGame必須プロパティを表示プロパティを非表示
idstring<uuid>codestringnamestringsnkrdunkSnkrdunkProduct | nullinclude=snkrdunk のときだけキーごと載ります。null はリンクがないという意味です。
プロパティを表示プロパティを非表示
productIdstring必須urlstring<uri>必須nullnullshrinkStatusstring | null必須BOX・パック・デッキのシュリンクの有無。カードの個体は null。
presentabsentunknownnullnextCursorstring必須hasMoreboolean必須invalid_request または invalid_cursor
errorstring必須エラーのコード。主なものは次のとおりです。今後、値が増えることがあります。
400:invalid_request(パラメーターや本文が正しくない)、invalid_cursor401:invalid_token403:insufficient_scope、connection_revoked、client_disabled、forbidden、ip_not_allowed404:not_found409:conflict(同時に更新された。読み直してやり直す)、idempotency_conflict(requestIdを別の内容に流用した)、receipt_not_confirmed(お客様の着金確認待ちの買取品)422個体:unit_unavailable(在庫にない)、unit_not_allocated(この連携先に割り当てられていない)、unit_not_found422確保:invalid_expiry、hold_shipped、hold_cancelled、hold_confirmed、hold_blocked、sale_amount_required(売値も時価もない)422掲載・配送:commitment_not_on_sale、commitment_not_allocated、commitment_shipping、commitment_blocked、commitment_closed、commitment_not_on_shipment、shipment_shipped、shipment_cancelled、shipment_not_shipped、shipment_blocked、shipment_refused422移動:invalid_location、location_inactive、different_site、same_site、mixed_sites、invalid_site、site_inactive、wrong_site、unit_not_on_transfer、transfer_line_closed、unit_not_on_checkout、move_refused、transfer_refused、checkout_refused、return_refused422そのほか:invalid_webhook_url、invalid_generated_at429:rate_limited503:photo_unavailable
scopestringinsufficient_scope のとき、足りない権限
requestIdstring<uuid>inventoryItemIdsstring<uuid>[]holdIdsstring<uuid>[]commitmentIdsstring<uuid>[]invalid_token。トークンがない、期限切れ、または別のリソース向けです。
errorstring必須エラーのコード。主なものは次のとおりです。今後、値が増えることがあります。
400:invalid_request(パラメーターや本文が正しくない)、invalid_cursor401:invalid_token403:insufficient_scope、connection_revoked、client_disabled、forbidden、ip_not_allowed404:not_found409:conflict(同時に更新された。読み直してやり直す)、idempotency_conflict(requestIdを別の内容に流用した)、receipt_not_confirmed(お客様の着金確認待ちの買取品)422個体:unit_unavailable(在庫にない)、unit_not_allocated(この連携先に割り当てられていない)、unit_not_found422確保:invalid_expiry、hold_shipped、hold_cancelled、hold_confirmed、hold_blocked、sale_amount_required(売値も時価もない)422掲載・配送:commitment_not_on_sale、commitment_not_allocated、commitment_shipping、commitment_blocked、commitment_closed、commitment_not_on_shipment、shipment_shipped、shipment_cancelled、shipment_not_shipped、shipment_blocked、shipment_refused422移動:invalid_location、location_inactive、different_site、same_site、mixed_sites、invalid_site、site_inactive、wrong_site、unit_not_on_transfer、transfer_line_closed、unit_not_on_checkout、move_refused、transfer_refused、checkout_refused、return_refused422そのほか:invalid_webhook_url、invalid_generated_at429:rate_limited503:photo_unavailable
scopestringinsufficient_scope のとき、足りない権限
requestIdstring<uuid>inventoryItemIdsstring<uuid>[]holdIdsstring<uuid>[]commitmentIdsstring<uuid>[]insufficient_scope、connection_revoked、client_disabled、forbidden のいずれかです。
errorstring必須エラーのコード。主なものは次のとおりです。今後、値が増えることがあります。
400:invalid_request(パラメーターや本文が正しくない)、invalid_cursor401:invalid_token403:insufficient_scope、connection_revoked、client_disabled、forbidden、ip_not_allowed404:not_found409:conflict(同時に更新された。読み直してやり直す)、idempotency_conflict(requestIdを別の内容に流用した)、receipt_not_confirmed(お客様の着金確認待ちの買取品)422個体:unit_unavailable(在庫にない)、unit_not_allocated(この連携先に割り当てられていない)、unit_not_found422確保:invalid_expiry、hold_shipped、hold_cancelled、hold_confirmed、hold_blocked、sale_amount_required(売値も時価もない)422掲載・配送:commitment_not_on_sale、commitment_not_allocated、commitment_shipping、commitment_blocked、commitment_closed、commitment_not_on_shipment、shipment_shipped、shipment_cancelled、shipment_not_shipped、shipment_blocked、shipment_refused422移動:invalid_location、location_inactive、different_site、same_site、mixed_sites、invalid_site、site_inactive、wrong_site、unit_not_on_transfer、transfer_line_closed、unit_not_on_checkout、move_refused、transfer_refused、checkout_refused、return_refused422そのほか:invalid_webhook_url、invalid_generated_at429:rate_limited503:photo_unavailable
scopestringinsufficient_scope のとき、足りない権限
requestIdstring<uuid>inventoryItemIdsstring<uuid>[]holdIdsstring<uuid>[]commitmentIdsstring<uuid>[]
