기본료와 최소 과금 요금제 등록
curl --request POST \
--url https://meterengine.com/v1/price-plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base_fee": 1,
"minimum_amount": 1,
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"effective_from": "<string>",
"effective_until": "<string>"
}
'const url = 'https://meterengine.com/v1/price-plans';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
base_fee: 1,
minimum_amount: 1,
customer_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
effective_from: '<string>',
effective_until: '<string>'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"archived_at": "2023-11-07T05:31:56Z",
"archived_from": "<string>",
"base_fee": 123,
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"effective_from": "<string>",
"effective_until": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"minimum_amount": 123
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}요금제
기본료와 최소 과금 요금제 등록
사용료에 최소 과금을 적용한 뒤 기본료를 더한다. 수량이 없는 고객에게는 적용하지 않는다. 청구할 때 기본료와 최소 사용료는 10원 미만을 버린 값을 쓰며, 버린 기본료가 0원이면 기본료 라인이 생기지 않는다.
POST
/
v1
/
price-plans
기본료와 최소 과금 요금제 등록
curl --request POST \
--url https://meterengine.com/v1/price-plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base_fee": 1,
"minimum_amount": 1,
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"effective_from": "<string>",
"effective_until": "<string>"
}
'const url = 'https://meterengine.com/v1/price-plans';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
base_fee: 1,
minimum_amount: 1,
customer_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
effective_from: '<string>',
effective_until: '<string>'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"archived_at": "2023-11-07T05:31:56Z",
"archived_from": "<string>",
"base_fee": 123,
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"effective_from": "<string>",
"effective_until": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"minimum_amount": 123
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}인증
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
본문
application/json