openapi: 3.1.0 info: title: Adapty サーバーサイド API version: 1.0.0 servers: - url: https://api.adapty.io description: 本番サーバー paths: /api/v2/server-side-api/profile/: post: summary: プロファイルを作成する description: Adaptyにアプリの新しいエンドユーザーを作成します。 operationId: createProfile tags: - Profile security: - apikeyAuth: [] parameters: - name: adapty-customer-user-id in: header required: false schema: type: string description: お客様のシステムにおける顧客の一意のIDです。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 - name: adapty-profile-id in: header required: false schema: type: string description: お客様のシステムにおけるプロファイルの一意のIDです。匿名プロファイルを扱う場合に最適な選択肢です。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 - name: adapty-platform in: header required: false schema: type: string description: ユーザーがアプリをインストールしているデバイスのプラットフォーム responses: '200': description: プロファイルが正常に作成されました content: application/json: schema: $ref: '#/components/schemas/ProfileResponse' example: data: app_id: 14c3d623-2f3a-455a-aa86-ef83dff6913b profile_id: 3286abd3-48b0-4e9c-a5f6-ac0a006804a6 customer_user_id: jane.doe@example.com total_revenue_usd: 0 segment_hash: 8f45947bad31ab0c timestamp: 1736425645861 custom_attributes: - key: favourite_sport value: yoga access_levels: [] subscriptions: [] non_subscriptions: [] '401': description: 認証エラー content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: errors: - source: non_field_errors errors: - Authentication credentials were not provided. error_code: not_authenticated status_code: 401 '500': description: 内部サーバーエラー requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ProfileRequest' example: first_name: Jane last_name: Doe gender: f email: jane.doe@example.com phone_number: '+1234567890' birthday: '2000-12-31' ip_country: FR store_country: US store: app_store analytics_disabled: true custom_attributes: - key: favourite_sport value: yoga installation_meta: device_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 device: string locale: en os: string platform: iOS timezone: Europe/Rome user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 17_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1 Mobile/15E148 Safari/604.1 idfa: EA7583CD-A667-48BC-B806-42ECB2B48333 idfv: E9D48DA5-3930-4B41-8521-D953AECD2F33 advertising_id: '' android_id: '' android_app_set_id: '' get: summary: プロファイルを取得する description: アプリの既存のエンドユーザーの詳細を取得します。 operationId: getProfile tags: - Profile security: - apikeyAuth: [] parameters: - name: adapty-customer-user-id in: header required: false schema: type: string description: お客様のシステムにおける顧客の一意のIDです。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 - name: adapty-profile-id in: header required: false schema: type: string description: お客様のシステムにおけるプロファイルの一意のIDです。匿名プロファイルを扱う場合に最適な選択肢です。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 responses: '200': description: プロファイルが正常に取得されました content: application/json: schema: $ref: '#/components/schemas/ProfileResponse' example: data: app_id: 14c3d333-2f3a-455a-aa86-ef83dff6913b profile_id: d8533a10-bcce-4e33-8c9d-88b05ac56559 customer_user_id: 77B14FB4-FD2A-4D38-AA3A-4C433F79863C total_revenue_usd: 9.99 segment_hash: fdaeef7f8aaa33c9 timestamp: 1733324566777 custom_attributes: - key: favourite_sport value: yoga access_levels: - access_level_id: premium store: app_store store_product_id: unlimited.9999 store_base_plan_id: null store_transaction_id: '2000000335013007' store_original_transaction_id: '2000000335013007' offer: null starts_at: null purchased_at: '2024-12-24T10:50:23+00:00' originally_purchased_at: '2024-12-24T10:50:23+00:00' expires_at: null renewal_cancelled_at: '2025-01-05T13:27:47.461425+00:00' billing_issue_detected_at: null is_in_grace_period: false cancellation_reason: null subscriptions: - store: app_store store_product_id: unlimited.9999 store_base_plan_id: null store_transaction_id: '2000000815013007' store_original_transaction_id: '2000000815013007' offer: null environment: Sandbox purchased_at: '2024-12-24T10:50:23+00:00' originally_purchased_at: '2024-12-24T10:50:23+00:00' expires_at: null renewal_cancelled_at: null billing_issue_detected_at: null is_in_grace_period: false cancellation_reason: null non_subscriptions: - purchase_id: 7a5f9a7d-e236-33e6-96d8-53a3c59c5562 store: app_store store_product_id: 1year.premium store_base_plan_id: null store_transaction_id: '30002109551456' store_original_transaction_id: '30002109551456' purchased_at: '2022-10-12T09:42:50+00:00' environment: Production is_refund: false is_consumable: false '401': description: 認証エラー content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: errors: - source: non_field_errors errors: - Authentication credentials were not provided. error_code: not_authenticated status_code: 401 '404': description: プロファイルが見つかりません content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: errors: - source: null errors: - Profile not found error_code: profile_does_not_exist status_code: 404 '500': description: 内部サーバーエラー patch: summary: プロファイルを更新する description: ユーザープロファイル情報を更新します operationId: updateProfile tags: - Profile security: - apikeyAuth: [] parameters: - name: adapty-customer-user-id in: header required: false schema: type: string description: お客様のシステムにおける顧客の一意のIDです。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 - name: adapty-profile-id in: header required: false schema: type: string description: お客様のシステムにおけるプロファイルの一意のIDです。匿名プロファイルを扱う場合に最適な選択肢です。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 responses: '200': description: プロファイルが正常に更新されました content: application/json: schema: $ref: '#/components/schemas/ProfileResponse' '400': description: リクエストが不正です content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: 認証エラー content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: プロファイルが見つかりません content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: 内部サーバーエラー requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ProfileRequest' delete: summary: プロファイルを削除する description: ユーザープロファイルを削除します operationId: deleteProfile tags: - Profile security: - apikeyAuth: [] parameters: - name: adapty-customer-user-id in: header required: false schema: type: string description: お客様のシステムにおける顧客の一意のIDです。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 - name: adapty-profile-id in: header required: false schema: type: string description: お客様のシステムにおけるプロファイルの一意のIDです。匿名プロファイルを扱う場合に最適な選択肢です。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 responses: '204': description: プロファイルが正常に削除されました '401': description: 認証エラー content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: プロファイルが見つかりません content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: 内部サーバーエラー /api/v2/server-side-api/purchase/set/transaction/: post: summary: トランザクションを設定する description: | Adapty でアプリのエンドユーザーに新しいトランザクションを作成し、アクセスレベルを付与します。このメソッドで作成されたトランザクションはアナリティクスおよびイベントフィードに表示され、すべてのインテグレーションに送信されます。 **既存のサブスクリプションの更新:** 新しい `subscription_renewed` イベントを発生させずに `billing_issue_detected_at` または `renew_status_changed_at` を更新するには、既存の `store_transaction_id` を(同じ `store_original_transaction_id` の下で)再利用してください。新しい `store_transaction_id` を送信すると、新しいトランザクションとして扱われ、`subscription_renewed` イベントが発火します。 operationId: setTransaction tags: - Purchase security: - apikeyAuth: [] parameters: - name: adapty-customer-user-id in: header required: false schema: type: string description: お客様のシステムにおける顧客の一意の ID。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 - name: adapty-profile-id in: header required: false schema: type: string description: お客様のシステムにおけるプロファイルの一意の ID。匿名プロファイルを扱う場合に最適な選択肢です。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 responses: '200': description: トランザクションが正常に記録されました content: application/json: schema: $ref: '#/components/schemas/ProfileResponse' '400': description: リクエストが不正です content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: 認証されていません content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: プロファイルが見つかりません content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: 内部サーバーエラー requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/TransactionDTORequest' examples: one_time_purchase: summary: 買い切り購入の例 value: purchase_type: one_time_purchase store: app_store environment: Production store_product_id: premium_lifetime store_transaction_id: '1000000123456789' store_original_transaction_id: '1000000123456789' is_family_shared: false price: country: US currency: USD value: 9.99 purchased_at: '2024-01-15T10:30:00Z' variation_id: variation_123 offer: null refunded_at: null cancellation_reason: null subscription: summary: サブスクリプションの例 value: purchase_type: subscription store: app_store environment: Production store_product_id: premium_monthly store_transaction_id: '1000000123456789' store_original_transaction_id: '1000000123456789' is_family_shared: false price: country: US currency: USD value: 4.99 purchased_at: '2024-01-15T10:30:00Z' originally_purchased_at: '2024-01-15T10:30:00Z' expires_at: '2024-02-15T10:30:00Z' renew_status: true renew_status_changed_at: null billing_issue_detected_at: null grace_period_expires_at: null variation_id: variation_123 offer: category: introductory type: free_trial id: trial_offer_123 refunded_at: null cancellation_reason: null /api/v2/server-side-api/purchase/profile/grant/access-level/: post: summary: アクセスレベルを付与する description: トランザクション情報なしでエンドユーザーにアクセスレベルを付与します。紹介報酬やプロダクトに関連するその他のイベントに活用できます。このメソッドで付与されたアクセスレベルはアナリティクスには反映されません。Webhook インテグレーションにのみ送信され、その場合のみイベントフィードに表示されます。 operationId: grantAccessLevel tags: - Purchase security: - apikeyAuth: [] parameters: - name: adapty-customer-user-id in: header required: false schema: type: string description: お客様のシステムにおける顧客の一意の ID。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 - name: adapty-profile-id in: header required: false schema: type: string description: お客様のシステムにおけるプロファイルの一意の ID。匿名プロファイルを扱う場合に最適な選択肢です。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 responses: '200': description: アクセスレベルが正常に付与されました content: application/json: schema: $ref: '#/components/schemas/ProfileResponse' '400': description: リクエストが不正です content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: 認証されていません content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: プロファイルが見つかりません content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: 内部サーバーエラー requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/GrantAccessRequest' examples: immediate_grant: summary: 即時にアクセスを付与する value: access_level_id: premium scheduled_grant: summary: 開始日と終了日を指定してアクセスを付与する value: access_level_id: premium starts_at: '2024-01-01T00:00:00Z' expires_at: '2024-12-31T23:59:59Z' lifetime_grant: summary: 永続アクセスを付与する value: access_level_id: premium starts_at: '2024-01-01T00:00:00Z' /api/v2/server-side-api/purchase/profile/revoke/access-level/: post: summary: アクセスレベルの取り消し description: Adapty内のアプリのエンドユーザーからアクセスレベルを削除します。 operationId: revokeAccessLevel tags: - Purchase security: - apikeyAuth: [] parameters: - name: adapty-customer-user-id in: header required: false schema: type: string description: お客様のシステムにおける顧客の一意のIDです。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 - name: adapty-profile-id in: header required: false schema: type: string description: お客様のシステムにおけるプロファイルの一意のIDです。匿名プロファイルを扱う場合に最適な選択肢です。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 responses: '200': description: アクセスレベルが正常に取り消されました content: application/json: schema: $ref: '#/components/schemas/ProfileResponse' '400': description: リクエストが不正です content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: 認証されていません content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: プロファイルが見つかりません content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: 内部サーバーエラー requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RevokeAccessRequest' examples: immediate_revoke: summary: アクセスを即時取り消す value: access_level_id: premium scheduled_revoke: summary: アクセスの取り消しをスケジュールする value: access_level_id: premium revoke_at: '2024-12-31T23:59:59Z' /api/v2/server-side-api/purchase/profile/refund-saver/settings/: get: summary: Refund Saver 設定を取得する description: このユーザーの Refund Saver 設定を取得します。Adapty がストアに対して返金リクエストを拒否または承認するよう求めるかどうかの設定です。この設定は App Store と Google Play の両方に適用される単一の値です。また、このユーザーのデータ共有設定(ユーザーが Apple とデータを共有することに同意したかどうか)も取得します。同意は App Store にのみ適用されます。 operationId: getRefundSaverSettings tags: - Refund Saver security: - apikeyAuth: [] parameters: - name: adapty-customer-user-id in: header required: false schema: type: string description: お客様のシステムにおける顧客の一意の ID。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 - name: adapty-profile-id in: header required: false schema: type: string format: uuid description: お客様のシステムにおけるプロファイルの一意の ID。匿名プロファイルを扱う場合に最適です。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 responses: '200': description: 設定の取得に成功しました content: application/json: schema: $ref: '#/components/schemas/RefundSaverSettingsResponse' example: profile_id: e5aab402-b1bd-4039-b632-57a91ebc0779 settings: consent: true custom_preference: no_preference '400': description: リクエストが不正です content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: profile_does_not_exist: summary: プロファイルが存在しません value: errors: - Profile does not exist error_code: profile_does_not_exist status_code: 400 '401': description: 認証されていません content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: errors: - Invalid API key error_code: unauthorized status_code: 401 '500': description: 内部サーバーエラー content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' post: summary: Refund Saver 設定を更新する description: ユーザーごとに返金の設定を個別に行い、ユーザーがデータ共有に同意したかどうかを記録します。この設定は App Store と Google Play の両方に適用される単一の値です。同意は App Store にのみ適用されます。各ストアにはアプリレベルのデフォルト設定があり、Adapty ダッシュボードからすべてのユーザーに対して変更できます。特定のユーザーの設定を調整するには、ダッシュボード、Adapty SDK、またはサーバーサイド API を使用してください。 operationId: setRefundSaverSettings tags: - Refund Saver security: - apikeyAuth: [] parameters: - name: adapty-customer-user-id in: header required: false schema: type: string description: お客様のシステムにおける顧客の一意の ID。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 - name: adapty-profile-id in: header required: false schema: type: string format: uuid description: お客様のシステムにおけるプロファイルの一意の ID。匿名プロファイルを扱う場合に最適です。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RefundSaverSettingsRequest' example: custom_preference: grant consent: true responses: '200': description: 設定の更新に成功しました content: application/json: schema: $ref: '#/components/schemas/RefundSaverSettingsResponse' example: profile_id: e5aab402-b1bd-4039-b632-57a91ebc0779 settings: consent: true custom_preference: grant '400': description: リクエストが不正です content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: profile_does_not_exist: summary: プロファイルが存在しません value: errors: - Profile does not exist error_code: profile_does_not_exist status_code: 400 validation_error: summary: バリデーションエラー value: errors: - Profile refund saver settings must have either consent or custom_preference or both error_code: validation_error status_code: 400 '401': description: 認証されていません content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: errors: - Invalid API key error_code: unauthorized status_code: 401 '500': description: 内部サーバーエラー content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /api/v1/sdk/purchase/stripe/token/validate/: post: summary: Stripe購入を検証する description: | Adapty ダッシュボードのアプリ設定に登録されたStripeの認証情報を使用して、指定されたStripeトークンで購入を検証します。 購入が有効な場合、Stripeからのトランザクション履歴が、指定されたcustomer_user_idを持つAdatyのプロファイルにインポートされます。 該当するcustomer_user_idのプロファイルが存在しない場合は、新たに作成されます。 プロファイルイベントはその過程で生成され、インポートされたトランザクションはMTRに計上されます。 operationId: validateStripePurchase tags: - Stripe security: - apikeyAuth: [] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/StripeValidationRequest' example: data: type: stripe_receipt_validation_result attributes: customer_user_id: stripe_token: responses: '200': description: 購入が正常に検証されました content: application/vnd.api+json: schema: $ref: '#/components/schemas/StripeValidationResponse' example: data: null '400': description: 不正なリクエスト content: application/vnd.api+json: schema: $ref: '#/components/schemas/StripeErrorResponse' example: errors: - detail: none is not an allowed value source: pointer: /data/attributes/stripe_token status: '400' '401': description: 認証エラー content: application/vnd.api+json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: 内部サーバーエラー content: application/vnd.api+json: schema: $ref: '#/components/schemas/ErrorResponse' /api/v2/server-side-api/purchase/paddle/token/validate/: post: summary: Paddle購入を検証する description: | Adapty ダッシュボードのアプリ設定に登録されたPaddleの認証情報を使用して、指定されたPaddleトークンで購入を検証します。 購入が有効な場合、PaddleからAdaptyのプロファイルへトランザクション履歴がインポートされ、指定されたcustomer_user_idに紐付けられます。 該当するcustomer_user_idのプロファイルが存在しない場合は、新規に作成されます。 operationId: validatePaddlePurchase tags: - Paddle security: - apikeyAuth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PaddleValidationRequest' example: customer_user_id: paddle_token: live_7d279f61a3339fed520f7cd8c08 responses: '200': description: 購入の検証に成功しました content: application/json: schema: $ref: '#/components/schemas/ProfileResponse' example: data: app_id: 14c3d623-2f3a-455a-aa86-ef83dff6913b profile_id: 3286abd3-48b0-4e9c-a5f6-ac0a006804a6 customer_user_id: Jane.doe@example.com total_revenue_usd: 0 segment_hash: 8f45947bad31ab0c timestamp: 1736436751469 custom_attributes: - key: favourite_sport value: yoga access_levels: [] subscriptions: - purchase_id: 5a7ab471-2299-45f7-ad69-1d395c1256e3 store: app_store store_product_id: 1year.premium store_base_plan_id: null store_transaction_id: '30002109551456' store_original_transaction_id: '30002109551456' purchased_at: '2022-10-12T09:42:50+00:00' environment: Production is_refund: false is_consumable: false non_subscriptions: [] '400': description: リクエストが不正です content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: no_products_found: summary: プロダクトが見つかりません value: errors: - No products found error_code: no_products_found status_code: 400 paddle_api_key_not_found: summary: Paddle APIキーが見つかりません value: errors: - Paddle API key not found error_code: paddle_api_key_not_found status_code: 400 invalid_paddle_credentials_or_purchase_not_found: summary: Paddleの認証情報が無効、または購入が見つかりません value: errors: - Invalid Paddle credentials or purchase not found error_code: invalid_paddle_credentials_or_purchase_not_found status_code: 400 '401': description: 認証されていません content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: errors: - Invalid API key error_code: unauthorized status_code: 401 '500': description: 内部サーバーエラー content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /api/v2/server-side-api/integration/profile/set/integration-identifiers/: get: summary: インテグレーション識別子の取得 description: プロファイルのインテグレーション識別子を取得します。 operationId: getIntegrationIdentifiers tags: - Integration security: - apikeyAuth: [] parameters: - name: adapty-customer-user-id in: header required: false schema: type: string description: お客様のシステムにおける顧客の一意のIDです。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 - name: adapty-profile-id in: header required: false schema: type: string format: uuid description: お客様のシステムにおけるプロファイルの一意のIDです。匿名プロファイルを扱う場合に最適な選択肢です。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 responses: '200': description: インテグレーション識別子が正常に取得されました content: application/json: schema: $ref: '#/components/schemas/IntegrationIdentifiersResponse' example: facebook_anonymous_id: XZ7EF7D15E-8FA1-49D8-B180-918EB333E42A amplitude_user_id: null amplitude_device_id: null mixpanel_user_id: 33w6yv5DPqVlyMVbjW31xvzJLtJ3 appmetrica_profile_id: null appmetrica_device_id: null one_signal_player_id: null one_signal_subscription_id: 333ed338-757d-466a-a672-ab92db196a1f pushwoosh_hwid: null firebase_app_instance_id: C333B35DF1DB418E99F7B815E9F5C549 airbridge_device_id: null appsflyer_id: 1741933337626-3179568 branch_id: null adjust_device_id: null tenjin_analytics_installation_id: null posthog_distinct_user_id: null '401': description: 認証エラー content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: errors: - Invalid API key error_code: unauthorized status_code: 401 '404': description: プロファイルが見つかりません content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: errors: - Profile not found error_code: profile_not_found status_code: 404 '500': description: 内部サーバーエラー content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' post: summary: インテグレーション識別子の設定 description: プロファイルにインテグレーション識別子を追加します。 operationId: setIntegrationIdentifiers tags: - Integration security: - apikeyAuth: [] parameters: - name: adapty-customer-user-id in: header required: false schema: type: string description: お客様のシステムにおける顧客の一意のIDです。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 - name: adapty-profile-id in: header required: false schema: type: string format: uuid description: お客様のシステムにおけるプロファイルの一意のIDです。匿名プロファイルを扱う場合に最適な選択肢です。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/IntegrationIdentifiersRequest' example: pushwoosh_hwid: example_pushwoosh_hwid mixpanel_user_id: example_mixpanel_user_id facebook_anonymous_id: example_facebook_anonymous_id firebase_app_instance_id: example_firebase_app_instance_id amplitude_user_id: example_amplitude_user_id amplitude_device_id: example_amplitude_device_id appmetrica_device_id: example_appmetrica_device_id appmetrica_profile_id: example_appmetrica_profile_id one_signal_subscription_id: example_one_signal_subscription_id one_signal_player_id: example_one_signal_player_id branch_id: example_branch_id appsflyer_id: example_appsflyer_id adjust_device_id: example_adjust_device_id airbridge_device_id: example_airbridge_device_id tenjin_analytics_installation_id: example_tenjin_analytics_installation_id posthog_distinct_user_id: example_posthog_distinct_user_id responses: '200': description: インテグレーション識別子が正常に設定されました。レスポンスボディは空です。 '400': description: リクエストが不正です content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: errors: - At least one integration identifier must be provided. error_code: validation_error status_code: 400 '401': description: 認証エラー content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: errors: - Invalid API key error_code: unauthorized status_code: 401 '404': description: プロファイルが見つかりません content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: errors: - Profile not found error_code: profile_not_found status_code: 404 '500': description: 内部サーバーエラー content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /api/v2/server-side-api/paywalls/: get: summary: ペイウォール一覧の取得 description: アプリ内のペイウォール一覧を取得します。 operationId: listPaywalls tags: - Paywalls security: - apikeyAuth: [] parameters: - name: page[number] in: query required: false schema: type: integer minimum: 1 default: 1 description: ページネーションのページ番号 - name: page[size] in: query required: false schema: type: integer minimum: 1 maximum: 100 default: 20 description: 1ページあたりのアイテム数 responses: '200': description: ペイウォールの取得に成功しました content: application/json: schema: $ref: '#/components/schemas/PaywallListResponse' example: data: - title: LlkTlizT paywall_id: fd891d4f-5906-45b9-97c1-13cc3dc665df use_paywall_builder: false use_paywall_builder_legacy: false updated_at: '2025-07-08T07:27:06.754527+00:00' created_at: '2025-07-08T07:27:06.754541+00:00' state: live is_deleted: false web_purchase_url: null products: - product_id: b95e9e51-a056-4eb6-9cf7-b75d139e7c3c title: mFUQPcJQ product_set: uncategorised offer: null - title: Premium Subscription paywall_id: a1cf7850-1bb8-4151-8336-a4e588730c55 use_paywall_builder: true use_paywall_builder_legacy: false updated_at: '2025-07-28T08:15:13.722680+00:00' created_at: '2025-07-25T13:40:01.789853+00:00' state: live is_deleted: false web_purchase_url: https://example.com/purchase products: - product_id: b136422f-8153-402a-afbb-986929c68f6a title: Premium Monthly product_set: uncategorised offer: product_offer_id: e31a4296-f250-4faf-ac80-3cc93c2da8f5 title: Free Trial meta: pagination: count: 365 page: 1 pages: 183 '400': description: 不正なリクエスト content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: errors: - source: page_size errors: - Invalid page_size parameter. Must be between 1 and 100. error_code: validation_error status_code: 400 '401': description: 認証エラー content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: errors: - Invalid API key error_code: unauthorized status_code: 401 '500': description: 内部サーバーエラー content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /api/v2/server-side-api/paywalls/{paywall_id}/: get: summary: ペイウォールの取得 description: アプリ内の特定のペイウォールを取得します。 operationId: getPaywall tags: - Paywalls security: - apikeyAuth: [] parameters: - name: paywall_id in: path required: true schema: type: string format: uuid description: 取得するペイウォールの一意識別子 responses: '200': description: ペイウォールの取得に成功しました content: application/json: schema: $ref: '#/components/schemas/PaywallResponse' example: title: Premium Subscription paywall_id: fd891d4f-5906-45b9-97c1-13cc3dc665df use_paywall_builder: true use_paywall_builder_legacy: false updated_at: '2025-07-30T11:13:58.798Z' created_at: '2025-07-30T11:13:58.798Z' state: live is_deleted: false web_purchase_url: https://example.com/purchase products: - product_id: b95e9e51-a056-4eb6-9cf7-b75d139e7c3c title: Premium Monthly product_set: uncategorised offer: product_offer_id: e31a4296-f250-4faf-ac80-3cc93c2da8f5 title: Free Trial remote_configs: - locale: en data: '{"title":"Premium Features","subtitle":"Unlock all premium content"}' main_screenshot: image_id: 123456 url: https://public-media.adapty.io/public/screenshot.jpg '401': description: 認証エラー content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: errors: - Invalid API key error_code: unauthorized status_code: 401 '404': description: ペイウォールが見つかりません content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: errors: - source: null errors: - Paywall not found error_code: paywall_does_not_exist status_code: 404 '500': description: 内部サーバーエラー content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' put: summary: ペイウォールの更新 description: | 特定のペイウォールのリモートコンフィグを更新します。このエンドポイントを使用して、ペイウォールの外観と動作をカスタマイズするためのリモートコンフィグの値を変更できます。 **重要:** リモートコンフィグを更新すると、既存のすべてのリモートコンフィグが上書きされます。既存のリモートコンフィグを保持する必要がある場合は、まずペイウォールを取得してください。次に、そこから remote_configs をコピーし、更新リクエストで必要なオブジェクトを変更してください。 operationId: updatePaywall tags: - Paywalls security: - apikeyAuth: [] parameters: - name: paywall_id in: path required: true schema: type: string format: uuid description: 更新するペイウォールの一意識別子 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PaywallUpdateRequest' example: remote_configs: - locale: en data: '{"title":"Premium Features","subtitle":"Unlock all premium content"}' responses: '200': description: ペイウォールの更新に成功しました content: application/json: schema: $ref: '#/components/schemas/PaywallResponse' example: title: Premium Subscription paywall_id: fd891d4f-5906-45b9-97c1-13cc3dc665df use_paywall_builder: true use_paywall_builder_legacy: false updated_at: '2025-07-30T11:13:58.798Z' created_at: '2025-07-30T11:13:58.798Z' state: live is_deleted: false web_purchase_url: https://example.com/purchase products: - product_id: b95e9e51-a056-4eb6-9cf7-b75d139e7c3c title: Premium Monthly product_set: uncategorised offer: product_offer_id: e31a4296-f250-4faf-ac80-3cc93c2da8f5 title: Free Trial remote_configs: - locale: en data: '{"title":"Premium Features","subtitle":"Unlock all premium content"}' main_screenshot: image_id: 123456 url: https://public-media.adapty.io/public/screenshot.jpg '400': description: 不正なリクエスト content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: errors: - source: remote_configs errors: - At least one field must be provided error_code: validation_error status_code: 400 '401': description: 認証エラー content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: errors: - Invalid API key error_code: unauthorized status_code: 401 '404': description: ペイウォールが見つかりません content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: errors: - source: null errors: - Paywall not found error_code: paywall_does_not_exist status_code: 404 '500': description: 内部サーバーエラー content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /api/v2/server-side-api/vc/transactions/: post: summary: 仮想通貨トランザクションを作成する description: | 1回のアトミックなトランザクションで、プロファイルに対して1つ以上の仮想通貨をクレジットまたはデビットします。クレジット(付与)には正の `amount` を、デビット(消費)には負の `amount` を使用してください。すべてのアイテムは一括で適用されます。いずれかのアイテムが失敗した場合、何も適用されません。 1リクエストにつき、各通貨コードは1回のみ指定できます。このエンドポイントを通じたクレジットは、常に有効期限なしの残高として作成されます。 仮想通貨アナリティクスでトランザクションを活用するには、`operation` と `feature` でラベルを付けてください。すべてのラベルフィールドは任意です。`items` と `metadata` のみのリクエストは `operation: null` として保存されます。 operationId: createVirtualCurrencyTransaction tags: - Virtual Currency security: - apikeyAuth: [] parameters: - name: adapty-customer-user-id in: header required: false schema: type: string description: お客様のシステムにおける顧客の一意のID。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 - name: adapty-profile-id in: header required: false schema: type: string description: お客様のシステムにおけるプロファイルの一意のID。匿名プロファイルを扱う場合に最適な選択肢です。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 - name: Idempotency-Key in: header required: false schema: type: string format: uuid description: | リクエストをべき等にするUUID v4。同じキーでリクエストを再試行した場合、Adaptyは残高を再度変更せず、元のトランザクションの結果を返します。有効なUUID v4である必要があります。 キーは最大1時間、単一のプロファイルのスコープで記憶されます。その時間が経過すると、同じキーでのリクエストは新しいトランザクションとして適用されます。そのため、このキーは長期的な付与の重複排除ではなく、コールの安全な再試行のためにのみ使用してください。 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/VirtualCurrencyTransactionRequest' examples: debit: summary: 1つの通貨をフィーチャーで消費(デビット)する value: items: - currency_code: COINS amount: -10 operation: spend feature: power_up.extra_life customer_placement_id: level-complete reference_id: session_7781 credit: summary: 1つの通貨をボーナスとして付与(クレジット)する value: items: - currency_code: COINS amount: 500 operation: reward feature: welcome store_purchase_credit: summary: バックエンドで処理する購入に対してコインをクレジットする value: items: - currency_code: COINS amount: 500 operation: top_up store: app_store store_transaction_id: '2000001218103228' multi_currency: summary: 2つの通貨を同時にデビットする value: items: - currency_code: GOLD amount: -50 - currency_code: SILVER amount: -200 conversion: summary: ある通貨を別の通貨に変換する value: items: - currency_code: SILVER amount: -100 - currency_code: GOLD amount: 10 operation: exchange responses: '201': description: トランザクションが作成されました。ボディは作成されたトランザクションで、トランザクション履歴の1アイテムと同じ形式に加え、トランザクション後の残高が含まれます。 content: application/json: schema: $ref: '#/components/schemas/VirtualCurrencyTransactionResponse' example: transaction_id: 019a7c3e-5b2a-7c1d-9e4f-0a1b2c3d4e5f transaction_type: api_transaction items: - currency_code: COINS amount: -10 balance_after: 90 metadata: null operation: spend feature: power_up.extra_life customer_placement_id: level-complete reference_id: session_7781 is_sandbox: false store: null store_transaction_id: null created_at: '2026-11-12T10:00:00.123Z' response_created_at: 1794477600123 balances: - code: COINS name: Coins balance: 90 held: 0 available: 90 '400': description: | 不正なリクエスト。`error_code` フィールドで原因を特定できます: - `validation_error` — ボディまたはヘッダーが無効です。例えば、ラベルフィールドのフォーマットが不正、`items` が空または20件を超えている、`amount` が0またはint32の範囲外、通貨コードが重複している、`metadata` の制約違反、`adapty-profile-id` および `adapty-customer-user-id` のいずれも送信されていないなどが該当します。`errors[].source` にフィールド名が示されます。`store` を `store_transaction_id` なしで送信した場合など、複数フィールドにまたがるチェックでは `source` は空文字列になります。 - `parse_error` — ボディが有効なJSONではありません。 - `idempotency_key_invalid` — `Idempotency-Key` がUUID v4ではありません。 - `unknown_currency` — 通貨がアプリに設定されていません。 - `unknown_store` — `store` がアプリに設定されていないカスタムストアです。 - `insufficient_balance` — デビット額が利用可能残高を超えています。 - `balance_overflow` — クレジットにより残高がint32の範囲を超えます。 content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: validation_error: summary: featureのフォーマットが無効 value: errors: - source: feature errors: - String should match pattern '^[a-zA-Z0-9_]{1,32}(\.[a-zA-Z0-9_]{1,32})?$' error_code: validation_error status_code: 400 store_pair: summary: store_transaction_idなしでstoreが送信された value: errors: - source: '' errors: - Value error, store and store_transaction_id must be sent together error_code: validation_error status_code: 400 insufficient_balance: summary: 残高不足 value: errors: - source: currency_code errors: - Insufficient balance for currency COINS error_code: insufficient_balance status_code: 400 '401': description: 認証エラー。APIキーが欠落しているか無効です(`error_code` は `not_authenticated`)。 content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: プロファイルが見つかりません(`error_code` は `profile_does_not_exist`)。 content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '409': description: | 競合。同じ `Idempotency-Key` を持つリクエストがまだ処理中です(`error_code` は `idempotency_in_flight`)。`Retry-After` レスポンスヘッダーの間隔後に再試行してください。 content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: errors: - source: null errors: - A similar request is being processed. error_code: idempotency_in_flight status_code: 409 '429': description: | リクエストが多すぎます。アプリごとまたはグローバルのレート制限を超えました(`error_code` は `rate_limited`)。デフォルトの制限は、アプリごとに毎分600リクエスト、グローバルで毎分6000リクエストです。 content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: 内部サーバーエラー get: summary: 仮想通貨トランザクション一覧を取得する description: | プロファイルの仮想通貨トランザクション履歴を新しい順で返します。結果はカーソルページネーションを使用します。レスポンスに `pagination.next_cursor` がnull以外で含まれている場合、それを `cursor` クエリパラメータとして渡すことで次のページを取得できます。 operationId: listVirtualCurrencyTransactions tags: - Virtual Currency security: - apikeyAuth: [] parameters: - name: adapty-customer-user-id in: header required: false schema: type: string description: お客様のシステムにおける顧客の一意のID。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 - name: adapty-profile-id in: header required: false schema: type: string description: お客様のシステムにおけるプロファイルの一意のID。匿名プロファイルを扱う場合に最適な選択肢です。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 - name: currency_code in: query required: false schema: type: string description: 履歴を単一の仮想通貨コードでフィルタリングします。 - name: cursor in: query required: false schema: type: string description: 前のレスポンスで `pagination.next_cursor` として返された不透明なページネーションカーソル。最初のページを取得する場合は省略してください。 - name: limit in: query required: false schema: type: integer default: 50 minimum: 1 maximum: 100 description: 1ページあたりに返すトランザクションの最大数。デフォルトは50です。 responses: '200': description: トランザクション履歴が正常に返されました content: application/json: schema: $ref: '#/components/schemas/VirtualCurrencyTransactionsHistoryResponse' example: data: - transaction_id: 0190e8a4-1c2b-7def-8abc-2c1a4b6d8e90 transaction_type: api_transaction items: - currency_code: COINS amount: 500 balance_after: 12950 metadata: null operation: reward feature: daily_bonus customer_placement_id: home-screen reference_id: null is_sandbox: false store: null store_transaction_id: null created_at: '2026-05-23T10:30:00Z' - transaction_id: 0190e7b2-9a44-7c10-bb31-7d2e9f0a1c55 transaction_type: store_purchase items: - currency_code: COINS amount: 1000 balance_after: 12450 metadata: null operation: top_up feature: null customer_placement_id: null reference_id: null is_sandbox: false store: app_store store_transaction_id: '2000001218103228' created_at: '2026-05-22T18:05:12Z' - transaction_id: 0190e5c0-3f18-7b9a-9e6d-44a1c8b27e03 transaction_type: subscription_renewal items: - currency_code: GEMS amount: 200 balance_after: 3280 metadata: null operation: top_up feature: null customer_placement_id: null reference_id: null is_sandbox: false store: play_store store_transaction_id: GPA.3345-1234-5678-90123 created_at: '2026-05-20T09:00:00Z' pagination: next_cursor: MjAyNi0wNS0yMFQwOTowMDowMFowMTkwZTVjMC0zZjE4LTdiOWEtOWU2ZC00NGExYzhiMjdlMDM= '400': description: | 不正なリクエスト。`error_code` フィールドで原因を特定できます: - `validation_error` — `limit` が1〜100の範囲外、または `adapty-profile-id` および `adapty-customer-user-id` のいずれも送信されていません。 - `invalid_cursor` — `cursor` の値を解析できません。 content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: 認証エラー。APIキーが欠落しているか無効です(`error_code` は `not_authenticated`)。 content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: プロファイルが見つかりません(`error_code` は `profile_does_not_exist`)。 content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: 内部サーバーエラー /api/v2/server-side-api/vc/balances/: get: summary: 仮想通貨の残高一覧を取得する description: | プロファイルのすべての仮想通貨の現在の残高を返します。アプリに仮想通貨が存在しない場合、`data` は空の配列になります。 operationId: listVirtualCurrencyBalances tags: - Virtual Currency security: - apikeyAuth: [] parameters: - name: adapty-customer-user-id in: header required: false schema: type: string description: お客様のシステムにおける顧客の一意のID。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 - name: adapty-profile-id in: header required: false schema: type: string description: お客様のシステムにおけるプロファイルの一意のID。匿名プロファイルを扱う場合に最適な選択肢です。`adapty-customer-user-id` または `adapty-profile-id` のいずれかが必須です。 responses: '200': description: 残高が正常に返されました content: application/json: schema: $ref: '#/components/schemas/VirtualCurrencyBalanceListResponse' example: response_created_at: 1779791400000 data: - code: COINS name: Gold Coins balance: 12450 held: 0 available: 12450 - code: GEMS name: Gems balance: 3280 held: 0 available: 3280 - code: ENERGY name: Energy balance: 840 held: 0 available: 840 '400': description: リクエストが不正です。`adapty-profile-id` も `adapty-customer-user-id` も送信されていません(`error_code` は `validation_error`)。 content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: 認証されていません。APIキーが存在しないか無効です(`error_code` は `not_authenticated`)。 content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: プロファイルが見つかりません(`error_code` は `profile_does_not_exist`)。 content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: 内部サーバーエラー components: securitySchemes: apikeyAuth: type: apiKey name: Authorization in: header default: Api-Key {Your secret API key} description: | APIリクエストは、シークレットAPIキーを **Authorization** ヘッダーに `Api-Key {your_secret_api_key}` の形式で設定することで認証されます。例えば、`Api-Key secret_live_...` のように指定します。このキーは Adapty ダッシュボード -> **App Settings** -> **General** タブ -> **API keys** セクションで確認できます。 requestBodies: DefaultJson: required: true content: application/json: schema: type: object schemas: ProfileRequest: type: object properties: first_name: type: string nullable: true description: エンドユーザーの名 last_name: type: string nullable: true description: エンドユーザーの姓 gender: type: string nullable: true enum: - f - m - o description: エンドユーザーの性別 email: type: string nullable: true format: email description: エンドユーザーのメールアドレス phone_number: type: string nullable: true description: エンドユーザーの電話番号 birthday: type: string format: date nullable: true description: エンドユーザーの誕生日 ip_country: type: string nullable: true description: エンドユーザーの国を表す2文字のISO 3166-1 alpha-2コード(例:`FR`) ip_v4_address: type: string nullable: true description: エンドユーザーのIPv4アドレス store_country: type: string nullable: true description: エンドユーザーのアプリストアの国を表す2文字のISO 3166-1 alpha-2コード(例:`US`) store: type: string nullable: true enum: - app_store - play_store - stripe - adapty - paddle description: ユーザーがアプリ内で購入に使用するプラットフォーム store_account_token: type: string format: uuid nullable: true description: ストアアカウントトークン att_status: type: integer nullable: true enum: - 0 - 1 - 2 - 3 description: Apple App Tracking Transparencyのステータス(0=未確定、1=制限、2=拒否、3=許可) analytics_disabled: type: boolean nullable: true description: 外部アナリティクスをオプトアウトするオプション custom_attributes: type: array items: $ref: '#/components/schemas/CustomAttribute' description: プロファイルに最大30個のカスタム属性を設定できます installation_meta: $ref: '#/components/schemas/InstallationMeta' required: - installation_meta example: first_name: Jane last_name: Doe gender: f email: jane.doe@example.com phone_number: '+1234567890' birthday: '2000-12-31' ip_country: FR ip_v4_address: 192.168.1.1 store_country: US store: app_store store_account_token: 3fa85f64-5717-4562-b3fc-2c963f66afa6 att_status: 3 analytics_disabled: true custom_attributes: - key: favourite_sport value: yoga installation_meta: device_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 device: iPhone 15 Pro locale: en os: iOS 17.1 platform: iOS timezone: Europe/Rome user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 17_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1 Mobile/15E148 Safari/604.1 app_build: 1.0.0 app_version: 1.0.0 adapty_sdk_version: 2.0.0 idfa: EA7583CD-A667-48BC-B806-42ECB2B48333 idfv: E9D48DA5-3930-4B41-8521-D953AECD2F33 advertising_id: '' android_id: '' android_app_set_id: '' ProfileResponse: type: object properties: data: $ref: '#/components/schemas/Profile' required: - data Profile: type: object properties: app_id: type: string format: uuid description: アプリの内部ID profile_id: type: string format: uuid description: AdaptyのプロファイルID customer_user_id: type: string nullable: true description: お客様のシステムにおけるユーザーのID total_revenue_usd: type: number format: float description: プロファイルで獲得した総収益(USD)を表すfloat値 segment_hash: type: string description: 内部パラメーター timestamp: type: integer format: int64 description: レスポンス時間(ミリ秒)。競合状態の解決に使用します custom_attributes: type: array items: $ref: '#/components/schemas/CustomAttribute' description: プロファイルに設定できるカスタム属性は最大30件です access_levels: type: array items: $ref: '#/components/schemas/AccessLevel' description: アクセスレベルオブジェクトの配列。顧客がアクセスレベルを持っていない場合は空の配列 subscriptions: type: array items: $ref: '#/components/schemas/Subscription' description: サブスクリプションオブジェクトの配列。顧客がサブスクリプションを持っていない場合は空の配列 non_subscriptions: type: array items: $ref: '#/components/schemas/NonSubscription' description: 買い切り購入オブジェクトの配列。顧客が購入履歴を持っていない場合は空の配列 required: - app_id - profile_id - customer_user_id - total_revenue_usd - segment_hash - timestamp - custom_attributes - access_levels - subscriptions - non_subscriptions CustomAttribute: type: object properties: key: type: string maxLength: 30 description: キーは30文字以下の文字列である必要があります。使用できるのは英字、数字、ダッシュ、ピリオド、アンダースコアのみです value: oneOf: - type: string - type: number description: 属性値は50文字以下である必要があります。値として使用できるのは文字列と浮動小数点数のみです required: - key - value InstallationMeta: type: object properties: device_id: type: string format: uuid description: デバイスの一意識別子 device: type: string nullable: true description: デバイス情報 locale: type: string nullable: true description: デバイスのロケール os: type: string nullable: true description: オペレーティングシステム情報 platform: type: string nullable: true enum: - iOS - macOS - iPadOS - Android - visionOS - web description: プラットフォーム(iOS、Android など) timezone: type: string nullable: true description: デバイスのタイムゾーン user_agent: type: string nullable: true description: ユーザーエージェント文字列 app_build: type: string nullable: true description: アプリのビルドバージョン app_version: type: string nullable: true description: アプリのバージョン adapty_sdk_version: type: string nullable: true description: Adapty SDK のバージョン idfa: type: string nullable: true description: iOS の広告識別子(IDFA) idfv: type: string nullable: true description: iOS のベンダー識別子(IDFV) advertising_id: type: string nullable: true description: Android の広告 ID android_id: type: string nullable: true description: Android のデバイス ID android_app_set_id: type: string nullable: true description: Android のアプリセット ID required: - device_id AccessLevel: type: object properties: access_level_id: type: string description: アクセスレベルの識別子 store: type: string description: アクセスレベルが購入されたストア store_product_id: type: string description: ストア内のプロダクトID。App Storeの12ヶ月コミットメントプランの場合、IDの末尾は`:monthly`になります。 store_base_plan_id: type: string nullable: true description: ストア内のベースプランID store_transaction_id: type: string description: ストア内のトランザクションID store_original_transaction_id: type: string description: ストア内の元のトランザクションID offer: allOf: - $ref: '#/components/schemas/OfferDTO' nullable: true description: プロモーションオファーまたは初回オファーが適用された場合のオファー詳細 starts_at: type: string format: date-time nullable: true description: アクセスレベルの開始日時 purchased_at: type: string format: date-time description: アクセスレベルが購入された日時 originally_purchased_at: type: string format: date-time description: アクセスレベルが最初に購入された日時 expires_at: type: string format: date-time nullable: true description: アクセスレベルの有効期限 renewal_cancelled_at: type: string format: date-time nullable: true description: 更新がキャンセルされた日時 billing_issue_detected_at: type: string format: date-time nullable: true description: 請求の問題が検出された日時 is_in_grace_period: type: boolean description: アクセスレベルがグレース期間中かどうか cancellation_reason: type: string nullable: true description: キャンセルの理由 Subscription: type: object properties: store: type: string description: サブスクリプションが購入されたストア store_product_id: type: string description: ストアのプロダクトID。App Store の12ヶ月コミットメントプランの場合、IDの末尾は `:monthly` になります。 store_base_plan_id: type: string nullable: true description: ストアのベースプランID store_transaction_id: type: string description: ストアのトランザクションID store_original_transaction_id: type: string description: ストアの元のトランザクションID offer: allOf: - $ref: '#/components/schemas/OfferDTO' nullable: true description: プロモーションオファーまたは初回オファーが適用された場合のオファー詳細 environment: type: string description: 環境(サンドボックス、本番) purchased_at: type: string format: date-time description: サブスクリプションが購入された日時 originally_purchased_at: type: string format: date-time description: サブスクリプションが最初に購入された日時 expires_at: type: string format: date-time nullable: true description: サブスクリプションの有効期限 renewal_cancelled_at: type: string format: date-time nullable: true description: 更新がキャンセルされた日時。12ヶ月コミットメントプランの場合、サブスクライバーがキャンセルしても月次支払いが継続されるため、`null` のままとなります。代わりに `commitment.will_renew` を使用してください。 billing_issue_detected_at: type: string format: date-time nullable: true description: 請求の問題が検出された日時 is_in_grace_period: type: boolean description: サブスクリプションがグレース期間中かどうか cancellation_reason: type: string nullable: true description: キャンセルの理由 commitment: allOf: - $ref: '#/components/schemas/SubscriptionCommitment' nullable: true description: App Store コミットメントプランの12ヶ月コミットメント。他のサブスクリプションには設定されません。 SubscriptionCommitment: type: object properties: will_renew: type: boolean nullable: true description: この契約が終了した後に新しい12ヶ月の契約が開始されるかどうか。サブスクライバーがキャンセルした後は `false` となり、`expires_at` まで月次支払いが継続されます。 billing_period_number: type: integer nullable: true description: 契約における現在の月次支払いの番号(1から開始) total_billing_periods: type: integer nullable: true description: 契約における月次支払いの合計数 expires_at: type: string format: date-time nullable: true description: 契約が終了する日時。サブスクリプション自体の `expires_at` は現在の支払済み月の終了日です。 NonSubscription: type: object properties: purchase_id: type: string format: uuid description: 購入の一意識別子 store: type: string description: 購入が行われたストア store_product_id: type: string description: ストア内のプロダクトID store_base_plan_id: type: string nullable: true description: ストア内のベースプランID store_transaction_id: type: string description: ストア内のトランザクションID store_original_transaction_id: type: string description: ストア内の元のトランザクションID purchased_at: type: string format: date-time description: 購入が行われた日時 environment: type: string description: 環境(サンドボックス、本番) is_refund: type: boolean description: 返金かどうか is_consumable: type: boolean description: 消耗型アイテムの購入かどうか ErrorResponse: type: object properties: errors: type: array items: type: object properties: source: type: string nullable: true description: エラーの発生源 errors: type: array items: type: string description: エラーメッセージの配列 error_code: type: string description: エラーの短い名称 status_code: type: integer description: HTTPステータスコード required: - errors - error_code - status_code TransactionDTORequest: oneOf: - $ref: '#/components/schemas/OneTimePurchaseDTO' - $ref: '#/components/schemas/SubscriptionDTO' discriminator: propertyName: purchase_type OneTimePurchaseDTO: type: object title: One-time Purchase description: 買い切り購入のトランザクションデータ properties: purchase_type: type: string enum: - one_time_purchase description: 購入の種類 store: type: string description: 購入が行われたストア。一般的な値には `app_store`、`play_store`、`stripe`、`paddle`、またはカスタムストア識別子が含まれます environment: type: string enum: - Production - Sandbox default: Production description: 購入が行われた環境 store_product_id: type: string description: ストアにおけるプロダクト ID store_transaction_id: type: string maxLength: 50 description: ストアにおけるトランザクション ID。最大 50 文字。PayPal およびカスタムストアのトランザクション ID はこの制限を超える場合があります。その場合は送信前に値をトリムまたはハッシュ化してください。そうしないとリクエストが失敗します。 store_original_transaction_id: type: string description: ストアにおける元のトランザクション ID is_family_shared: type: boolean default: false description: 購入がファミリー共有されているかどうか price: $ref: '#/components/schemas/PriceDTO' purchased_at: type: string format: date-time description: 購入が行われた日時 variation_id: type: string nullable: true description: A/B テスト用のバリエーション ID offer: $ref: '#/components/schemas/OfferDTO' nullable: true refunded_at: type: string format: date-time nullable: true description: 購入が返金された日時 cancellation_reason: type: string enum: - billing_error - cancelled_by_developer - new_subscription_replace - price_increase - product_was_not_available - refund - unknown - upgraded - voluntarily_cancelled - adapty_revoked nullable: true description: キャンセルの理由 required: - purchase_type - store - store_product_id - store_transaction_id - store_original_transaction_id - price - purchased_at SubscriptionDTO: type: object title: Subscription description: サブスクリプション購入のトランザクションデータ properties: purchase_type: type: string enum: - subscription description: 購入の種類 store: type: string description: 購入が行われたストア。一般的な値には `app_store`、`play_store`、`stripe`、`paddle`、またはカスタムストア識別子が含まれます environment: type: string enum: - Production - Sandbox default: Production description: 購入が行われた環境 store_product_id: type: string description: ストアにおけるプロダクト ID store_transaction_id: type: string maxLength: 50 description: ストアにおけるトランザクション ID。最大 50 文字。PayPal および一部のカスタムストアのトランザクション ID はこの上限を超える場合があります。その場合は送信前に値をトリムまたはハッシュ化してください。そうしないとリクエストが失敗します。 store_original_transaction_id: type: string description: ストアにおける元のトランザクション ID is_family_shared: type: boolean default: false description: 購入がファミリー共有されているかどうか price: $ref: '#/components/schemas/PriceDTO' purchased_at: type: string format: date-time description: 購入が行われた日時 variation_id: type: string nullable: true description: A/B テスト用のバリエーション ID offer: $ref: '#/components/schemas/OfferDTO' nullable: true refunded_at: type: string format: date-time nullable: true description: 購入が返金された日時 cancellation_reason: type: string enum: - billing_error - cancelled_by_developer - new_subscription_replace - price_increase - product_was_not_available - refund - unknown - upgraded - voluntarily_cancelled - adapty_revoked nullable: true description: キャンセルの理由 originally_purchased_at: type: string format: date-time description: サブスクリプションが最初に購入された日時 expires_at: type: string format: date-time description: サブスクリプションの有効期限 renew_status: type: boolean description: サブスクリプションが更新されるかどうか renew_status_changed_at: type: string format: date-time nullable: true description: 更新ステータスが変更された日時 billing_issue_detected_at: type: string format: date-time nullable: true description: 請求の問題が検出された日時 grace_period_expires_at: type: string format: date-time nullable: true description: グレース期間が終了する日時 required: - purchase_type - store - store_product_id - store_transaction_id - store_original_transaction_id - price - purchased_at - originally_purchased_at - expires_at - renew_status PriceDTO: type: object properties: country: type: string description: ISO 3166-1 alpha-2 形式の国コード(例:`US`) currency: type: string description: ISO 4217 形式の通貨コード(例:`USD`) value: type: number format: float description: 価格の値 required: - country - currency - value OfferDTO: type: object properties: category: type: string enum: - introductory - promotional - offer_code - win_back description: オファーカテゴリー type: type: string enum: - free_trial - pay_as_you_go - pay_up_front description: オファータイプ id: type: string nullable: true description: オファーID required: - category - type GrantAccessRequest: type: object properties: access_level_id: type: string description: アクセスレベルページで設定されたアクセスレベルID starts_at: type: string format: date-time nullable: true description: アクセスレベルが有効になる日時。将来の日時を指定することも可能です。デフォルト値はnullです。 expires_at: type: string format: date-time nullable: true description: アクセスレベルが失効する日時。過去の日時でも構いません。永続アクセスの場合はnullにすることもできます。デフォルト値はnullです。 required: - access_level_id RevokeAccessRequest: type: object properties: access_level_id: type: string description: アクセスレベルページで設定されたアクセスレベルID revoke_at: type: string format: date-time nullable: true description: アクセスレベルの有効期限を指定します。即座にアクセスを取り消す場合は、このフィールドを省略するか、null に設定してください。デフォルト値は null です。 required: - access_level_id RefundSaverSettingsRequest: type: object properties: custom_preference: type: string enum: - grant - grant_prorated - no_preference - decline nullable: true description: | ユーザーに対して個別に返金設定を行います。この設定は、App Store および Google Play の両方におけるユーザーの返金リクエストに適用されます。Google は返金レビューにおいて decline、approve、または no preference のみを受け付けるため、この値が `grant_prorated` の場合、Adapty は Google Play に対して no preference を送信します。 - `grant`: すべての返金リクエストを承認します - `grant_prorated`: ユーザーがまだ消費していない購入分に対して返金を承認します - `no_preference`: 推奨を提供しません - `decline`: すべての返金リクエストを拒否します consent: type: boolean nullable: true description: | ユーザーがデータ共有への同意を行ったかどうかを記録します。同意は App Store にのみ適用されます。 - `true` は、アプリ内返金リクエストを受け取った場合に、Apple にユーザーに関する情報を提供できることを意味します example: custom_preference: grant consent: true RefundSaverSettingsResponse: type: object properties: profile_id: type: string format: uuid description: 顧客プロファイルID settings: type: object properties: consent: type: boolean description: ユーザーがAppleとデータを共有することに同意したかどうかを定義します(App Storeのみ) custom_preference: type: string enum: - grant - grant_prorated - no_preference - decline description: 返金の優先設定 description: ユーザーの返金セーバー設定 required: - profile_id - settings StripeValidationRequest: type: object properties: data: type: object properties: type: type: string enum: - stripe_receipt_validation_result description: リソースのタイプ attributes: type: object properties: customer_user_id: type: string description: お客様のシステムにおけるユーザーのID stripe_token: type: string description: | 一意の購入を表すStripeオブジェクトのトークン。 StripeのサブスクリプションのトークンA(sub_XXX)またはPayment Intent(pi_XXX)のいずれかです。 required: - customer_user_id - stripe_token required: - type - attributes required: - data StripeValidationResponse: type: object properties: data: type: object nullable: true description: レスポンスデータ(バリデーション成功時はnull) required: - data StripeErrorResponse: type: object properties: errors: type: array items: type: object properties: detail: type: string description: エラーに関する説明情報 source: type: object properties: pointer: type: string description: 問題の原因となっているリクエストドキュメント内の正確な場所を参照します required: - pointer status: type: string description: HTTPステータスコード required: - detail - source - status required: - errors PaddleValidationRequest: type: object properties: customer_user_id: type: string description: あなたのシステムにおけるユーザーのID paddle_token: type: string description: | 一意の購入を表すPaddleオブジェクトのトークン。 トランザクションID(txn_...)またはサブスクリプションID(sub_...)のいずれかです。 required: - customer_user_id - paddle_token IntegrationIdentifiersRequest: type: object properties: adjust_device_id: type: string nullable: true description: Adjust連携におけるネットワークユーザーのID airbridge_device_id: type: string nullable: true description: Airbridge連携におけるユーザーデバイスのID amplitude_device_id: type: string nullable: true description: Amplitude連携におけるユーザーデバイスのID amplitude_user_id: type: string nullable: true description: Amplitude連携におけるユーザーのID appmetrica_device_id: type: string nullable: true description: AppMetrica連携におけるユーザーデバイスのID appmetrica_profile_id: type: string nullable: true description: AppMetrica連携におけるユーザーのID appsflyer_id: type: string nullable: true description: AppsFlyer連携におけるネットワークユーザーのID branch_id: type: string nullable: true description: Branch連携におけるユーザーアプリのBranch Key facebook_anonymous_id: type: string nullable: true description: Facebook Ads連携におけるユーザーのID firebase_app_instance_id: type: string nullable: true description: Firebase連携におけるユーザーのID mixpanel_user_id: type: string nullable: true description: Mixpanel連携におけるユーザーのID one_signal_player_id: type: string nullable: true description: OneSignal連携におけるユーザーのID(レガシー識別子) one_signal_subscription_id: type: string nullable: true description: OneSignal連携におけるユーザーのID(推奨識別子) posthog_distinct_user_id: type: string nullable: true description: PostHog連携におけるユーザーのID pushwoosh_hwid: type: string nullable: true description: Pushwoosh連携におけるユーザーデバイスのID tenjin_analytics_installation_id: type: string nullable: true description: Tenjin連携におけるユーザーデバイスのID description: 少なくとも1つの連携識別子を指定する必要があります IntegrationIdentifiersResponse: type: object properties: adjust_device_id: type: string nullable: true description: Adjust連携におけるネットワークユーザーのID airbridge_device_id: type: string nullable: true description: Airbridge連携におけるユーザーデバイスのID amplitude_device_id: type: string nullable: true description: Amplitude連携におけるユーザーデバイスのID amplitude_user_id: type: string nullable: true description: Amplitude連携におけるユーザーのID appmetrica_device_id: type: string nullable: true description: AppMetrica連携におけるユーザーデバイスのID appmetrica_profile_id: type: string nullable: true description: AppMetrica連携におけるユーザーのID appsflyer_id: type: string nullable: true description: AppsFlyer連携におけるネットワークユーザーのID branch_id: type: string nullable: true description: Branch連携におけるユーザーアプリのBranch Key facebook_anonymous_id: type: string nullable: true description: Facebook Ads連携におけるユーザーのID firebase_app_instance_id: type: string nullable: true description: Firebase連携におけるユーザーのID mixpanel_user_id: type: string nullable: true description: Mixpanel連携におけるユーザーのID one_signal_player_id: type: string nullable: true description: OneSignal連携におけるユーザーのID(レガシー識別子) one_signal_subscription_id: type: string nullable: true description: OneSignal連携におけるユーザーのID(推奨識別子) posthog_distinct_user_id: type: string nullable: true description: PostHog連携におけるユーザーのID pushwoosh_hwid: type: string nullable: true description: Pushwoosh連携におけるユーザーデバイスのID tenjin_analytics_installation_id: type: string nullable: true description: Tenjin連携におけるユーザーデバイスのID PaywallUpdateRequest: type: object properties: remote_configs: type: array items: type: object properties: locale: type: string description: リモートコンフィグのロケール(例:"en"、"es"、"fr") data: type: string description: リモートコンフィグデータを含むJSON文字列 required: - locale - data description: 更新するRemoteConfigオブジェクトの配列 required: - remote_configs description: 少なくとも1つのフィールドを指定する必要があります PaywallResponse: type: object properties: title: type: string description: Adapty ダッシュボードで定義されたペイウォールの名前 paywall_id: type: string format: uuid description: ペイウォールの一意の識別子 use_paywall_builder: type: boolean description: ペイウォールがペイウォールビルダーを使用しているかどうか use_paywall_builder_legacy: type: boolean description: ペイウォールがレガシーペイウォールビルダーを使用しているかどうか updated_at: type: string format: date-time description: ペイウォールが最後に更新されたタイムスタンプ created_at: type: string format: date-time description: ペイウォールが作成されたタイムスタンプ state: type: string enum: - draft - live - inactive - archived description: ペイウォールの現在の状態 is_deleted: type: boolean description: ペイウォールが削除済みとしてマークされているかどうか web_purchase_url: type: string format: uri nullable: true description: ウェブ購入用の URL(該当する場合) products: type: array items: type: object properties: product_id: type: string format: uuid description: プロダクトの一意の識別子 title: type: string description: プロダクトのタイトル product_set: type: string enum: - weekly - monthly - trimonthly - semiannual - annual - lifetime - uncategorised - nonsubscriptions - two_months - consumable description: プロダクトセットのカテゴリ offer: type: object nullable: true properties: product_offer_id: type: string format: uuid description: プロダクトオファーの一意の識別子 title: type: string description: オファーのタイトル required: - product_offer_id - title required: - product_id - title - product_set - offer description: プロダクト情報を含む Product オブジェクトの配列 remote_configs: type: array items: type: object properties: locale: type: string description: リモートコンフィグのロケール data: type: string description: リモートコンフィグデータを含む JSON 文字列 required: - locale - data description: ロケールとデータを含む RemoteConfig オブジェクトの配列 main_screenshot: type: object nullable: true properties: image_id: type: integer description: 画像の一意の識別子 url: type: string format: uri description: 画像の URL required: - image_id - url description: image_id と url を含むメインスクリーンショットオブジェクト required: - title - paywall_id - use_paywall_builder - use_paywall_builder_legacy - updated_at - created_at - state - is_deleted - products PaywallListResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/PaywallListItem' description: ペイウォールオブジェクトの配列 meta: type: object properties: pagination: type: object properties: count: type: integer description: ペイウォールの総数 page: type: integer description: 現在のページ番号 pages: type: integer description: 総ページ数 required: - count - page - pages required: - pagination required: - data - meta PaywallListItem: type: object properties: title: type: string description: Adapty ダッシュボードで定義されたペイウォールの名前 paywall_id: type: string format: uuid description: ペイウォールの一意識別子 use_paywall_builder: type: boolean description: ペイウォールビルダーを使用しているかどうか use_paywall_builder_legacy: type: boolean description: レガシーペイウォールビルダーを使用しているかどうか updated_at: type: string format: date-time description: ペイウォールが最後に更新されたタイムスタンプ created_at: type: string format: date-time description: ペイウォールが作成されたタイムスタンプ state: type: string enum: - draft - live - inactive - archived description: ペイウォールの現在の状態 is_deleted: type: boolean description: ペイウォールが削除済みとしてマークされているかどうか web_purchase_url: type: string format: uri nullable: true description: 該当する場合、ウェブ購入用の URL products: type: array items: type: object properties: product_id: type: string format: uuid description: プロダクトの一意識別子 title: type: string description: プロダクトのタイトル product_set: type: string enum: - weekly - monthly - trimonthly - semiannual - annual - lifetime - uncategorised - nonsubscriptions - two_months - consumable description: プロダクトセットのカテゴリ offer: type: object nullable: true properties: product_offer_id: type: string format: uuid description: プロダクトオファーの一意識別子 title: type: string description: オファーのタイトル required: - product_offer_id - title required: - product_id - title - product_set - offer description: ペイウォールのプロダクト情報を含むプロダクトオブジェクトの配列 required: - title - paywall_id - use_paywall_builder - use_paywall_builder_legacy - updated_at - created_at - state - is_deleted - products PaywallObject: type: object description: | ペイウォールはアプリ内のマネタイズ画面を表します。ペイウォールの設定、プロダクト、およびリモートコンフィグに関する情報が含まれます。 properties: title: type: string description: Adapty ダッシュボードで定義されたペイウォールの名前 paywall_id: type: string format: uuid description: ペイウォールの一意の識別子 use_paywall_builder: type: boolean description: ペイウォールがペイウォールビルダーを使用しているかどうか use_paywall_builder_legacy: type: boolean description: ペイウォールがレガシーペイウォールビルダーを使用しているかどうか updated_at: type: string format: date-time description: ペイウォールが最後に更新されたタイムスタンプ created_at: type: string format: date-time description: ペイウォールが作成されたタイムスタンプ state: type: string enum: - draft - live - inactive - archived description: ペイウォールの現在の状態 is_deleted: type: boolean description: ペイウォールが削除済みとしてマークされているかどうか web_purchase_url: type: string format: uri nullable: true description: ウェブ購入用のURL(該当する場合) products: type: array items: $ref: '#/components/schemas/ProductObject' description: このペイウォールで利用可能なプロダクトの配列 remote_configs: type: array items: $ref: '#/components/schemas/RemoteConfigObject' description: 各ロケール向けのリモートコンフィグの配列 main_screenshot: type: object nullable: true properties: image_id: type: integer description: 画像の一意の識別子 url: type: string format: uri description: 画像のURL required: - image_id - url description: image_id と url を含むメインスクリーンショットオブジェクト required: - title - paywall_id - use_paywall_builder - use_paywall_builder_legacy - updated_at - created_at - state - is_deleted - products ProductObject: type: object description: | プロダクトはアプリ内で購入可能なアイテムを表します。サブスクリプションまたは 買い切り購入プロダクトのいずれかです。 properties: product_id: type: string format: uuid description: プロダクトの一意識別子 title: type: string description: プロダクトのタイトル product_set: type: string description: プロダクトセットのカテゴリ offer: type: object nullable: true properties: product_offer_id: type: string format: uuid description: プロダクトオファーの一意識別子 title: type: string description: オファーのタイトル required: - product_offer_id - title description: プロダクトオファー情報 required: - product_id - title - product_set - offer RemoteConfigObject: type: object description: | リモートコンフィグには、ペイウォールのロケール固有の設定データが含まれています。 これにより、異なる言語に対してペイウォールの外観と動作をカスタマイズできます。 properties: locale: type: string description: リモートコンフィグのロケール(例:"en"、"es"、"fr") data: type: string description: リモートコンフィグデータを含むJSON文字列 required: - locale - data IntegrationIdentifiersObject: type: object description: | インテグレーション識別子には、さまざまなサードパーティサービスのユーザーIDが含まれます。 これらは、異なるアナリティクスおよびマーケティングプラットフォーム間でユーザーデータを同期するために使用されます。 properties: adjust_device_id: type: string nullable: true description: AdjustインテグレーションにおけるネットワークユーザーのID airbridge_device_id: type: string nullable: true description: AirbridgeインテグレーションにおけるユーザーデバイスのID amplitude_device_id: type: string nullable: true description: AmplitudeインテグレーションにおけるユーザーデバイスのID amplitude_user_id: type: string nullable: true description: AmplitudeインテグレーションにおけるユーザーのID appmetrica_device_id: type: string nullable: true description: AppMetricaインテグレーションにおけるユーザーデバイスのID appmetrica_profile_id: type: string nullable: true description: AppMetricaインテグレーションにおけるユーザーのID appsflyer_id: type: string nullable: true description: AppsFlyerインテグレーションにおけるネットワークユーザーのID branch_id: type: string nullable: true description: BranchインテグレーションにおけるユーザーアプリのBranch Key facebook_anonymous_id: type: string nullable: true description: Facebook AdsインテグレーションにおけるユーザーのID firebase_app_instance_id: type: string nullable: true description: FirebaseインテグレーションにおけるユーザーのID mixpanel_user_id: type: string nullable: true description: MixpanelインテグレーションにおけるユーザーのID one_signal_player_id: type: string nullable: true description: OneSignalインテグレーションにおけるユーザーのID(レガシー識別子) one_signal_subscription_id: type: string nullable: true description: OneSignalインテグレーションにおけるユーザーのID(推奨識別子) posthog_distinct_user_id: type: string nullable: true description: PostHogインテグレーションにおけるユーザーのID pushwoosh_hwid: type: string nullable: true description: PushwooshインテグレーションにおけるユーザーデバイスのID tenjin_analytics_installation_id: type: string nullable: true description: TenjinインテグレーションにおけるユーザーデバイスのID RefundSaverSettingsObject: type: object description: | Refund Saver Settings には、返金リクエストの処理に関するユーザーの設定が含まれます。 これには、データ共有への同意とカスタム返金設定が含まれます。 properties: consent: type: boolean description: ユーザーがデータ共有に同意したかどうかを定義します custom_preference: type: string enum: - grant - grant_prorated - no_preference - decline description: 返金の設定 required: - consent - custom_preference ErrorObject: type: object description: | エラーはAPIエラーレスポンスを表します。何が問題だったか、 およびその修正方法に関する情報が含まれています。 properties: errors: type: array items: type: object properties: source: type: string nullable: true description: エラーの原因となったフィールドまたはパラメータ errors: type: array items: type: string description: エラーメッセージの配列 required: - errors description: エラー詳細の配列 error_code: type: string description: 機械可読なエラーコード status_code: type: integer description: HTTPステータスコード required: - errors - error_code - status_code PaginationObject: type: object description: | リストエンドポイントのページネーションメタデータ。 現在のページと結果の合計に関する情報を含みます。 properties: count: type: integer description: アイテムの総数 page: type: integer description: 現在のページ番号 pages: type: integer description: 総ページ数 required: - count - page - pages VirtualCurrencyTransactionRequest: type: object description: 仮想通貨トランザクションを作成するためのリクエストボディ。 properties: items: type: array minItems: 1 maxItems: 20 description: アトミックに適用する残高調整。各通貨コードは1回のみ使用可能です。 items: $ref: '#/components/schemas/VirtualCurrencyBalanceAdjustment' metadata: type: object nullable: true additionalProperties: type: string description: | トランザクションとともに保存されるオプションのキーと値のペア。キーは最大5件。各キーは `^[a-z0-9_]{1,30}$` に一致し、各値は最大200文字です。 operation: type: string enum: - top_up - refund - spend - spend_reversal - reward - reward_reversal - exchange - expiry - migration - adjustment description: | トランザクションの意味を示します。ほとんどのインテグレーションで必要な値は `spend`、`spend_reversal`、`reward`、`reward_reversal` の4つです。省略した場合、トランザクションは保存され `operation: null` として返されます。 値: `top_up` — 購入、サブスクリプション、またはトライアルによってクレジットされたコイン; `refund` — 返金により取り戻されたコイン; `spend` — 機能またはコンテンツに使用したコイン; `spend_reversal` — 生成失敗などの失敗したアクションのために返却されたコイン; `reward` — ボーナス、報酬、またはサポート補償; `reward_reversal` — 取り戻された報酬; `exchange` — 1つのトランザクション内での通貨間の変換(符号が逆のアイテムを含む); `expiry` — 期限切れになったコイン; `migration` — 独自システムから移動された残高; `adjustment` — アプリ内経済の外部における技術的な残高修正。 feature: type: string description: | コインが使用された、または付与された対象。1単語で、オプションとしてドットで区切られたサブタイプを1つ持てます: `^[a-zA-Z0-9_]{1,32}(\.[a-zA-Z0-9_]{1,32})?$` に一致する必要があります。送信された形式のまま、大文字・小文字を区別して保存されます。価格、ティア、バージョン、バリアントはエンコードしないでください。例: `power_up.extra_life`。 customer_placement_id: type: string description: | 操作が発生したアプリ内の画面またはプレースメントのID。これはAdaptyのプレースメントIDではなく、あなた自身のIDです。`^[a-zA-Z0-9_.-]{1,128}$` に一致する必要があります。送信された形式のまま保存されます。例: `onboarding-step-3`。 reference_id: type: string description: | 生成、報酬、サポートチケットなど、あなたのシステム内の関連オブジェクトのID。1〜128文字。制御文字、BIDI文字、ゼロ幅文字は拒否されます。個人情報を含めないでください。例: `ticket_48213`。 is_sandbox: type: boolean default: false description: テスト中に付与するコインの場合は `true` に設定してください。 store: type: string description: | このトランザクションが参照する購入のストア: `app_store`、`play_store`、`stripe`、`paddle`、またはアプリに設定されたカスタムストアのID。最大30文字。ストアで購入が返金された場合、この参照でクレジットされたコインは取り戻されます。`store_transaction_id` と合わせて送信してください。 store_transaction_id: type: string description: | その購入のストアトランザクションID。最大50文字。これは参照にすぎません: Adaptyはその存在や一意性を確認しません。`store` と合わせて送信してください。 required: - items VirtualCurrencyBalanceAdjustment: type: object properties: currency_code: type: string description: 調整するバーチャル通貨コード。 amount: type: integer format: int32 description: | 適用する金額。正の値は通貨を付与(クレジット)し、負の値は通貨を消費(デビット)します。ゼロは指定できません。 required: - currency_code - amount VirtualCurrencyTransactionResponse: description: 作成されたトランザクション。トランザクション履歴のアイテムと同じ形式に、トランザクション後の残高を加えたものです。 allOf: - $ref: '#/components/schemas/VirtualCurrencyTransactionsHistoryItem' - type: object properties: response_created_at: type: integer format: int64 description: レスポンスが生成された日時(Unixタイムスタンプ、ミリ秒単位)。 balances: type: array description: | このリクエストによって影響を受けた各通貨のトランザクション後の残高(`items` の各アイテムに対して1エントリ)。プロファイルの残高リスト全体を取得するには、`GET /api/v2/server-side-api/vc/balances/` を使用してください。 items: $ref: '#/components/schemas/VirtualCurrencyBalanceSnapshot' required: - response_created_at - balances VirtualCurrencyBalanceSnapshot: type: object properties: code: type: string description: 仮想通貨コード。 name: type: string description: 仮想通貨の表示名。 balance: type: integer format: int32 minimum: 0 description: 現在保留中の金額を含む合計残高。 held: type: integer format: int32 minimum: 0 description: すべてのアクティブな保留(予約済み金額)の合計。現在は常に 0。 available: type: integer format: int32 description: 使用可能な残高。`balance - held` として計算されます。 required: - code - name - balance - held - available VirtualCurrencyBalanceListResponse: type: object description: プロファイルのすべてのバーチャル通貨の現在の残高。 properties: response_created_at: type: integer format: int64 description: レスポンスが生成された日時(Unixタイムスタンプ、ミリ秒単位)。 data: type: array items: $ref: '#/components/schemas/VirtualCurrencyProfileBalanceItem' required: - response_created_at - data VirtualCurrencyProfileBalanceItem: type: object properties: code: type: string description: アプリ内で一意の仮想通貨コード。ASCII文字、数字、アンダースコアが使用可能です。 name: type: string description: 仮想通貨の表示名。 balance: type: integer format: int32 minimum: 0 description: 現在保留中の金額を含む合計残高。 held: type: integer format: int32 minimum: 0 description: すべてのアクティブな保留(予約済み金額)の合計。現在は常に0です。 available: type: integer format: int32 description: 支出可能な残高。`balance - held` として算出されます。 required: - code - name - balance - held - available VirtualCurrencyTransactionsHistoryResponse: type: object description: プロファイルの仮想通貨トランザクション履歴のページネーションリスト。 properties: data: type: array items: $ref: '#/components/schemas/VirtualCurrencyTransactionsHistoryItem' pagination: $ref: '#/components/schemas/VirtualCurrencyHistoryPagination' required: - data - pagination VirtualCurrencyTransactionsHistoryItem: type: object properties: transaction_id: type: string format: uuid description: トランザクションの一意なID。 transaction_type: type: string description: | トランザクションのソース。`store_purchase`、`subscription_renewal`、`trial_start`、`api_transaction`、`dashboard_transaction`、`refund`、または`expiry`のいずれか。 items: type: array description: このトランザクションに記録された通貨ごとの残高変更。 items: $ref: '#/components/schemas/VirtualCurrencyBalanceChange' metadata: type: object nullable: true additionalProperties: type: string description: トランザクションに保存されたキーと値のペア(存在する場合)。 operation: type: string nullable: true enum: - top_up - refund - spend - spend_reversal - reward - reward_reversal - exchange - expiry - migration - adjustment description: | トランザクションの意味。Adaptyは自身が作成するトランザクションに対して自動的に設定します。`store_purchase`、`subscription_renewal`、`trial_start`には`top_up`が、`refund`には`refund`が、`expiry`には`expiry`が設定されます。`dashboard_transaction`の場合は、チームメンバーがAdapty ダッシュボードで残高を調整した際に選択した操作が設定されます。`api_transaction`の場合は、送信した値、または送信しなかった場合は`null`が設定されます。 feature: type: string nullable: true description: コインが消費された目的または付与された理由(送信した値)。Adaptyが作成したトランザクションでは`null`。 customer_placement_id: type: string nullable: true description: アプリ側のスクリーンまたはプレースメントID(送信した値)。Adaptyが作成したトランザクションでは`null`。 reference_id: type: string nullable: true description: 自社システム内の関連オブジェクトのID(送信した値)。Adaptyが作成したトランザクションでは`null`。 is_sandbox: type: boolean description: | テスト用トランザクションかどうか。Adaptyが作成したトランザクションの場合、ストア購入の環境に従います。`api_transaction`の場合は送信した値が使用され、デフォルトは`false`です。 store: type: string nullable: true description: | 関連する購入のストア。ストアイベント(購入、更新、トライアル、返金)からAdaptyが作成したトランザクション、および購入参照とともに送信された`api_transaction`に設定されます。 store_transaction_id: type: string nullable: true description: 関連する購入のストアトランザクションID。`store`と同じトランザクションに設定されます。 created_at: type: string format: date-time description: トランザクションが記録された日時。 required: - transaction_id - transaction_type - items - operation - feature - customer_placement_id - reference_id - is_sandbox - store - store_transaction_id - created_at VirtualCurrencyBalanceChange: type: object properties: currency_code: type: string description: バーチャル通貨コード。 amount: type: integer format: int32 description: 残高に適用された符号付き変化量。正の値はクレジット、負の値はデビットを表します。 balance_after: type: integer format: int32 minimum: 0 description: このトランザクション適用後の通貨残高。 required: - currency_code - amount - balance_after VirtualCurrencyHistoryPagination: type: object properties: next_cursor: type: string nullable: true description: | 次のページのための不透明なカーソルです。さらに結果を取得するには、`cursor` クエリパラメータとして渡してください。これ以上ページがない場合は null になります。 required: - next_cursor