メインコンテンツまでスキップ

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-Versionheaderstring (date)任意
Idempotency-Keyheaderstring任意max 255

リクエスト本文​

Content-Type型
application/jsonBillingRateCreateInput

応答​

ステータス説明本文
201Success.application/json BillingRate または object
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
409idempotency_in_progressapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422idempotency_key_reused, validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

エラー​

この操作が返す可能性のある problem のコードです。各コードからそのページに移動できます。

スキーマ​

BillingRate​

フィールド型必須説明
billing_rate_idstring必須
created_by_emailstring または null必須The e-mail address of the administrator who set the rate; null for a seeded one.
currencystring必須The currency symbol or code the rate is stated in.
effective_fromstring (date-time)必須
effective_tostring (date-time) または null必須When a newer rate for the same service replaced it; null while it is in force.
is_global_defaultboolean必須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_typestring または null必須The model or engine the rate is for; null for a service without one.
rate_amountstring必須The price per rate_unit, in currency.
rate_unitstring必須What the amount is per, e.g. page or 1m_tokens.
service_typestring必須The billed service, e.g. ocr, table_extraction or llm.

BillingRateCreateInput​

フィールド型必須説明
currencystring または null任意At most 3 characters; the default is $.
model_typestring または null任意The model or engine the rate is for; null (the default) for a service without one. At most 100 characters.
rate_amountstring必須The price per rate_unit: not negative, up to 8 digits before the point and 10 after.
rate_unitstring必須What the amount is per. At most 30 characters.
service_typestring必須The billed service. At most 50 characters.