更新組織代碼

information

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

目錄

更新組織代碼

更新組織單位代碼。
一次最多可以更新100個組織。

有關導入CSV檔的API的詳細內容,請參考以下頁面。
匯入組織資訊

URL

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

HTTP 方法

PUT

所需存取權限

cybozu.com共通管理員 (External link)

請求

參數
參數名稱 類型 必須 說明
codes 陣列 必須 組織代碼的清單
codes[].currentCode 字串 必須
當前組織代碼
指定不超過 128 個字元
不能指定空格或僅指定空格。
codes[].newCode 字串 必須 更新的組織代碼
指定不超過 128 個字元
不能指定空格或僅指定空格。
示例請求
標頭

使用API權杖時,需要權限範圍為「Read and Write」 或更高權限範圍的權杖。

1
2
3
4
{
  "Authorization": "Bearer API_TOKEN",
  "Content-Type": "application/json"
}

有關請求頭的更多資訊,請參閱以下頁面。
User API 通用規範

內文
1
2
3
4
5
6
7
8
{
  "codes": [
    {
      "currentCode": "Sales03",
      "newCode": "Sales05"
    }
  ]
}

回應

1
{}

示例代碼

使用 curl 的請求

根據您的環境,curl 的格式可能會有所不同。
有關說明,請參閱以下頁面。
使用curl命令執行kintone REST API/3.執行API

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
curl -X PUT 'https://sample.cybozu.com/v1/organizations/codes.json' \
  -H 'Authorization: Bearer API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
        "codes": [
          {
            "currentCode": "Sales03",
            "newCode": "Sales05"
          }
        ]
      }'

限制事項

  • 如果已在組織的預配置 中創建預留數據,則無法運行API。
  • 不建議在cybozu.com共通管理中執行以下操作並行執行 API:
    • 組織和用戶設置畫面上的組織操作
    • 從檔案匯入