# 組織の請求情報を取得

正規URL： https://sosoapi.ai/ja/docs/api/identity-api-commercial-access-billing-status

契約: sha256:794dfa010f25b5de

選択したワークスペースと現在の組織オーナー権限に基づき、組織の実際のプラン、請求書に基づく料金、適用待ちの変更を読み取ります。特典の適用や請求内容の変更はできません。

POST /identity-api/commercial-access/billing/status

## 認証と権限

- **受け付ける認証情報の種類:** user_session, delegated_oauth, personal_access_token

- **委任された機能権限:** agent:operate

- **ワークスペースの最低ロール:** この契約ではワークスペースロールの最低要件はありません。所有権と付与権限の確認は引き続き適用されます。

- **アクセス範囲:** このユーザーがアクセスを許可されたリソース

- **すべてのワークスペースへの同意が必要:** いいえ

- **状態を変更:** いいえ

- **操作完了時：** synchronous_http_response

トークンは所有者の権利内でのみ使えます。各要求で所属、リソース所有権、選択ワークスペース、付与機能を確認します。coreとfullは表示だけを変え、アクセスは付与しません。

## リクエストのフィールド

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "workspace_id"
  ],
  "additionalProperties": false
}
```

## レスポンスと完了条件

成功時のHTTPステータス： 200

HTTP成功は完了ではなく受理の場合があります。バックグラウンド処理はIDを保存し、同じ処理を完了まで確認します。予約・受理された投稿はプラットフォーム確認後のみ公開済みです。タイムアウトだけでは結果を判断できません。

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "contract_version": {
      "type": "string",
      "const": "organization-commercial-billing/v1"
    },
    "workspace_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "organization_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "plan": {
      "type": "string",
      "enum": [
        "free",
        "founding_pro",
        "pro",
        "team"
      ]
    },
    "plan_limits": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "plan": {
              "type": "string",
              "const": "free"
            },
            "included_human_seats": {
              "anyOf": [
                {
                  "type": "number",
                  "const": 1
                },
                {
                  "type": "null"
                }
              ]
            },
            "connected_channel_limit": {
              "type": "number",
              "const": 3
            },
            "successful_destination_publishes_limit": {
              "anyOf": [
                {
                  "type": "number",
                  "const": 100
                },
                {
                  "type": "null"
                }
              ]
            },
            "pending_scheduled_posts_limit": {
              "type": "number",
              "const": 30
            },
            "history_days": {
              "type": "number",
              "const": 30
            },
            "stripe_quantity": {
              "type": "number",
              "const": 0
            }
          },
          "required": [
            "plan",
            "included_human_seats",
            "connected_channel_limit",
            "successful_destination_publishes_limit",
            "pending_scheduled_posts_limit",
            "history_days",
            "stripe_quantity"
          ]
        },
        {
          "type": "object",
          "properties": {
            "plan": {
              "type": "string",
              "const": "founding_pro"
            },
            "included_human_seats": {
              "anyOf": [
                {
                  "type": "number",
                  "const": 5
                },
                {
                  "type": "null"
                }
              ]
            },
            "connected_channel_limit": {
              "anyOf": [
                {
                  "type": "number",
                  "const": 10
                },
                {
                  "type": "number",
                  "const": 20
                }
              ]
            },
            "successful_destination_publishes_limit": {
              "anyOf": [
                {
                  "type": "number",
                  "const": 1000
                },
                {
                  "type": "null"
                }
              ]
            },
            "pending_scheduled_posts_limit": {
              "type": "number",
              "const": 300
            },
            "history_days": {
              "type": "number",
              "const": 365
            },
            "stripe_quantity": {
              "type": "number",
              "const": 1
            }
          },
          "required": [
            "plan",
            "included_human_seats",
            "connected_channel_limit",
            "successful_destination_publishes_limit",
            "pending_scheduled_posts_limit",
            "history_days",
            "stripe_quantity"
          ]
        },
        {
          "type": "object",
          "properties": {
            "plan": {
              "type": "string",
              "const": "pro"
            },
            "included_human_seats": {
              "type": "null"
            },
            "connected_channel_limit": {
              "type": "number",
              "const": 10
            },
            "successful_destination_publishes_limit": {
              "type": "null"
            },
            "unlimited_publishing_platforms": {
              "type": "array",
              "prefixItems": [
                {
                  "type": "string",
                  "const": "instagram"
                },
                {
                  "type": "string",
                  "const": "facebook"
                },
                {
                  "type": "string",
                  "const": "threads"
                },
                {
                  "type": "string",
                  "const": "youtube"
                }
              ],
              "items": false,
              "minItems": 4,
              "maxItems": 4
            },
            "pending_scheduled_posts_limit": {
              "type": "number",
              "const": 300
            },
            "history_days": {
              "type": "number",
              "const": 365
            },
            "stripe_quantity": {
              "type": "number",
              "const": 1
            }
          },
          "required": [
            "plan",
            "included_human_seats",
            "connected_channel_limit",
            "successful_destination_publishes_limit",
            "unlimited_publishing_platforms",
            "pending_scheduled_posts_limit",
            "history_days",
            "stripe_quantity"
          ]
        },
        {
          "type": "object",
          "properties": {
            "plan": {
              "type": "string",
              "const": "team"
            },
            "included_human_seats": {
              "type": "null"
            },
            "connected_channel_limit": {
              "type": "number",
              "const": 20
            },
            "successful_destination_publishes_limit": {
              "type": "null"
            },
            "unlimited_publishing_platforms": {
              "type": "array",
              "prefixItems": [
                {
                  "type": "string",
                  "const": "instagram"
                },
                {
                  "type": "string",
                  "const": "facebook"
                },
                {
                  "type": "string",
                  "const": "threads"
                },
                {
                  "type": "string",
                  "const": "youtube"
                }
              ],
              "items": false,
              "minItems": 4,
              "maxItems": 4
            },
            "pending_scheduled_posts_limit": {
              "type": "number",
              "const": 300
            },
            "history_days": {
              "type": "number",
              "const": 365
            },
            "stripe_quantity": {
              "type": "number",
              "const": 1
            }
          },
          "required": [
            "plan",
            "included_human_seats",
            "connected_channel_limit",
            "successful_destination_publishes_limit",
            "unlimited_publishing_platforms",
            "pending_scheduled_posts_limit",
            "history_days",
            "stripe_quantity"
          ]
        }
      ]
    },
    "pricing": {
      "oneOf": [
        {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "const": "available"
                },
                "source_kind": {
                  "type": "string",
                  "const": "standard"
                },
                "authority": {
                  "type": "string",
                  "const": "default_free"
                },
                "plan": {
                  "type": "string",
                  "const": "free"
                },
                "plan_version": {
                  "anyOf": [
                    {
                      "type": "number",
                      "const": 1
                    },
                    {
                      "type": "number",
                      "const": 2
                    }
                  ]
                },
                "currency": {
                  "type": "string",
                  "const": "usd"
                },
                "interval_unit": {
                  "type": "string",
                  "const": "month"
                },
                "monthly_amount_cents": {
                  "type": "number",
                  "const": 0
                }
              },
              "required": [
                "status",
                "source_kind",
                "authority",
                "plan",
                "plan_version",
                "currency",
                "interval_unit",
                "monthly_amount_cents"
              ]
            },
            {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "const": "available"
                },
                "source_kind": {
                  "type": "string",
                  "const": "standard"
                },
                "authority": {
                  "type": "string",
                  "const": "verified_invoice"
                },
                "plan": {
                  "type": "string",
                  "const": "pro"
                },
                "plan_version": {
                  "type": "number",
                  "const": 1
                },
                "currency": {
                  "type": "string",
                  "const": "usd"
                },
                "interval_unit": {
                  "type": "string",
                  "const": "month"
                },
                "monthly_amount_cents": {
                  "type": "number",
                  "const": 4000
                },
                "verified_period": {
                  "type": "object",
                  "properties": {
                    "period_start": {
                      "type": "string",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                      "format": "date-time"
                    },
                    "period_end": {
                      "type": "string",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "period_start",
                    "period_end"
                  ]
                }
              },
              "required": [
                "status",
                "source_kind",
                "authority",
                "plan",
                "plan_version",
                "currency",
                "interval_unit",
                "monthly_amount_cents",
                "verified_period"
              ]
            },
            {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "const": "available"
                },
                "source_kind": {
                  "type": "string",
                  "const": "standard"
                },
                "authority": {
                  "type": "string",
                  "const": "verified_invoice"
                },
                "plan": {
                  "type": "string",
                  "const": "team"
                },
                "plan_version": {
                  "type": "number",
                  "const": 1
                },
                "currency": {
                  "type": "string",
                  "const": "usd"
                },
                "interval_unit": {
                  "type": "string",
                  "const": "month"
                },
                "monthly_amount_cents": {
                  "type": "number",
                  "const": 8000
                },
                "verified_period": {
                  "type": "object",
                  "properties": {
                    "period_start": {
                      "type": "string",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                      "format": "date-time"
                    },
                    "period_end": {
                      "type": "string",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "period_start",
                    "period_end"
                  ]
                }
              },
              "required": [
                "status",
                "source_kind",
                "authority",
                "plan",
                "plan_version",
                "currency",
                "interval_unit",
                "monthly_amount_cents",
                "verified_period"
              ]
            }
          ]
        },
        {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "const": "available"
                },
                "source_kind": {
                  "type": "string",
                  "const": "promotional"
                },
                "authority": {
                  "type": "string",
                  "const": "verified_invoice"
                },
                "plan": {
                  "type": "string",
                  "const": "pro"
                },
                "plan_version": {
                  "type": "number",
                  "const": 2
                },
                "currency": {
                  "type": "string",
                  "const": "usd"
                },
                "interval_unit": {
                  "type": "string",
                  "const": "month"
                },
                "monthly_amount_cents": {
                  "type": "number",
                  "const": 1900
                },
                "verified_period": {
                  "type": "object",
                  "properties": {
                    "period_start": {
                      "type": "string",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                      "format": "date-time"
                    },
                    "period_end": {
                      "type": "string",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "period_start",
                    "period_end"
                  ]
                }
              },
              "required": [
                "status",
                "source_kind",
                "authority",
                "plan",
                "plan_version",
                "currency",
                "interval_unit",
                "monthly_amount_cents",
                "verified_period"
              ]
            },
            {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "const": "available"
                },
                "source_kind": {
                  "type": "string",
                  "const": "promotional"
                },
                "authority": {
                  "type": "string",
                  "const": "verified_invoice"
                },
                "plan": {
                  "type": "string",
                  "const": "team"
                },
                "plan_version": {
                  "type": "number",
                  "const": 2
                },
                "currency": {
                  "type": "string",
                  "const": "usd"
                },
                "interval_unit": {
                  "type": "string",
                  "const": "month"
                },
                "monthly_amount_cents": {
                  "type": "number",
                  "const": 3900
                },
                "verified_period": {
                  "type": "object",
                  "properties": {
                    "period_start": {
                      "type": "string",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                      "format": "date-time"
                    },
                    "period_end": {
                      "type": "string",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "period_start",
                    "period_end"
                  ]
                }
              },
              "required": [
                "status",
                "source_kind",
                "authority",
                "plan",
                "plan_version",
                "currency",
                "interval_unit",
                "monthly_amount_cents",
                "verified_period"
              ]
            }
          ]
        },
        {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "const": "available"
                },
                "source_kind": {
                  "type": "string",
                  "const": "legacy"
                },
                "plan": {
                  "type": "string",
                  "const": "founding_pro"
                },
                "plan_version": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 2147483647
                },
                "currency": {
                  "type": "string",
                  "const": "usd"
                },
                "interval_unit": {
                  "type": "string",
                  "const": "month"
                },
                "monthly_amount_cents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 2147483647
                },
                "authority": {
                  "type": "string",
                  "const": "legacy_commitment"
                }
              },
              "required": [
                "status",
                "source_kind",
                "plan",
                "plan_version",
                "currency",
                "interval_unit",
                "monthly_amount_cents",
                "authority"
              ]
            },
            {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "const": "available"
                },
                "source_kind": {
                  "type": "string",
                  "const": "legacy"
                },
                "plan": {
                  "type": "string",
                  "const": "founding_pro"
                },
                "plan_version": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 2147483647
                },
                "currency": {
                  "type": "string",
                  "const": "usd"
                },
                "interval_unit": {
                  "type": "string",
                  "const": "month"
                },
                "monthly_amount_cents": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 2147483647
                },
                "authority": {
                  "type": "string",
                  "const": "verified_invoice"
                },
                "verified_period": {
                  "type": "object",
                  "properties": {
                    "period_start": {
                      "type": "string",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                      "format": "date-time"
                    },
                    "period_end": {
                      "type": "string",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "period_start",
                    "period_end"
                  ]
                }
              },
              "required": [
                "status",
                "source_kind",
                "plan",
                "plan_version",
                "currency",
                "interval_unit",
                "monthly_amount_cents",
                "authority",
                "verified_period"
              ]
            }
          ]
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "unavailable"
            },
            "source_kind": {
              "type": "string",
              "const": "manual"
            },
            "authority": {
              "type": "string",
              "const": "manual_grant"
            },
            "plan": {
              "type": "string",
              "enum": [
                "free",
                "founding_pro",
                "pro",
                "team"
              ]
            },
            "plan_version": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 2147483647
            },
            "monthly_amount_cents": {
              "type": "null"
            },
            "reason_code": {
              "type": "string",
              "const": "recurring_charge_not_observed"
            }
          },
          "required": [
            "status",
            "source_kind",
            "authority",
            "plan",
            "plan_version",
            "monthly_amount_cents",
            "reason_code"
          ]
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "unavailable"
            },
            "source_kind": {
              "type": "string",
              "const": "unavailable"
            },
            "authority": {
              "type": "string",
              "const": "not_observed"
            },
            "plan": {
              "type": "string",
              "enum": [
                "free",
                "founding_pro",
                "pro",
                "team"
              ]
            },
            "plan_version": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 2147483647
                },
                {
                  "type": "null"
                }
              ]
            },
            "monthly_amount_cents": {
              "type": "null"
            },
            "reason_code": {
              "type": "string",
              "enum": [
                "current_period_proof_missing",
                "pricing_authority_not_observed",
                "catalog_binding_not_observed"
              ]
            }
          },
          "required": [
            "status",
            "source_kind",
            "authority",
            "plan",
            "plan_version",
            "monthly_amount_cents",
            "reason_code"
          ]
        }
      ]
    },
    "purchase_options": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "unavailable"
            },
            "reason_code": {
              "type": "string",
              "enum": [
                "checkout_disabled",
                "catalog_unconfigured"
              ]
            }
          },
          "required": [
            "status",
            "reason_code"
          ]
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "configured"
            },
            "catalog_version": {
              "type": "string",
              "const": "organization-monthly-2026-10-24"
            },
            "plans": {
              "type": "object",
              "properties": {
                "pro": {
                  "type": "object",
                  "properties": {
                    "plan": {
                      "type": "string",
                      "const": "pro"
                    },
                    "plan_version": {
                      "type": "number",
                      "const": 1
                    },
                    "currency": {
                      "type": "string",
                      "const": "usd"
                    },
                    "interval_unit": {
                      "type": "string",
                      "const": "month"
                    },
                    "monthly_amount_cents": {
                      "type": "number",
                      "const": 4000
                    }
                  },
                  "required": [
                    "plan",
                    "plan_version",
                    "currency",
                    "interval_unit",
                    "monthly_amount_cents"
                  ]
                },
                "team": {
                  "type": "object",
                  "properties": {
                    "plan": {
                      "type": "string",
                      "const": "team"
                    },
                    "plan_version": {
                      "type": "number",
                      "const": 1
                    },
                    "currency": {
                      "type": "string",
                      "const": "usd"
                    },
                    "interval_unit": {
                      "type": "string",
                      "const": "month"
                    },
                    "monthly_amount_cents": {
                      "type": "number",
                      "const": 8000
                    }
                  },
                  "required": [
                    "plan",
                    "plan_version",
                    "currency",
                    "interval_unit",
                    "monthly_amount_cents"
                  ]
                }
              },
              "required": [
                "pro",
                "team"
              ]
            }
          },
          "required": [
            "status",
            "catalog_version",
            "plans"
          ]
        }
      ]
    },
    "pending_change": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "not_observed"
            }
          },
          "required": [
            "status"
          ]
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "scheduled",
                "blocked_by_cancellation",
                "terminated"
              ]
            },
            "target_plan": {
              "type": "string",
              "enum": [
                "pro",
                "team"
              ]
            },
            "target_plan_version": {
              "anyOf": [
                {
                  "type": "number",
                  "const": 1
                },
                {
                  "type": "number",
                  "const": 2
                }
              ]
            },
            "source_kind": {
              "type": "string",
              "enum": [
                "standard",
                "promotional"
              ]
            },
            "currency": {
              "type": "string",
              "const": "usd"
            },
            "interval_unit": {
              "type": "string",
              "const": "month"
            },
            "monthly_amount_cents": {
              "anyOf": [
                {
                  "type": "number",
                  "const": 4000
                },
                {
                  "type": "number",
                  "const": 8000
                },
                {
                  "type": "number",
                  "const": 1900
                },
                {
                  "type": "number",
                  "const": 3900
                }
              ]
            },
            "effective_at": {
              "type": "string",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
              "format": "date-time"
            },
            "activation": {
              "type": "string",
              "const": "next_paid_invoice"
            }
          },
          "required": [
            "status",
            "target_plan",
            "target_plan_version",
            "source_kind",
            "currency",
            "interval_unit",
            "monthly_amount_cents",
            "effective_at",
            "activation"
          ]
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "unavailable"
            },
            "reason_code": {
              "type": "string",
              "const": "pending_change_authority_not_observed"
            }
          },
          "required": [
            "status",
            "reason_code"
          ]
        }
      ]
    },
    "continuous_lock": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "not_observed"
            }
          },
          "required": [
            "status"
          ]
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "none"
            },
            "reason_code": {
              "type": "string",
              "const": "standard_subscription"
            }
          },
          "required": [
            "status",
            "reason_code"
          ]
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "active"
            },
            "source_kind": {
              "type": "string",
              "const": "promotional"
            },
            "currency": {
              "type": "string",
              "const": "usd"
            },
            "interval_unit": {
              "type": "string",
              "const": "month"
            },
            "pro_monthly_amount_cents": {
              "type": "number",
              "const": 1900
            },
            "team_monthly_amount_cents": {
              "type": "number",
              "const": 3900
            }
          },
          "required": [
            "status",
            "source_kind",
            "currency",
            "interval_unit",
            "pro_monthly_amount_cents",
            "team_monthly_amount_cents"
          ]
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "terminated"
            },
            "ended_at": {
              "type": "string",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
              "format": "date-time"
            }
          },
          "required": [
            "status",
            "ended_at"
          ]
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "unavailable"
            },
            "reason_code": {
              "type": "string",
              "const": "commitment_authority_not_observed"
            }
          },
          "required": [
            "status",
            "reason_code"
          ]
        }
      ]
    },
    "observed_at": {
      "type": "string",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      "format": "date-time"
    }
  },
  "required": [
    "contract_version",
    "workspace_id",
    "organization_id",
    "plan",
    "plan_limits",
    "pricing",
    "purchase_options",
    "pending_change",
    "continuous_lock",
    "observed_at"
  ]
}
```

