更新您的組織

information

本頁面使用機器翻譯而成。
機器翻譯免責聲明 (External link)

目錄

更新您的組織

更新您的組織。
一次最多可以更新100個組織。

有關導入 CSV 檔的 API 的詳細資訊,請參閱 導入組織

URL

https://sample.cybozu.com/v1/organizations.json

HTTP 方法

PUT

所需許可權

  • cybozu.com共通管理員

請求

參數
參數名稱 必須 說明
organizations 陣列 必須 變更組織資訊
organizations[].code 字串 必須 組織代碼
指定不超過 128 個字元。
organizations[].name 字串 自選 組織名稱
指定不超過 128 個字元。
如果省略,則不會更新該值。
organizations[].localName 字串 自選 其他語言下的顯示名稱
指定不超過 128 個字元。
如果省略,則不會更新該值。
organizations[].localNameLocale 字串 自選 其他語言下的顯示名稱
您可以指定以下值:
  • ja:日本語
  • en:英語
  • zh: 中文(簡體)
  • zh-TW: 中文(繁體)
  • es:西班牙文
如果省略,或者指定了空字串 或 null ,則不會更新該值。
organizations[].parentCode 字串 自選 上級組織的組織代碼
指定不超過 128 個字元。
如果省略,則不會更新該值。
空字串會將您帶到組織的根目錄。
organizations[].description 字串 自選 說明
指定不超過 1,000 個字元。
如果省略,則設置空字元。
示例請求
頁眉
1
2
3
4
{
  "X-Cybozu-Authorization": "QWRtaW5pc3RyYXRvcjpjeWJvenU=",
  "Content-Type": "application/json"
}

有關請求頭的詳細資訊,請參閱 通用使用者 API 規範

身體
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
{
  "organizations": [
    {
      "code": "Sales02",
      "name": "北美銷售部",
      "localName": "North America Sales Department",
      "localNameLocale": "en",
      "description": "北美銷售部",
      "parentCode": "Sales00"
    }
  ]
}

回應

1
{}

示例代碼

使用 curl 的請求
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
curl -X PUT 'https://sample.cybozu.com/v1/organizations.json' \
  -H 'X-Cybozu-Authorization: QWRtaW5pc3RyYXRvcjpjeWJvenU=' \
  -H 'Content-Type: application/json' \
  -d '{
        "organizations": [
          {
            "code": "Sales03",
            "name": "北美銷售部",
            "localName": "North America Sales Department",
            "localNameLocale": "en",
            "description": "北美銷售部",
            "parentCode": "Sales00"
          }
        ]
  }'

限制

  • 如果已在組織的預配置 (External link) 中創建預留數據,則無法運行API。
  • cybozu.com 不建議您在「管理通用」 中執行以下操作並並行執行API。
    • 組織和用戶設置螢幕上的組織操作
    • 從檔案匯入