POST /api/v2/server-side-api/purchase/profile/revoke/access-level/

撤销访问等级

从 Adapty 中您应用的终端用户处移除访问等级。

Header parameters

adapty-customer-user-idstring

您系统中客户的唯一 ID。adapty-customer-user-idadapty-profile-id 二选一必填。

adapty-profile-idstring

您系统中用户画像的唯一 ID。如果您正在处理匿名用户画像,这是最佳选择。adapty-customer-user-idadapty-profile-id 二选一必填。

Request body

access_level_idstringrequired

在访问等级页面中配置的付费访问等级 ID

revoke_atstring

指定访问等级到期的时间。若要立即撤销访问权限,请省略此字段或将其设置为 null。默认值为 null。

Responses

访问等级撤销成功

Schema
dataobjectrequired
app_idstringrequired

您应用的内部 ID

profile_idstringrequired

Adapty 用户画像 ID

customer_user_idstringrequired

您系统中的用户 ID

total_revenue_usdnumberrequired

表示该用户画像在 USD 中获得的总收入的浮点值

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

是否为消耗型商品

请求错误

Schema
errorsarray of objectrequired
sourcestring

错误来源

errorsarray of string

错误消息数组

error_codestringrequired

简短错误名称

status_codeintegerrequired

HTTP 状态码

未授权

Schema
errorsarray of objectrequired
sourcestring

错误来源

errorsarray of string

错误消息数组

error_codestringrequired

简短错误名称

status_codeintegerrequired

HTTP 状态码

用户画像未找到

Schema
errorsarray of objectrequired
sourcestring

错误来源

errorsarray of string

错误消息数组

error_codestringrequired

简短错误名称

status_codeintegerrequired

HTTP 状态码

服务器内部错误