コンテンツにスキップ
トレカクラウド
Esc
↑↓移動↵開く⌘Jプレビュー

個体の現在の評価額を読む

読み取り専用のPOSTです。最大200件の重複しない個体IDを指定します。権限の範囲外・存在しない個体は返しません。評価額がない個体はmarketValueがnullです。価格だけの変化は変更フィードに出ないため、現在価格はこの操作で読みます。

POST/inventory/market-values
認証
AuthorizationOAuth2 アクセストークン · header必須

認可コードフロー(PKCE S256 必須)。認可・トークン・更新のリクエストには resource=https://api.toreca-cloud.com/partner/v1 を付けます。アクセストークンは15分、リフレッシュトークンは90日有効で、更新のたびに入れ替わります。

スコープ:inventory:read
リクエストボディ
必須application/json
idsstring<uuid>[]必須
最小項目数 1 · 最大項目数 200
レスポンス
200

成功

itemsobject[]必須
プロパティを表示
object の配列
idstring<uuid>必須
marketValueMarketValue | null必須
プロパティを表示
いずれか 1 つ:
MarketValue
amountMinorinteger必須
currencystring必須
pricedAtstring<date-time>必須
null
null
400

invalid_request。パラメーターが正しくありません。

errorstring必須

エラーのコード

scopestring

insufficient_scope のとき、足りない権限

requestIdstring<uuid>
inventoryItemIdsstring<uuid>[]
holdIdsstring<uuid>[]
commitmentIdsstring<uuid>[]
401

invalid_token。トークンがない、期限切れ、または別のリソース向けです。

errorstring必須

エラーのコード

scopestring

insufficient_scope のとき、足りない権限

requestIdstring<uuid>
inventoryItemIdsstring<uuid>[]
holdIdsstring<uuid>[]
commitmentIdsstring<uuid>[]
403

insufficient_scope、connection_revoked、client_disabled、forbidden のいずれかです。

errorstring必須

エラーのコード

scopestring

insufficient_scope のとき、足りない権限

requestIdstring<uuid>
inventoryItemIdsstring<uuid>[]
holdIdsstring<uuid>[]
commitmentIdsstring<uuid>[]
試してみる
サーバー
認証
ボディapplication/json
リクエスト
curl -X POST 'https://api.toreca-cloud.com/partner/v1/inventory/market-values' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "ids": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ]
}'
レスポンス
{
  "items": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "marketValue": {
        "amountMinor": 0,
        "currency": "JPY",
        "pricedAt": "2019-08-24T14:15:22Z"
      }
    }
  ]
}

このページは役に立ちましたか?