コンテンツにスキップ
Taylorz CRM Developers
Esc
↑↓移動↵開く⌘Jプレビュー

Save the commercial policy

Carries the revision the policy was read at; a stale one is refused.

PUT/api/v1/settings/commercial
認証
AuthorizationOAuth2 アクセストークン · header必須

Authorization-code grant with PKCE. Clients are public and hold no secret. Discovery is published at /.well-known/oauth-authorization-server/api/auth.

スコープ:api.access
ヘッダーパラメーター
Idempotency-Keystring必須

Replays the first answer for a repeated request

最小長 8 · 最大長 128
リクエストボディ
必須application/json
policyobject必須
プロパティを表示
accountingMappingsobject
デフォルト: {}
baseCurrencystring
^[A-Z]{3}$ に一致 · デフォルト: "JPY"
calculationOrderstring
デフォルト: "discount_before_tax"
許可される値:discount_before_taxdiscount_after_tax
currenciesobject
デフォルト: {}
currencyScaleinteger
最小 0 · 最大 4 · デフォルト: 0
fiscalYearStartMonthinteger
最小 1 · 最大 12 · デフォルト: 4
pricesIncludeTaxboolean
デフォルト: false
roundingstring
デフォルト: "half_up"
許可される値:half_uphalf_eventoward_zerofloorceil
taxCalculationstring
デフォルト: "per_rate_total"
許可される値:per_lineper_rate_total
taxRoundingstring
デフォルト: "floor"
許可される値:half_uphalf_eventoward_zerofloorceil
timezonestring
デフォルト: "Asia/Tokyo"
revisioninteger必須
最小 1 · 最大 2147483647
レスポンス
200

The policy as it now stands

idstring必須
最小長 1 · 最大長 255
policyCommercialPolicy必須
プロパティを表示
accountingMappingsobject必須
デフォルト: {}
baseCurrencystring必須
^[A-Z]{3}$ に一致 · デフォルト: "JPY"
calculationOrderstring必須
デフォルト: "discount_before_tax"
許可される値:discount_before_taxdiscount_after_tax
currenciesobject必須
デフォルト: {}
currencyScaleinteger必須
最小 0 · 最大 4 · デフォルト: 0
fiscalYearStartMonthinteger必須
最小 1 · 最大 12 · デフォルト: 4
pricesIncludeTaxboolean必須
デフォルト: false
roundingstring必須
デフォルト: "half_up"
許可される値:half_uphalf_eventoward_zerofloorceil
taxCalculationstring必須
デフォルト: "per_rate_total"
許可される値:per_lineper_rate_total
taxRoundingstring必須
デフォルト: "floor"
許可される値:half_uphalf_eventoward_zerofloorceil
timezonestring必須
デフォルト: "Asia/Tokyo"
revisioninteger必須
最小 1 · 最大 2147483647
400

The request body, query or parameters were refused

codestring必須
許可される値:invalid_inputnot_foundconflictforbidden
detailany
errorstring必須
reasonstring
401

The access token is missing, invalid or revoked

errorstring必須
403

The tenant's module is off, or the token's scope or the member's role does not permit the action

codestring必須
許可される値:invalid_inputnot_foundconflictforbidden
detailany
errorstring必須
reasonstring
404

No such record, or none the caller may read

codestring必須
許可される値:invalid_inputnot_foundconflictforbidden
detailany
errorstring必須
reasonstring
409

The operation conflicts with the current state

codestring必須
許可される値:invalid_inputnot_foundconflictforbidden
detailany
errorstring必須
reasonstring
413

The request exceeds the route's body limit

errorstring必須
500

An unexpected failure

errorstring必須
リクエスト
curl -X PUT '/api/v1/api/v1/settings/commercial' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Idempotency-Key: stringst' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "policy": {
    "accountingMappings": {},
    "baseCurrency": "JPY",
    "calculationOrder": "discount_before_tax",
    "currencies": {},
    "currencyScale": 0,
    "fiscalYearStartMonth": 4,
    "pricesIncludeTax": false,
    "rounding": "half_up",
    "taxCalculation": "per_line",
    "taxRounding": "half_up",
    "timezone": "Asia/Tokyo"
  },
  "revision": 1
}'
レスポンス
{
  "id": "string",
  "policy": {
    "accountingMappings": {},
    "baseCurrency": "JPY",
    "calculationOrder": "discount_before_tax",
    "currencies": {},
    "currencyScale": 0,
    "fiscalYearStartMonth": 4,
    "pricesIncludeTax": false,
    "rounding": "half_up",
    "taxCalculation": "per_line",
    "taxRounding": "half_up",
    "timezone": "Asia/Tokyo"
  },
  "revision": 1
}

このページは役に立ちましたか?