POST /api/v2/web-api/paywall/

获取付费墙

从指定版位获取付费墙。

Request body

storestringrequired

产品购买所在的商店。可选值:app_storeplay_storestripe,或您自定义商店的 Store ID

localestring

付费墙语言环境的标识符。该参数应为由一个或多个子标签组成的语言代码,子标签之间以"-"字符分隔,第一个子标签表示语言,第二个子标签表示地区。

placement_idstringrequired

版位的标识符。此值为您在 Adapty 看板中创建版位时所指定的值。

customer_user_idstring

customer_user_idprofile_id 二者必填其一。您在应用中用于标识用户的用户 ID(如果有的话),例如可以是用户的 UUID、电子邮件或任何其他 ID。

profile_idstring

customer_user_idprofile_id 二者必填其一。用户在 Adapty 中的标识符。

Responses

成功响应将包含付费墙对象。

Schema
placement_idstringrequired

展示此付费墙的版位 ID。该值在 Adapty 看板中创建版位时设定。

variation_idstringrequired

用于追踪与该特定付费墙相关联的购买行为的实验变体 ID。

paywall_idstringrequired

付费墙的唯一标识符。

ab_test_namestring

所属 A/B 测试的名称。

paywall_namestringrequired

付费墙名称,与 Adapty 看板中定义的名称一致。

productsarray of objectrequired

包含付费墙产品信息的产品对象数组。

titlestring

产品名称,来自 Adapty 看板中的产品部分。

is_consumablebooleanrequired

表示该产品是否为消耗型商品。

adapty_product_idstring

Adapty 内部使用的产品 ID。

vendor_product_idstringrequired

应用商店中的产品 ID。

introductory_offer_eligibilityboolean

表示用户是否符合 iOS 新用户优惠的资格。

promotional_offer_eligibilityboolean

表示用户是否符合促销活动的资格。

base_plan_idstring

Google Play 的基础方案 ID 或 Stripe 的价格 ID。 Google Play 请参见 Base plan ID, Stripe 请参见 price ID

offerallOf

JSON 格式的 Offer 对象。

categorystring

已应用优惠的类别。

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

typestring

当前有效优惠的类型。若此值不为 null,表示该优惠已在当前订阅周期内生效。

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

idstring

已应用优惠的 ID。

remote_configobject

包含付费墙完整远程配置的 RemoteConfig 对象。

langstringrequired

付费墙本地化的语言环境代码。使用以连字符(-)分隔的语言和地区子标签。 示例:en 表示英语,pt-br 表示巴西葡萄牙语。

datastringrequired

表示付费墙远程配置的序列化 JSON 字符串。 您可以在 Adapty 看板中特定付费墙的"远程配置"标签页中找到此内容。

Example
{
  "placement_id": "onboarding",
  "variation_id": "d76feea0-c0cf-4942-bef5-84ed701fc6db",
  "paywall_id": "9a93fe6f-9162-4dc0-b4b7-73079ed95c34",
  "ab_test_name": "1 week + 1 month | apple picture",
  "paywall_name": "1 week + 1 month | apple picture",
  "products": [
    {
      "title": "1 week",
      "is_consumable": false,
      "adapty_product_id": "1c3e03e1-9c43-4f94-aeb5-c7ae2f73d0c2",
      "vendor_product_id": "1_week_apple",
      "introductory_offer_eligibility": true,
      "promotional_offer_eligibility": true,
      "base_plan_id": null,
      "offer": null
    },
    {
      "title": "1 month",
      "is_consumable": false,
      "adapty_product_id": "f4088450-45a8-4737-8db0-367e642d7dcb",
      "vendor_product_id": "1_month_apple",
      "introductory_offer_eligibility": true,
      "promotional_offer_eligibility": true,
      "base_plan_id": null,
      "offer": null
    }
  ],
  "remote_config": {
    "lang": "en",
    "data": "{\"default_product_number\":1,\"features\":[\"#fresh\",\"#green\",\"#healthy1\"],\"soft_paywall\":false,\"image_url\":\"https://adapty.io/apple.png\"}"
  }
}

请求错误

Schema
errorsarray of object
sourcestring
errorsarray of string
error_codestring
status_codeinteger

未授权

Schema
errorsarray of object
sourcestring
errorsarray of string
error_codestring
status_codeinteger

未找到

Schema
errorsarray of object
sourcestring
errorsarray of string
error_codestring
status_codeinteger