checkout-links
由 openapi.json 自动生成的 7 个端点及其请求、响应和权限元数据。
此参考由已发布 API 契约生成。字段、请求头和权限要求如下。
下载完整 OpenAPI 文档 · SHA-256: ccaa20cec11fad96e369b88073ce3608a5b071ce55d6dc03fa31df7b0f08c525
标识符和数据结构与公开契约一致,说明直接给出调用规则。共享模型见 数据模型.
GET /api/v1/admin/growth/checkout-links
GET /api/v1/admin/growth/checkout-links
List signed checkout links
{
"parameters": [
{
"in": "query",
"name": "before",
"required": false,
"schema": {
"format": "uuid",
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"items": {
"items": {
"properties": {
"claims": {
"additionalProperties": false,
"properties": {
"coupon": {
"pattern": "^[A-Z0-9][A-Z0-9_-]{3,31}$",
"type": [
"string",
"null"
]
},
"expires_at": {
"format": "date-time",
"type": "string"
},
"id": {
"format": "uuid",
"type": "string"
},
"key_id": {
"format": "uuid",
"type": "string"
},
"origins": {
"items": {
"format": "uri",
"maxLength": 2048,
"type": "string"
},
"maxItems": 20,
"minItems": 1,
"type": "array"
},
"plan_id": {
"format": "uuid",
"type": "string"
},
"price_id": {
"format": "uuid",
"type": "string"
},
"return_url": {
"format": "uri",
"maxLength": 2048,
"type": "string"
},
"v": {
"enum": [
1
],
"type": "number"
}
},
"required": [
"plan_id",
"price_id",
"coupon",
"expires_at",
"origins",
"return_url",
"v",
"id",
"key_id"
],
"type": "object"
},
"revoked_at": {
"type": [
"string",
"null"
]
},
"token": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\.[A-Za-z0-9_-]{43}$",
"type": "string"
}
},
"required": [
"claims",
"token",
"revoked_at"
],
"type": "object"
},
"type": "array"
},
"next_cursor": {
"format": "uuid",
"type": [
"string",
"null"
]
}
},
"required": [
"items",
"next_cursor"
],
"type": "object"
}
}
},
"description": "Result"
}
},
"summary": "List signed checkout links",
"tags": [
"checkout-links"
],
"x-body": "none",
"x-body-limit": 0,
"x-idempotency": "none",
"x-permission": "growth.coupon.manage",
"x-rate-limit": "commerce.checkout",
"x-reauth": false,
"effectiveSecurity": []
}POST /api/v1/admin/growth/checkout-links
POST /api/v1/admin/growth/checkout-links
Create a signed checkout link
{
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"coupon": {
"pattern": "^[A-Z0-9][A-Z0-9_-]{3,31}$",
"type": [
"string",
"null"
]
},
"expires_at": {
"format": "date-time",
"type": "string"
},
"origins": {
"items": {
"format": "uri",
"maxLength": 2048,
"type": "string"
},
"maxItems": 20,
"minItems": 1,
"type": "array"
},
"plan_id": {
"format": "uuid",
"type": "string"
},
"price_id": {
"format": "uuid",
"type": "string"
},
"return_url": {
"format": "uri",
"maxLength": 2048,
"type": "string"
}
},
"required": [
"plan_id",
"price_id",
"coupon",
"expires_at",
"origins",
"return_url"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"201": {
"content": {
"application/json": {
"schema": {
"properties": {
"claims": {
"additionalProperties": false,
"properties": {
"coupon": {
"pattern": "^[A-Z0-9][A-Z0-9_-]{3,31}$",
"type": [
"string",
"null"
]
},
"expires_at": {
"format": "date-time",
"type": "string"
},
"id": {
"format": "uuid",
"type": "string"
},
"key_id": {
"format": "uuid",
"type": "string"
},
"origins": {
"items": {
"format": "uri",
"maxLength": 2048,
"type": "string"
},
"maxItems": 20,
"minItems": 1,
"type": "array"
},
"plan_id": {
"format": "uuid",
"type": "string"
},
"price_id": {
"format": "uuid",
"type": "string"
},
"return_url": {
"format": "uri",
"maxLength": 2048,
"type": "string"
},
"v": {
"enum": [
1
],
"type": "number"
}
},
"required": [
"plan_id",
"price_id",
"coupon",
"expires_at",
"origins",
"return_url",
"v",
"id",
"key_id"
],
"type": "object"
},
"revoked_at": {
"type": [
"string",
"null"
]
},
"token": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\.[A-Za-z0-9_-]{43}$",
"type": "string"
}
},
"required": [
"claims",
"token",
"revoked_at"
],
"type": "object"
}
}
},
"description": "Result"
},
"422": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Invalid link or return URL policy"
}
},
"summary": "Create a signed checkout link",
"tags": [
"checkout-links"
],
"x-audit": "growth.checkout_link.create",
"x-body": "json",
"x-body-limit": 65536,
"x-idempotency": "required",
"x-permission": "growth.coupon.manage",
"x-rate-limit": "commerce.checkout",
"x-reauth": false,
"effectiveSecurity": []
}POST /api/v1/admin/growth/checkout-links/rotate-key
POST /api/v1/admin/growth/checkout-links/rotate-key
Rotate checkout signing key
{
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"overlap_seconds": {
"maximum": 604800,
"minimum": 0,
"type": "integer"
}
},
"required": [
"overlap_seconds"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"201": {
"content": {
"application/json": {
"schema": {
"properties": {
"key_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"key_id"
],
"type": "object"
}
}
},
"description": "Result"
}
},
"summary": "Rotate checkout signing key",
"tags": [
"checkout-links"
],
"x-audit": "growth.checkout_link.rotate",
"x-body": "json",
"x-body-limit": 65536,
"x-idempotency": "required",
"x-permission": "growth.coupon.manage",
"x-rate-limit": "commerce.checkout",
"x-reauth": true,
"effectiveSecurity": []
}POST /api/v1/admin/growth/checkout-links/{id}/revoke
POST /api/v1/admin/growth/checkout-links/{id}/revoke
Revoke a checkout link
{
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"format": "uuid",
"type": "string"
}
}
],
"responses": {
"204": {
"description": "Revoked"
},
"404": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "No such link"
}
},
"summary": "Revoke a checkout link",
"tags": [
"checkout-links"
],
"x-audit": "growth.checkout_link.revoke",
"x-body": "none",
"x-body-limit": 0,
"x-idempotency": "required",
"x-permission": "growth.coupon.manage",
"x-rate-limit": "commerce.checkout",
"x-reauth": false,
"effectiveSecurity": []
}POST /api/v1/me/checkout-links/orders
POST /api/v1/me/checkout-links/orders
Buy the signed selection after mailbox-proof registration
{
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"embedding_origin": {
"format": "uri",
"maxLength": 2048,
"type": "string"
},
"token": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\.[A-Za-z0-9_-]{43}$",
"type": "string"
}
},
"required": [
"token",
"embedding_origin"
],
"type": "object"
}
}
},
"required": true
},
"responses": {
"201": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CommerceOrder"
}
}
},
"description": "Result"
},
"404": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Invalid link"
},
"409": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Order conflict"
}
},
"summary": "Buy the signed selection after mailbox-proof registration",
"tags": [
"checkout-links"
],
"x-audit": "commerce.order.create",
"x-body": "json",
"x-body-limit": 65536,
"x-idempotency": "required",
"x-rate-limit": "commerce.checkout",
"x-reauth": false,
"effectiveSecurity": []
}GET /api/v1/public/checkout-links/resolve
GET /api/v1/public/checkout-links/resolve
Resolve a signed checkout selection
{
"parameters": [
{
"in": "query",
"name": "token",
"required": true,
"schema": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\.[A-Za-z0-9_-]{43}$",
"type": "string"
}
},
{
"in": "query",
"name": "embedding_origin",
"required": true,
"schema": {
"format": "uri",
"maxLength": 2048,
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"coupon": {
"pattern": "^[A-Z0-9][A-Z0-9_-]{3,31}$",
"type": [
"string",
"null"
]
},
"expires_at": {
"format": "date-time",
"type": "string"
},
"id": {
"format": "uuid",
"type": "string"
},
"key_id": {
"format": "uuid",
"type": "string"
},
"origins": {
"items": {
"format": "uri",
"maxLength": 2048,
"type": "string"
},
"maxItems": 20,
"minItems": 1,
"type": "array"
},
"plan_id": {
"format": "uuid",
"type": "string"
},
"price_id": {
"format": "uuid",
"type": "string"
},
"return_url": {
"format": "uri",
"maxLength": 2048,
"type": "string"
},
"v": {
"enum": [
1
],
"type": "number"
}
},
"required": [
"plan_id",
"price_id",
"coupon",
"expires_at",
"origins",
"return_url",
"v",
"id",
"key_id"
],
"type": "object"
}
}
},
"description": "Result"
},
"404": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Invalid or expired link"
}
},
"summary": "Resolve a signed checkout selection",
"tags": [
"checkout-links"
],
"x-body": "none",
"x-body-limit": 0,
"x-idempotency": "none",
"x-rate-limit": "commerce.checkout",
"x-reauth": false,
"effectiveSecurity": []
}GET /api/v1/public/embed/catalog
GET /api/v1/public/embed/catalog
Origin-bound public catalogue for embeds
{
"parameters": [
{
"in": "query",
"name": "token",
"required": true,
"schema": {
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\.[A-Za-z0-9_-]{43}$",
"type": "string"
}
},
{
"in": "query",
"name": "locale",
"required": false,
"schema": {
"enum": [
"zh-CN",
"en-US"
],
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PublicCatalog"
}
}
},
"description": "Result"
},
"404": {
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/Problem"
}
}
},
"description": "Invalid link or embedding origin"
}
},
"summary": "Origin-bound public catalogue for embeds",
"tags": [
"checkout-links"
],
"x-body": "none",
"x-body-limit": 0,
"x-idempotency": "none",
"x-rate-limit": "commerce.checkout",
"x-reauth": false,
"effectiveSecurity": []
}