## エラーと安全な再試行

HTTPステータスとレスポンス本文を確認します。400の検証エラーにはZodErrorが含まれる場合があります。ハンドラーエラーはerror、message、codeを使用します。診断用にrequest_idまたはx-request-idを保持し、認証情報は含めないでください。401/403はアクセス問題を解消してから再試行し、429はRetry-Afterに従います。書き込み結果が不確か、または5xxの場合は、まず既存の結果を取得してください。冪等性キーは対応する操作でのみ再利用します。再試行の挙動は操作ごとに異なり、厳密に一回の配信は保証しません。

## 例

スキーマ確認済みの架空値の例です。認可されたID、準備済みメディア、確認済みの公開日時に置き換え、書き込み前に適格性を確認してください。このページはAPIを呼びません。

サーバーのSOSOAPI_ACCESS_TOKENに操作が受け付ける認証情報を設定し、ブラウザーコードに含めないでください。エージェントはsosoapi auth loginでブラウザーログインし、CLIに更新を任せます。

request.json

```json
{
  "workspace_id": "11111111-1111-4111-8111-111111111111"
}
```

cURL

```bash
curl --request POST \
  "https://gqeshlawtcexsapabaui.supabase.co/functions/v1/identity-api/commercial-access/billing/status" \
  -H "Authorization: Bearer $SOSOAPI_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  --data-binary @request.json
```

