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

確保を一括で解除する

最大100件、ID重複不可。発送待ち・出荷済みが1件でもあると全件を拒否します。解除済みは変更しません。 inventory:readに加え、この操作のスコープと許可したメンバーのinventory.write権限が必要です。

POST/inventory/holds/release-batch
認証
AuthorizationOAuth2 アクセストークン · header必須

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

スコープ:inventory:readinventory:write
リクエストボディ
必須application/json
holdIdsstring<uuid>[]必須
最小項目数 1 · 最大項目数 100
reasonstring必須
最小長 1 · 最大長 2000
レスポンス
200

成功

holdsHold[]必須
プロパティを表示
Hold の配列
idstring<uuid>必須
createdAtstring<date-time>必須
updatedAtstring<date-time>必須
orderNumberstring必須
statusstring必須
許可される値:reservedawaiting_shipmentshippedcancelled
versioninteger必須
inventoryItemIdstring<uuid>必須
purposestring必須
許可される値:oripasale
destinationLabelstring必須
externalRefstring | null必須
プロパティを表示
いずれか 1 つ:
string
string
null
null
expiresAtstring<date-time> | null必須
プロパティを表示
いずれか 1 つ:
string<date-time>
string<date-time>
null
null
trackingNumberstring | null必須
プロパティを表示
いずれか 1 つ:
string
string
null
null
saleobject | null必須
プロパティを表示
いずれか 1 つ:
object
amountMinorinteger必須
currencystring必須
sourcestring必須
許可される値:enteredmarket
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>[]
409

競合・requestIdの流用・受取未確認

errorstring必須

エラーのコード

scopestring

insufficient_scope のとき、足りない権限

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

現在の状態・対象・値では実行できません。errorと対象IDを確認します。

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/holds/release-batch' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "holdIds": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ],
  "reason": "string"
}'
レスポンス
{
  "holds": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z",
      "orderNumber": "string",
      "status": "reserved",
      "version": 0,
      "inventoryItemId": "ef1bc09e-447a-46aa-a9d9-d86e3d490831",
      "purpose": "oripa",
      "destinationLabel": "string",
      "externalRef": "string",
      "expiresAt": "2019-08-24T14:15:22Z",
      "trackingNumber": "string",
      "sale": {
        "amountMinor": 0,
        "currency": "string",
        "source": "entered"
      }
    }
  ]
}

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