Set a billing service rate.
POST/api/v1/company/billing-ratessettings:write
注記
このページの操作の説明は、API の OpenAPI 文書のとおり英語で記載しています。
Sets the company's own billing tenant's rate for a service, model and unit from now on: the rate in force for the same service_type, model_type and rate_unit is closed (its effective_to is now) and this one opens, so one stays in force. Global defaults cannot be set here, only the company's own. Needs Create Service Rates; 403 when the company has no billing tenant. Written to the identity primary.
バージョン 2026-12-01。 ID の受領情報の billing_rate_id は、文字列キーではなく整数の ID として定義されています。値はどちらのバージョンでも文字列です。
| スコープ | settings:write (機密性の高いスコープ) |
| 非同期 | いいえ |
| MCP ツール | create_company_billing_rate |
| Portal の権限 | create_service_rates |
パラメーター
| 名前 | 場所 | 型 | 必須 | 説明 |
|---|---|---|---|---|
Docwize-Version | header | string (date) | 任意 | |
Idempotency-Key | header | string | 任意 | max 255 |
リクエスト本文
| Content-Type | 型 |
|---|---|
application/json | BillingRateCreateInput |
応答
| ステータス | 説明 | 本文 |
|---|---|---|
201 | Success. | application/json BillingRate または object |
400 | invalid_version, malformed_json | application/problem+json Problem |
401 | token_expired, unauthenticated | application/problem+json Problem |
403 | forbidden, insufficient_scope, token_owner_inactive | application/problem+json Problem |
405 | method_not_allowed | application/problem+json Problem |
406 | not_acceptable | application/problem+json Problem |
409 | idempotency_in_progress | application/problem+json Problem |
413 | payload_too_large | application/problem+json Problem |
415 | unsupported_media_type | application/problem+json Problem |
421 | wrong_region | application/problem+json Problem |
422 | idempotency_key_reused, validation_failed | application/problem+json Problem |
500 | internal_error | application/problem+json Problem |
503 | tenant_unavailable, unavailable | application/problem+json Problem |
504 | timeout | application/problem+json Problem |
エラー
この操作が返す可能性のある problem のコードです。各コードからそのページに移動できます。
スキーマ
BillingRate
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
billing_rate_id | string | 必須 | |
created_by_email | string または null | 必須 | The e-mail address of the administrator who set the rate; null for a seeded one. |
currency | string | 必須 | The currency symbol or code the rate is stated in. |
effective_from | string (date-time) | 必須 | |
effective_to | string (date-time) または null | 必須 | When a newer rate for the same service replaced it; null while it is in force. |
is_global_default | boolean | 必須 | true for a default every organisation falls back to (set by Docwize, never through this API); false for a rate of the caller's own billing tenant. |
model_type | string または null | 必須 | The model or engine the rate is for; null for a service without one. |
rate_amount | string | 必須 | The price per rate_unit, in currency. |
rate_unit | string | 必須 | What the amount is per, e.g. page or 1m_tokens. |
service_type | string | 必須 | The billed service, e.g. ocr, table_extraction or llm. |
BillingRateCreateInput
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
currency | string または null | 任意 | At most 3 characters; the default is $. |
model_type | string または null | 任意 | The model or engine the rate is for; null (the default) for a service without one. At most 100 characters. |
rate_amount | string | 必須 | The price per rate_unit: not negative, up to 8 digits before the point and 10 after. |
rate_unit | string | 必須 | What the amount is per. At most 30 characters. |
service_type | string | 必須 | The billed service. At most 50 characters. |