비용 센터 만들기
엔드포인트
POST https://api.verifik.co/v2/cost-centers
계정에 비용 센터를 만듭니다. 비용 센터를 관리해도 크레딧은 차감되지 않습니다.
헤더
| 이름 | 값 |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
본문 매개변수
name
타입: string
필수: 예
표시 이름. 최대 120자.
code
타입: string
필수: 예
x-cost-center에 보낼 값. 문자, 숫자, ., -, _. 최대 60자. 계정당 고유.
country
타입: string
필수: 예
ISO-2 국가 코드. 예: ES.
active
타입: boolean
필수: 아니요
기본값 true.
요청 예시
- cURL
- Node.js
- Python
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"}'
const axios = require("axios");
const config = {
method: "post",
url: "https://api.verifik.co/v2/cost-centers",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
data: {
name: "스페인 운영",
code: "SPAIN-OPS",
country: "ES"
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
import os
import requests
response = requests.post(
"https://api.verifik.co/v2/cost-centers",
headers={
"Authorization": f"Bearer {os.environ['VERIFIK_TOKEN']}",
"Content-Type": "application/json",
},
json={"name": "스페인 운영", "code": "SPAIN-OPS", "country": "ES"},
)
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"
}
}
data는 새 비용 센터 객체입니다.
오류 응답
계정에 이미 있는 코드:
{
"message": "cost_center_code_taken",
"code": "Conflict"
}
name, code, country처럼 빠지거나 잘못된 필드:
{
"message": "\"name\" is required",
"code": "MissingParameter"
}