コストセンターを一覧する
エンドポイント
GET https://api.verifik.co/v2/cost-centers
アカウントのコストセンターを返します。国、次に名前の順です。
ヘッダー
| 名前 | 値 |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
クエリパラメータ
active
型: boolean
必須: いいえ
true は有効のみ、false は無効のみです。省略すると両方を返します。
country
型: string
必須: いいえ
ISO-2 の国コード。例: ES。
page
型: number
必須: いいえ
ページ番号。1 から。
limit
型: number
必須: いいえ
1 ページの件数。既定 50、最大 100。
リクエスト例
- cURL
- Node.js
- Python
curl "https://api.verifik.co/v2/cost-centers?active=true&country=ES&page=1&limit=50" \
-H "Authorization: Bearer $VERIFIK_TOKEN"
const axios = require("axios");
const config = {
method: "get",
url: "https://api.verifik.co/v2/cost-centers",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
params: {
active: true,
country: "ES",
page: 1,
limit: 50
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
import os
import requests
response = requests.get(
"https://api.verifik.co/v2/cost-centers",
headers={"Authorization": f"Bearer {os.environ['VERIFIK_TOKEN']}"},
params={"active": "true", "country": "ES", "page": 1, "limit": 50},
)
print(response.json())
レスポンス例
- 200 OK
{
"data": [
{
"_id": "6acfbdda92451bac5d0a7ebe",
"client": "69c2b824295cd7d276e478ad",
"name": "スペイン運用",
"code": "SPAIN-OPS",
"country": "ES",
"active": true,
"createdAt": "2026-10-14T17:37:30.469Z",
"updatedAt": "2026-10-14T17:37:30.469Z"
}
],
"total": 1,
"page": 1,
"pages": 1,
"limit": 50
}
data の各要素はコストセンターオブジェクトです。
エラーレスポンス
無効なクエリです。たとえば limit が 100 を超える、または country が 2 文字でない場合です。
{
"message": "\"limit\" must be less than or equal to 100",
"code": "MissingParameter"
}