POST /api/v2/server-side-api/profile/

プロファイルを作成する

Adaptyにアプリの新しいエンドユーザーを作成します。

Header parameters

adapty-customer-user-idstring

お客様のシステムにおける顧客の一意のIDです。adapty-customer-user-id または adapty-profile-id のいずれかが必須です。

adapty-profile-idstring

お客様のシステムにおけるプロファイルの一意のIDです。匿名プロファイルを扱う場合に最適な選択肢です。adapty-customer-user-id または adapty-profile-id のいずれかが必須です。

adapty-platformstring

ユーザーがアプリをインストールしているデバイスのプラットフォーム

Request body

first_namestring

エンドユーザーの名

last_namestring

エンドユーザーの姓

genderstring

エンドユーザーの性別

One of: "f", "m", "o"

emailstring

エンドユーザーのメールアドレス

phone_numberstring

エンドユーザーの電話番号

birthdaystring

エンドユーザーの誕生日

ip_countrystring

エンドユーザーの国を表す2文字のISO 3166-1 alpha-2コード(例:FR

ip_v4_addressstring

エンドユーザーのIPv4アドレス

store_countrystring

エンドユーザーのアプリストアの国を表す2文字のISO 3166-1 alpha-2コード(例:US

storestring

ユーザーがアプリ内で購入に使用するプラットフォーム

One of: "app_store", "play_store", "stripe", "adapty", "paddle"

store_account_tokenstring

ストアアカウントトークン

att_statusinteger

Apple App Tracking Transparencyのステータス(0=未確定、1=制限、2=拒否、3=許可)

One of: 0, 1, 2, 3

analytics_disabledboolean

外部アナリティクスをオプトアウトするオプション

custom_attributesarray of object

プロファイルに最大30個のカスタム属性を設定できます

keystringrequired

キーは30文字以下の文字列である必要があります。使用できるのは英字、数字、ダッシュ、ピリオド、アンダースコアのみです

valuestring | numberrequired

属性値は50文字以下である必要があります。値として使用できるのは文字列と浮動小数点数のみです

installation_metaobjectrequired
device_idstringrequired

デバイスの一意識別子

devicestring

デバイス情報

localestring

デバイスのロケール

osstring

オペレーティングシステム情報

platformstring

プラットフォーム(iOS、Android など)

One of: "iOS", "macOS", "iPadOS", "Android", "visionOS", "web"

timezonestring

デバイスのタイムゾーン

user_agentstring

ユーザーエージェント文字列

app_buildstring

アプリのビルドバージョン

app_versionstring

アプリのバージョン

adapty_sdk_versionstring

Adapty SDK のバージョン

idfastring

iOS の広告識別子(IDFA)

idfvstring

iOS のベンダー識別子(IDFV)

advertising_idstring

Android の広告 ID

android_idstring

Android のデバイス ID

android_app_set_idstring

Android のアプリセット ID

Responses

プロファイルが正常に作成されました

Schema
dataobjectrequired
app_idstringrequired

アプリの内部ID

profile_idstringrequired

AdaptyのプロファイルID

customer_user_idstringrequired

お客様のシステムにおけるユーザーのID

total_revenue_usdnumberrequired

プロファイルで獲得した総収益(USD)を表すfloat値

segment_hashstringrequired

内部パラメーター

timestampintegerrequired

レスポンス時間(ミリ秒)。競合状態の解決に使用します

custom_attributesarray of objectrequired

プロファイルに設定できるカスタム属性は最大30件です

keystringrequired

キーは30文字以下の文字列である必要があります。使用できるのは英字、数字、ダッシュ、ピリオド、アンダースコアのみです

valuestring | numberrequired

属性値は50文字以下である必要があります。値として使用できるのは文字列と浮動小数点数のみです

access_levelsarray of objectrequired

アクセスレベルオブジェクトの配列。顧客がアクセスレベルを持っていない場合は空の配列

access_level_idstring

アクセスレベルの識別子

storestring

アクセスレベルが購入されたストア

store_product_idstring

ストア内のプロダクトID

store_base_plan_idstring

ストア内のベースプランID

store_transaction_idstring

ストア内のトランザクションID

store_original_transaction_idstring

ストア内の元のトランザクションID

offerallOf

プロモーションオファーまたは初回オファーが適用された場合のオファーの詳細

categorystring

オファーカテゴリー

One of: "introductory", "promotional", "offer_code", "win_back"

typestring

オファータイプ

One of: "free_trial", "pay_as_you_go", "pay_up_front"

idstring

オファーID

starts_atstring

アクセスレベルが開始される日時

purchased_atstring

アクセスレベルが購入された日時

originally_purchased_atstring

アクセスレベルが最初に購入された日時

expires_atstring

アクセスレベルが期限切れになる日時

renewal_cancelled_atstring

更新がキャンセルされた日時

billing_issue_detected_atstring

請求の問題が検出された日時

is_in_grace_periodboolean

アクセスレベルがグレース期間中かどうか

cancellation_reasonstring

キャンセルの理由

subscriptionsarray of objectrequired

サブスクリプションオブジェクトの配列。顧客がサブスクリプションを持っていない場合は空の配列

storestring

サブスクリプションが購入されたストア

store_product_idstring

ストア内のプロダクトID

store_base_plan_idstring

ストア内のベースプランID

store_transaction_idstring

ストア内のトランザクションID

store_original_transaction_idstring

ストア内の元のトランザクションID

offerallOf

プロモーションオファーまたは初回オファーが適用された場合のオファー詳細

categorystring

オファーカテゴリー

One of: "introductory", "promotional", "offer_code", "win_back"

typestring

オファータイプ

One of: "free_trial", "pay_as_you_go", "pay_up_front"

idstring

オファーID

environmentstring

環境(サンドボックス、本番)

purchased_atstring

サブスクリプションが購入された日時

originally_purchased_atstring

サブスクリプションが最初に購入された日時

expires_atstring

サブスクリプションの有効期限

renewal_cancelled_atstring

更新がキャンセルされた日時

billing_issue_detected_atstring

請求の問題が検出された日時

is_in_grace_periodboolean

サブスクリプションがグレース期間中かどうか

cancellation_reasonstring

キャンセルの理由

non_subscriptionsarray of objectrequired

買い切り購入オブジェクトの配列。顧客が購入履歴を持っていない場合は空の配列

purchase_idstring

購入の一意識別子

storestring

購入が行われたストア

store_product_idstring

ストア内のプロダクトID

store_base_plan_idstring

ストア内のベースプランID

store_transaction_idstring

ストア内のトランザクションID

store_original_transaction_idstring

ストア内の元のトランザクションID

purchased_atstring

購入が行われた日時

environmentstring

環境(サンドボックス、本番)

is_refundboolean

返金かどうか

is_consumableboolean

消耗型アイテムの購入かどうか

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": []
  }
}

認証エラー

Schema
errorsarray of objectrequired
sourcestring

エラーの発生源

errorsarray of string

エラーメッセージの配列

error_codestringrequired

エラーの短い名称

status_codeintegerrequired

HTTPステータスコード

Example
{
  "errors": [
    {
      "source": "non_field_errors",
      "errors": [
        "Authentication credentials were not provided."
      ]
    }
  ],
  "error_code": "not_authenticated",
  "status_code": 401
}

内部サーバーエラー