獲取組織

information

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

目錄

獲取組織

檢索組織資訊。
一次最多可以檢索 100 個組織。

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

URL

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

HTTP 方法

GET

所需許可權

請求

參數
參數名稱 必須 說明
ids 陣列 自選 組織ID清單
codes 是相互排斥的。
ids codes 如果同時省略 和 ,則最多可獲得100個組織資訊。
codes 陣列 自選 記錄清單
ids 是相互排斥的。
ids codes 如果同時省略 和 ,則最多可獲得100個組織資訊。
size 數值 自選 擬收購的組織數量
您可以指定 1 到 100。如果省略,則設置為100。
offset 數值 自選 要從要檢索的組織開頭跳過的數位
您可以指定一個從 0 到無窮大的數位。
如果省略,則設置為0。
示例請求
URL

https://sample.cybozu.com/v1/organizations.json?ids[0]=Sales01&ids[1]=Sales02

頁眉
1
2
3
{
  "X-Cybozu-Authorization": "QWRtaW5pc3RyYXRvcjpjeWJvenU="
}

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

回應

財產
屬性名稱 說明
organizations 陣列 變更組織資訊
有關詳細資訊, 請參閱組織類型
排序順序為升序。organizations[].id
示例回應
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
  "organizations": [
    {
      "id": "1",
      "code": "Sales01",
      "name": "國內銷售部",
      "localName": "Domestic Sales Department",
      "localNameLocale": "en",
      "parentCode": "Sales00",
      "description": "國內銷售部"
    },
    {
      "id": "2",
      "code": "Sales02",
      "name": "海外銷售部",
      "localName": "International Sales Department",
      "localNameLocale": "en",
      "parentCode": "Sales00",
      "description": "海外銷售部"
    }
  ]
}

示例代碼

使用 curl 的請求
1
2
curl -X GET 'https://sample.cybozu.com/v1/organizations.json?codes%5B0%5D=Sales01&codes%5B1%5D=Sales02' \
  -H 'X-Cybozu-Authorization: QWRtaW5pc3RyYXRvcjpjeWJvenU='