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

拠点と保管場所を取得する

無効なものも含めて、店舗のすべての拠点と保管場所を返します。

GET/inventory/sites
Authorization
AuthorizationOAuth2 access token · headerrequired

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

Scopes:inventory:read
Responses
200

拠点の一覧

sitesSite[]required
Show properties
Array of Site
idstring<uuid>
codestring
namestring
kindstring
countryCodestring
timezonestring
isActiveboolean
createdAtstring<date-time>
updatedAtstring<date-time>
locationsLocation[]
Show properties
Array of Location
idstring<uuid>
siteIdstring<uuid>
codestring
namestring
kindstring
isActiveboolean
createdAtstring<date-time>
updatedAtstring<date-time>
401

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

errorstringrequired

エラーのコード

scopestring

insufficient_scope のとき、足りない権限

403

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

errorstringrequired

エラーのコード

scopestring

insufficient_scope のとき、足りない権限

Try it
Server
Authorization
Request
curl -X GET 'https://api.toreca-cloud.com/partner/v1/inventory/sites' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Response
{
  "sites": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "code": "string",
      "name": "string",
      "kind": "string",
      "countryCode": "string",
      "timezone": "string",
      "isActive": true,
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z",
      "locations": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1",
          "code": "string",
          "name": "string",
          "kind": "string",
          "isActive": true,
          "createdAt": "2019-08-24T14:15:22Z",
          "updatedAt": "2019-08-24T14:15:22Z"
        }
      ]
    }
  ]
}