预览购买报价
- 操作名
previewAttach- 服务端 SDK
previewAttach- Python
preview_attach- Go
PreviewAttach- 浏览器 SDK
previewAttach
POST/api/v1/subscriptions/preview-attach
为所选 Product、Provider 与币种生成固定报价和 operationId;不扣款。
API v1更新于
- 凭据
- Server Key(传
customerId)或 Customer Token,权限 billing:read。 - SDK
- JavaScript
createLongplayServer().previewAttach · JavaScript createLongplay().previewAttach · Python preview_attach · Go PreviewAttach - 成功状态
- HTTP 200
在 record_only 模式下,商户须先支持商户桥接 v4 的 operation.prepare 准备命令,Longplay 才能冻结报价并生成 merchantTerms;确认报价时提交与之匹配的 merchantConfirmation。
相关:商户准备报价
1curl -X POST "$LONGPLAY_API_URL/api/v1/subscriptions/preview-attach" \2 -H "Authorization: Bearer $LONGPLAY_SERVER_KEY" \3 -H "X-Indiana-Protocol: 0.10" \4 -H "Content-Type: application/json" \5 -d '{6 "requestId": "0f58d1f8-069f-4288-8ec1-4ed10af55b45",7 "plans": [8 {9 "productVersionId": "8c489a1a-5542-44fe-8e80-da2f6a319d01"10 }11 ],12 "provider": "stripe",13 "currency": "USD",14 "customerId": "8b258f8b-4228-40fa-8d24-5b16428e686d"15}'
响应为示例数据。
请求体参数#
application/json
requestIduuid必填你的业务请求 UUID;同一次操作重试复用,新的操作生成新值。
predecessorOperationIduuid可选前一次相关操作的 ID。
invoiceModeobject可选开票方式设置(可选)。
展开子字段
enable_plan_immediatelyboolean可选是否立即启用 Product。
default: false
finalizeboolean可选是否立即定稿。
default: true
invoice_template_idstring可选发票模板的 ID。
net_terms_daysinteger可选付款期限(天)。
max: 9007199254740991
entityIduuid可选当前客户范围内的 Entity ID;只用于已配置的 Entity 和许可 Feature。
billingSubscriptionIduuid可选计费订阅的 ID。
newBillingSubscriptiontrue可选仅 Stripe 可设为 true,强制新建财务订阅,不能同时指定 billingSubscriptionId;仍校验跨渠道主套餐互斥。
offerIduuid可选当前 Customer 已领取的优惠 ID,用于新购买;已有订阅改用 setBillingCoupons。
nativeOfferobject可选App Store 或 Google Play 的优惠选择。
展开子字段
offerKindenum必填优惠类型,取值见允许值。
查看允许值
"none""introductory""promotional"
offerIdstring | null必填当前 Customer 已领取的优惠 ID,用于新购买;已有订阅改用 setBillingCoupons。
discountMinorinteger必填金额,以最小货币单位计(如美分)。
min: 0 · max: 100000000
trialDaysinteger | null必填试用天数。
plansarray必填要购买的 Product Version,可附带席位和 Feature 数量。
minItems: 1 · maxItems: 20
展开子字段
productVersionIduuid必填Product Version 的 ID。
seatQuantitiesobject可选按许可键(报价中的 seats.key)指定该 Product 每个席位许可要购买的席位总数,取值为 0 到 10000 的整数。省略的许可或低于包含数量的值按包含的席位数计算,超出部分收费。
featureQuantitiesobject可选按 Feature UUID 指定该 Product 每个预付 Feature 要购买的包数,取值为 0 到 10000 的整数;每包增加该 Price 的计费单位数量。该 Product 的每个预付 Feature 都必须提供(0 表示不购买)。
providerenum必填支付渠道,取值见允许值。
查看允许值
"stripe""apple""google""merchant"
currencyenum必填已发布价格支持的币种代码。
查看允许值
"USD""EUR""CNY""GBP""JPY""CAD""AUD""NZD""CHF""HKD""SGD""KRW""INR""BRL""MXN""TWD""THB""IDR""MYR""PHP""VND""ZAR""AED""SAR""SEK""NOK""DKK""PLN""CZK""HUF""ILS""TRY""RON"
funnelIduuid可选Funnel 的 ID。
funnelVersionIduuid可选Funnel 版本的 ID。
customerIduuid可选Customer 的 UUID。
响应字段#
成功响应都包含 requestId(本次请求 ID,排查时提供)和 scope(App 与环境)。
HTTP 200 · application/json
requestIduuid必填服务端为这次 HTTP 请求生成的 UUID,排查时提供;它不是你的业务 requestId。
scopeobject必填响应实际所属的 App 和环境。Header 只能核对,不能切换 Key 范围。
展开子字段
projectIdstring必填凭据绑定的 App ID。
minLength: 1
environmentenum必填独立数据范围:sandbox 或 live。
查看允许值
"sandbox""live"
quoteobject必填报价。
展开子字段
operationIduuid必填业务操作 UUID;订阅执行引用 previewAttach 返回的 operationId,余额退款引用原消费操作。
merchantTermsobject可选商户已准备好的条款;有它时金额和周期以它为准。
展开子字段
requestobject | object | object必填商户收到的原准备请求,用来证明这些条款属于哪次选择。
展开子字段
subjectobject | object | object必填原准备请求绑定的 App、环境和 Customer。
operationIduuid | uuid | uuid必填业务操作 UUID;订阅执行引用 previewAttach 返回的 operationId,余额退款引用原消费操作。
configurationRevisioninteger | integer | integer必填原准备请求绑定的配置修订号。
connectionRevisioninteger | integer | integer必填发起准备时的商户连接版本;连接变更后需重新准备。
expiresAtdate-time | date-time | date-time必填到期时间(ISO 8601,UTC)。
action"purchase" | "subscription_change" | "refund"必填本次业务动作。不同动作的目标字段和数量要求不同,见请求结构与示例。
modeenum | enum可选模式,取值见允许值。
currencystring | string | string必填已发布价格支持的币种代码。
itemsarray可选列表项。
minItems: 1 · maxItems: 100
offerRefsarray | array可选这次选择带上的商户优惠引用。
merchantSubscriptionIdstring可选要变更的商户订阅引用。
minLength: 1 · maxLength: 200
changeobject | object | object | object | object | object可选要变更到的目标。
timingenum可选立即变更或在周期末变更;只用于契约允许的套餐变更动作。
查看允许值
"immediate""renewal"
prorationenum可选这次计划变更使用的按比例结算方式。
查看允许值
"none""create_prorations""always_invoice"
merchantInvoiceIdstring可选要退款的商户账单引用。
minLength: 1 · maxLength: 200
amountMinorinteger可选金额,以最小货币单位计(如美分)。
max: 200000000
entitlementActionenum可选退款后保留(retain)或撤销(revoke)权益。
查看允许值
"retain""revoke"
requestDigeststring必填原准备请求的规范摘要。
pattern: ^[a-f0-9]{64}$
merchantQuoteIdstring必填商户这次报价的引用。
minLength: 1 · maxLength: 200
quoteTermsDigeststring必填条款规范摘要;确认时绑定它,之后不可更换。
pattern: ^[a-f0-9]{64}$
termsVersionstring必填商户条款版本。
minLength: 1 · maxLength: 200
sourceRevisionsarray必填报价依据的商品目录或订阅版本。
maxItems: 100
展开子字段
referencestring必填报价依据的数据来源引用。
minLength: 1 · maxLength: 200
revisionstring必填特定资源的版本号;Customer 资料更新不使用版本号。
minLength: 1 · maxLength: 200
observedAtdate-time必填时间(ISO 8601)。
expiresAtdate-time必填到期时间(ISO 8601,UTC)。
currencystring必填已发布价格支持的币种代码。
pattern: ^[A-Z]{3}$
automaticTaxboolean必填税额是否由商户按自动税计算;未知税额不会当作 0。
linesarray必填明细行。
maxItems: 100
展开子字段
merchantLineIdstring必填商户原生发票行稳定标识;同一发票内不能重复。
minLength: 1 · maxLength: 200
merchantPriceIdstring | null必填这一行的商户价格引用;无对应价格时为空。
quantitystring必填数量,十进制字符串,避免浮点误差。
pattern: ^(0|[1-9]\d{0,11})(\.\d{1,6})?$
subtotalMinorinteger必填金额,以最小货币单位计(如美分)。
min: -200000000 · max: 200000000
discountMinorinteger必填金额,以最小货币单位计(如美分)。
min: 0 · max: 200000000
taxMinorinteger | null必填金额,以最小货币单位计(如美分)。
totalMinorinteger | null必填金额,以最小货币单位计(如美分)。
subscriptionTermsobject | null必填后续周期的订阅承诺,独立于本次扣款;非订阅时为空。
展开子字段
itemsarray必填列表项。
minItems: 1 · maxItems: 100
discountobject | null可选折扣。
discountExpiresAtdate-time | null可选时间(ISO 8601)。
initialAmountMinorinteger可选金额,以最小货币单位计(如美分)。
min: 0 · max: 100000000
subtotalMinorinteger必填金额,以最小货币单位计(如美分)。
min: -200000000 · max: 200000000
discountMinorinteger必填金额,以最小货币单位计(如美分)。
min: 0 · max: 200000000
nativeDiscountMinorinteger可选金额,以最小货币单位计(如美分)。
min: 0 · max: 200000000
discountobject | null可选折扣。
展开子字段
couponIduuid必填当前 App 和环境中的优惠券 UUID。
amountMinorinteger必填金额,以最小货币单位计(如美分)。
min: 0 · max: 100000000
applicationPolicyenum可选此优惠与原生价格折扣的组合方式:替换原生折扣,或在原生折扣上叠加。
查看允许值
"replace""stack_native"
applicableProductIdsarray可选当前 App 和环境中,此优惠适用的商户原生 Product 标识。
minItems: 1 · maxItems: 100
termsobject | object必填条款内容。
durationobject | object | object必填持续时长。
taxMinorinteger | null必填金额,以最小货币单位计(如美分)。
totalMinorinteger | null必填金额,以最小货币单位计(如美分)。
effectiveAtdate-time | null必填时间(ISO 8601)。
expectedEffectsarray必填商户承诺的原生结果,用于确认展示,不代表平台余额。
maxItems: 100
展开子字段
referencestring必填这项预期结果的稳定标识。
minLength: 1 · maxLength: 200
kindenum必填类型,取值见允许值。
查看允许值
"grant""revoke""change"
descriptionstring必填描述。
minLength: 1 · maxLength: 1000
quantitystring | null必填数量,十进制字符串,避免浮点误差。
unitstring | null必填数量对应的商户单位;没有数量时为空。
requiredConsentsarray必填确认前用户必须接受的商户条款。
maxItems: 20
展开子字段
referencestring必填这项同意条款的稳定标识。
minLength: 1 · maxLength: 200
versionstring必填版本号。
minLength: 1 · maxLength: 200
summarystring必填向用户展示的条款摘要。
minLength: 1 · maxLength: 1000
entityIduuid | null必填当前客户范围内的 Entity ID;只用于已配置的 Entity 和许可 Feature。
billingSubscriptionIduuid | null必填计费订阅的 ID。
discountobject | null必填折扣。
展开子字段
offerIduuid必填当前 Customer 已领取的优惠 ID,用于新购买;已有订阅改用 setBillingCoupons。
couponIduuid必填当前 App 和环境中的优惠券 UUID。
discountobject | object必填折扣。
展开子字段
type"percent" | "amount"必填折扣类型:percent 按 percentOff 的百分比减免;amount 减免 amountOffCents,以 currency 的最小货币单位计。
percentOffnumber可选折扣百分比。
min: 1 · max: 100
amountOffCentsinteger可选减免金额(最小货币单位)。
min: 1 · max: 100000000
currencyenum可选已发布价格支持的币种代码。
查看允许值
"USD""EUR""CNY""GBP""JPY""CAD""AUD""NZD""CHF""HKD""SGD""KRW""INR""BRL""MXN""TWD""THB""IDR""MYR""PHP""VND""ZAR""AED""SAR""SEK""NOK""DKK""PLN""CZK""HUF""ILS""TRY""RON"
durationobject | object | object必填持续时长。
展开子字段
type"once" | "repeating" | "forever"必填适用时长:once 仅适用于一张发票,repeating 适用 months 个月,forever 持续适用。
monthsinteger可选月数。
min: 1 · max: 36
amountMinorinteger必填金额,以最小货币单位计(如美分)。
min: 0 · max: 100000000
allocationsarray必填本次规则计算或账本操作涉及的余额分配明细。
minItems: 1 · maxItems: 20
展开子字段
productVersionIduuid必填Product Version 的 ID。
amountMinorinteger必填金额,以最小货币单位计(如美分)。
min: 0 · max: 100000000
expiresAtdate-time必填到期时间(ISO 8601,UTC)。
chargeobject | null必填将 Product 加入 billingSubscriptionId 指定的现有 Stripe 订阅时,从 effectiveAt 到 periodEndsAt 按比例计算的费用;新购买时为 null。
展开子字段
effectiveAtdate-time必填时间(ISO 8601)。
periodEndsAtdate-time必填时间(ISO 8601)。
debitMinorinteger必填金额,以最小货币单位计(如美分)。
min: 0 · max: 100000000
discountMinorinteger必填金额,以最小货币单位计(如美分)。
min: 0 · max: 100000000
taxMinorinteger必填金额,以最小货币单位计(如美分)。
min: 0 · max: 100000000
totalMinorinteger必填金额,以最小货币单位计(如美分)。
min: 0 · max: 100000000
expiresAtdate-time必填到期时间(ISO 8601,UTC)。
providerenum必填支付渠道,取值见允许值。
查看允许值
"stripe""apple""google""merchant"
nativeOfferobject可选App Store 或 Google Play 的优惠选择。
展开子字段
offerKindenum必填优惠类型,取值见允许值。
查看允许值
"none""introductory""promotional"
offerIdstring | null必填当前 Customer 已领取的优惠 ID,用于新购买;已有订阅改用 setBillingCoupons。
discountMinorinteger必填金额,以最小货币单位计(如美分)。
min: 0 · max: 100000000
trialDaysinteger | null必填试用天数。
currencyenum必填已发布价格支持的币种代码。
查看允许值
"USD""EUR""CNY""GBP""JPY""CAD""AUD""NZD""CHF""HKD""SGD""KRW""INR""BRL""MXN""TWD""THB""IDR""MYR""PHP""VND""ZAR""AED""SAR""SEK""NOK""DKK""PLN""CZK""HUF""ILS""TRY""RON"
linesarray必填明细行。
minItems: 1 · maxItems: 20
展开子字段
lineIduuid必填该报价行的 ID,在报价内唯一。
productVersionIduuid必填Product Version 的 ID。
productNamestring必填Product 名称。
minLength: 1 · maxLength: 80
intervalenum必填周期,取值见允许值。
查看允许值
"free""week""month""year""one_time"
intervalCountinteger可选收费周期的次数:week 最多 156、month 最多 36、year 最多 3,省略为 1;free 和 one_time 不接受。额度重置周期独立。
min: 1 · max: 156
baseAmountMinorinteger必填金额,以最小货币单位计(如美分)。
min: 0 · max: 100000000
seatsarray必填席位。
maxItems: 20
展开子字段
keystring必填该 Product 所含席位许可的键;在 plans.seatQuantities 中使用,也可在 previewUpdate 中作为 change.licenseKey 使用。
minLength: 1 · maxLength: 64 · pattern: ^[a-z][a-z0-9_]*$
quantityinteger必填数量(整数)。
min: 0 · max: 10000
includedQuantityinteger必填Product 价格中已包含、不额外收费的席位数;quantity 不会低于该值。
min: 0 · max: 10000
maximumQuantityinteger必填该许可可请求的最大席位总数(10000)。
min: 0 · max: 10000
unitAmountMinorinteger必填金额,以最小货币单位计(如美分)。
min: 0 · max: 100000000
prepaidarray可选该行逐项列出的预付 Feature 数量。API 目前返回空数组;预付包费用已计入 baseAmountMinor。
maxItems: 100
展开子字段
itemKeystring必填明细项键。
pattern: ^paid:feature:[a-f0-9]{8}-[a-f0-9]{4}-[1-8][a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$
internal_feature_iduuid必填Feature 的 ID。
includedAmountstring必填购买包之前该 Feature 已包含的数量,十进制字符串;总量为该值加上 terms.units × quantity。
pattern: ^(0|[1-9]\d{0,11})(\.\d{1,6})?$
quantityinteger必填数量(整数)。
min: 0 · max: 10000
unitAmountMinorinteger必填金额,以最小货币单位计(如美分)。
min: 0 · max: 100000000
productIdstring | null必填Product 的 ID。
priceIdstring | null必填绑定到该预付包的支付渠道 Price ID,例如 Stripe Price ID;未绑定时与 productId 一起为 null,仅在该包不收费时允许。
catalogAmountMinorinteger必填金额,以最小货币单位计(如美分)。
min: 0 · max: 100000000
trialobject | null必填试用。
展开子字段
daysinteger必填天数。
min: 1 · max: 730
cardRequiredboolean必填试用是否需要先收集付款方式。未启用 invoiceMode 的 Stripe 报价中为 false 时没有 execution:attach 会立即开始试用,不经过 Checkout,也不能使用优惠券。
catalogAmountMinorinteger必填金额,以最小货币单位计(如美分)。
min: 0 · max: 100000000
nativeDiscountMinorinteger可选金额,以最小货币单位计(如美分)。
min: 0 · max: 100000000
automaticTaxboolean必填该购买是否使用 Stripe 自动计税;为 true 时,Stripe 会在 Checkout 时在报价金额之外计算税费。
executionobject | object | null必填执行信息。
展开子字段
invoiceModeobject可选开票方式设置(可选)。
展开子字段
enable_plan_immediatelyboolean可选是否立即启用 Product。
default: false
finalizeboolean可选是否立即定稿。
default: true
invoice_template_idstring可选发票模板的 ID。
net_terms_daysinteger可选付款期限(天)。
max: 9007199254740991
appendobject可选追加到现有 Stripe 订阅时使用的上下文,字段见下。
展开子字段
subscriptionIdstring必填Stripe 订阅 ID(sub_…)。
pattern: ^sub_[A-Za-z0-9]+$
customerIdstring必填Stripe Customer ID(cus_…)。
pattern: ^cus_[A-Za-z0-9]+$
sourceItemsarray必填来源明细项。
minItems: 1 · maxItems: 100
prorationDateinteger必填将 Product 加入现有 Stripe 订阅时作为 Stripe proration_date 发送的 Unix 时间(秒);按比例计费从该时刻计算到周期结束。
min: 0 · max: 9007199254740991
amountMinorinteger必填金额,以最小货币单位计(如美分)。
max: 9007199254740991
periodStartMsnumber必填周期开始时间(毫秒时间戳)。
periodEndMsnumber必填周期结束时间(毫秒时间戳)。
provider"stripe" | "merchant"必填支付渠道,取值见允许值。
executorenum | "merchant"必填执行方,取值见允许值。
accountIdstring可选Stripe 账户 ID(acct_…)。
pattern: ^acct_[A-Za-z0-9]+$
modeenum | enum必填模式,取值见允许值。
lineItemsarray | array必填明细行。
展开子字段
pricestring | null可选Stripe Price ID(price_…)。
quantityinteger | integer必填数量(整数)。
priceIduuid | uuid必填该明细行所计费的目录 Price 的 UUID;price 是与之绑定的 Stripe Price。
productNamestring可选Product 名称。
minLength: 1 · maxLength: 80
amountMinorinteger可选金额,以最小货币单位计(如美分)。
min: 0 · max: 100000000
currencystring可选已发布价格支持的币种代码。
pattern: ^[a-z]{3}$
intervalenum | enum必填周期,取值见允许值。
intervalCountinteger | integer必填Stripe Price 的计费间隔数量,最多 52。
slotenum可选该行使用该 Price 的哪个 Stripe Price:stripe_price_id 为常规 Stripe Price;stripe_empty_price_id 为计量 Price 的零金额周期性 Stripe Price,仅在没有其他周期性项目维持订阅时加入,用量在续订时计费。
查看允许值
"stripe_price_id""stripe_empty_price_id"
tiersobject | null | object | null必填阶梯价格档位。
productVersionIduuid可选Product Version 的 ID。
productIdstring可选Product 的 ID。
minLength: 1 · maxLength: 200
unitAmountMinorinteger可选金额,以最小货币单位计(如美分)。
min: 0 · max: 100000000
totalMinorinteger可选金额,以最小货币单位计(如美分)。
min: 0 · max: 100000000
kindenum可选类型,取值见允许值。
查看允许值
"fixed""prepaid""seat"
discountsarray可选折扣列表。
maxItems: 1
展开子字段
couponstring必填优惠券。
pattern: ^[A-Za-z0-9_-]{1,200}$
trialPeriodDaysinteger | null | integer | null必填天数。
metadataobject可选自定义键值数据。
展开子字段
grooveCheckoutIduuid必填Longplay 写入 Stripe metadata 的归因字段,原样复制,不要修改。
grooveCustomerIduuid必填Longplay 写入 Stripe metadata 的归因字段,原样复制,不要修改。
expiresAtdate-time | date-time必填到期时间(ISO 8601,UTC)。
operationIduuid可选业务操作 UUID;订阅执行引用 previewAttach 返回的 operationId,余额退款引用原消费操作。
customerIduuid可选Customer 的 UUID。
configurationRevisioninteger可选扫描配置的修订号。
min: 0 · max: 9007199254740991
connectionRevisioninteger可选冻结此商业指令时的商户连接修订号;用于核对此操作仍使用同一连接配置。
min: 0 · max: 9007199254740991
currencystring可选已发布价格支持的币种代码。
pattern: ^[A-Z]{3}$
type"purchase"可选原商户商业指令的类型:购买、订阅变更或退款。按该类型读取对应的固定商业参数。
catalogAmountMinorinteger可选金额,以最小货币单位计(如美分)。
min: 0 · max: 100000000
nativeDiscountMinorinteger可选金额,以最小货币单位计(如美分)。
min: 0 · max: 100000000
discountobject | null可选折扣。
展开子字段
couponIduuid必填当前 App 和环境中的优惠券 UUID。
amountMinorinteger必填金额,以最小货币单位计(如美分)。
min: 0 · max: 100000000
applicationPolicyenum可选此优惠与原生价格折扣的组合方式:替换原生折扣,或在原生折扣上叠加。
查看允许值
"replace""stack_native"
applicableProductIdsarray可选当前 App 和环境中,此优惠适用的商户原生 Product 标识。
minItems: 1 · maxItems: 100
termsobject | object必填条款内容。
durationobject | object | object必填持续时长。
automaticTaxboolean可选原购买指令是否要求商户使用自动计税能力。该要求随报价固定,由商户原生支付流程执行。
失败时返回错误对象,按 error.code 与 error.recovery 处理。下表是这个接口的凭据、作用域和幂等字段决定的错误;视请求内容还可能返回 NOT_FOUND(引用的资源不存在)、NOT_CONFIGURED(所需的集成未连接)或 PAYLOAD_TOO_LARGE。有些拒绝(如余额不足)不是错误,而是成功响应里的 reason。
可能的错误| code | HTTP | 何时 | recovery |
|---|
INVALID_REQUEST | 400 | 请求不符合本页的参数。缺少或无法解析协议头时分别返回 UNSUPPORTED_PROTOCOL_VERSION 或 INVALID_PROTOCOL_VERSION。 | fix_request |
UNAUTHENTICATED | 401 | 凭据缺失、无效、过期或已撤销。 | authenticate |
FORBIDDEN | 403 | 凭据没有 billing:read 权限。 | check_permissions |
SCOPE_MISMATCH | 403 | X-Indiana-Project 或 X-Indiana-Environment 与凭据所属的 App 和环境不一致。 | check_scope |
CONFLICT | 409 | 同一个 requestId 用了不同的输入(reason: IDEMPOTENCY_CONFLICT)。 | resolve_conflict |
RATE_LIMITED | 429 | 请求过多;按 Retry-After 等待后用同一请求重试。 | retry_same_request |
SERVICE_UNAVAILABLE | 503 | 服务暂时不可用;用同一请求重试。 | retry_same_request |
INTERNAL_ERROR | 500 | 结果未知;先读取原操作,或用原 ID 和原输入重放。 | recover_operation |
可能的错误
INVALID_REQUEST
- HTTP
- 400
- 何时
- 请求不符合本页的参数。缺少或无法解析协议头时分别返回
UNSUPPORTED_PROTOCOL_VERSION 或 INVALID_PROTOCOL_VERSION。 - recovery
fix_request
UNAUTHENTICATED
- HTTP
- 401
- 何时
- 凭据缺失、无效、过期或已撤销。
- recovery
authenticate
FORBIDDEN
- HTTP
- 403
- 何时
- 凭据没有
billing:read 权限。 - recovery
check_permissions
SCOPE_MISMATCH
- HTTP
- 403
- 何时
X-Indiana-Project 或 X-Indiana-Environment 与凭据所属的 App 和环境不一致。- recovery
check_scope
CONFLICT
- HTTP
- 409
- 何时
- 同一个
requestId 用了不同的输入(reason: IDEMPOTENCY_CONFLICT)。 - recovery
resolve_conflict
RATE_LIMITED
- HTTP
- 429
- 何时
- 请求过多;按
Retry-After 等待后用同一请求重试。 - recovery
retry_same_request
SERVICE_UNAVAILABLE
- HTTP
- 503
- 何时
- 服务暂时不可用;用同一请求重试。
- recovery
retry_same_request
INTERNAL_ERROR
- HTTP
- 500
- 何时
- 结果未知;先读取原操作,或用原 ID 和原输入重放。
- recovery
recover_operation
相关:错误码与恢复·请求约定·全部接口