JavaScript

```js
// Server-side JavaScript. Do not print tokens or credential-bearing responses.
const token = process.env.SOSOAPI_ACCESS_TOKEN;
if (!token) throw new Error("Set an accepted credential for this operation");
const response = await fetch("https://gqeshlawtcexsapabaui.supabase.co/functions/v1/identity-api/commercial-access/billing/status", {
  method: "POST",
  headers: { "Content-Type": "application/json", Authorization: "Bearer " + token },
  body: JSON.stringify({
  "workspace_id": "11111111-1111-4111-8111-111111111111"
})
});
const result = await response.json();
// Check response.ok, the operation-specific body and completion state before continuing.
```

CLI

```bash
npx sosoapi api post /identity-api/commercial-access/billing/status < request.json
```

合成レスポンス例

```json
{
  "contract_version": "organization-commercial-billing/v1",
  "workspace_id": "11111111-1111-4111-8111-111111111111",
  "organization_id": "11111111-1111-4111-8111-111111111111",
  "plan": "free",
  "plan_limits": {
    "plan": "free",
    "included_human_seats": null,
    "connected_channel_limit": 3,
    "successful_destination_publishes_limit": null,
    "pending_scheduled_posts_limit": 30,
    "history_days": 30,
    "stripe_quantity": 0
  },
  "pricing": {
    "status": "available",
    "source_kind": "standard",
    "authority": "default_free",
    "plan": "free",
    "plan_version": 1,
    "currency": "usd",
    "interval_unit": "month",
    "monthly_amount_cents": 0
  },
  "purchase_options": {
    "status": "unavailable",
    "reason_code": "checkout_disabled"
  },
  "pending_change": {
    "status": "not_observed"
  },
  "continuous_lock": {
    "status": "not_observed"
  },
  "observed_at": "2099-01-15T09:00:00Z"
}
```

## 関連ツールとガイド

MCP: sosoapi_get_organization_billing

[APIリファレンス](https://sosoapi.ai/ja/docs/api)
