Skip to main content

コストセンターを作成する

エンドポイント​

POST https://api.verifik.co/v2/cost-centers

アカウントにコストセンターを作成します。管理ではクレジットを消費しません。

ヘッダー​

名前値
Content-Typeapplication/json
AuthorizationBearer <token>

ボディパラメータ​

name​

型: string
必須: はい

表示名。120 文字まで。

code​

型: string
必須: はい

x-cost-center に送る値。文字、数字、.、-、_。60 文字まで。アカウントごとに一意。

country​

型: string
必須: はい

ISO-2 の国コード。例: ES。

active​

型: boolean
必須: いいえ

既定は true。

リクエスト例​

curl -X POST "https://api.verifik.co/v2/cost-centers" \
-H "Authorization: Bearer $VERIFIK_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"スペイン運用","code":"SPAIN-OPS","country":"ES"}'

レスポンス例​

{
"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"
}
}

data は新しいコストセンターオブジェクトです。

エラーレスポンス​

アカウントにすでにあるコード:

{
"message": "cost_center_code_taken",
"code": "Conflict"
}

name、code、country のように欠けている、または無効なフィールド:

{
"message": "\"name\" is required",
"code": "MissingParameter"
}