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

Lấy paywall

Nhận paywall từ placement đã cung cấp.

Request body

storestringrequired

Cửa hàng nơi sản phẩm được mua. Các giá trị có thể: app_store, play_store, stripe, hoặc Store ID của cửa hàng tùy chỉnh của bạn.

localestring

Mã định danh ngôn ngữ của paywall. Tham số này được kỳ vọng là mã ngôn ngữ gồm một hoặc nhiều thẻ con được phân tách bằng ký tự "-". Thẻ con đầu tiên là ngôn ngữ, thẻ con thứ hai là khu vực.

placement_idstringrequired

Mã định danh của Placement. Đây là giá trị bạn đã chỉ định khi tạo placement trong Adapty Dashboard.

customer_user_idstring

Bắt buộc có customer_user_id hoặc profile_id. ID người dùng bạn sử dụng trong ứng dụng để nhận dạng người dùng nếu có. Ví dụ, đây có thể là UUID người dùng, email hoặc bất kỳ ID nào khác.

profile_idstring

Bắt buộc có customer_user_id hoặc profile_id. Mã định danh của người dùng trong Adapty.

Responses

Phản hồi thành công sẽ chứa đối tượng Paywall.

Schema
placement_idstringrequired

ID của Placement nơi paywall này được hiển thị. Giá trị này được thiết lập khi tạo placement trong Adapty Dashboard.

variation_idstringrequired

ID biến thể được dùng để theo dõi các giao dịch mua hàng liên kết với paywall cụ thể này.

paywall_idstringrequired

Mã định danh duy nhất của paywall.

ab_test_namestring

Tên của A/B test cha.

paywall_namestringrequired

Tên của paywall, như đã định nghĩa trong Adapty Dashboard.

productsarray of objectrequired

Mảng các đối tượng Product chứa thông tin sản phẩm cho paywall.

titlestring

Tên sản phẩm từ mục Products trong Adapty Dashboard.

is_consumablebooleanrequired

Cho biết sản phẩm có phải là consumable hay không.

adapty_product_idstring

ID sản phẩm nội bộ như được dùng trong Adapty.

vendor_product_idstringrequired

ID sản phẩm trong các cửa hàng ứng dụng.

introductory_offer_eligibilityboolean

Xác định liệu người dùng có đủ điều kiện nhận ưu đãi giới thiệu trên iOS hay không.

promotional_offer_eligibilityboolean

Xác định liệu người dùng có đủ điều kiện nhận ưu đãi hay không.

base_plan_idstring

ID base plan cho Google Play hoặc ID giá cho Stripe. Xem Base plan ID cho Google Play hoặc price ID cho Stripe.

offerallOf

Đối tượng Offer dưới dạng JSON.

categorystring

Danh mục của ưu đãi được áp dụng.

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

typestring

Loại ưu đãi đang hoạt động. Nếu giá trị này không null, nghĩa là ưu đãi đã được áp dụng trong kỳ gói đăng ký hiện tại.

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

idstring

ID của ưu đãi được áp dụng.

remote_configobject

Đối tượng RemoteConfig chứa toàn bộ Remote Config của paywall.

langstringrequired

Mã ngôn ngữ cho bản địa hóa paywall. Sử dụng thẻ ngôn ngữ và khu vực được phân tách bằng dấu gạch ngang (-). Ví dụ: en cho tiếng Anh, pt-br cho tiếng Bồ Đào Nha (Brazil).

datastringrequired

Chuỗi JSON được tuần tự hóa đại diện cho Remote Config của paywall. Bạn có thể tìm thấy nó trong tab Remote Config của một paywall cụ thể trong Adapty Dashboard.

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\"}"
  }
}

Yêu cầu không hợp lệ

Schema
errorsarray of object
sourcestring
errorsarray of string
error_codestring
status_codeinteger

Không được phép

Schema
errorsarray of object
sourcestring
errorsarray of string
error_codestring
status_codeinteger

Không tìm thấy

Schema
errorsarray of object
sourcestring
errorsarray of string
error_codestring
status_codeinteger