Seal Subscriptions MCP by usefulapi
Manage Seal Subscriptions on Shopify: subscriptions, billing attempts, items, discounts, rules.
使うべきか
品質と安全性
検出事項(24)
- LOWsealsubscriptions_list_subscriptions 内
- LOWsealsubscriptions_list_subscriptions_by_billing_date 内
- LOWsealsubscriptions_get_subscription 内
- LOWsealsubscriptions_list_subscription_rules 内
- LOWsealsubscriptions_get_subscription_rule 内
- LOWsealsubscriptions_list_webhooks 内
- LOWsealsubscriptions_pause_subscription 内
- LOWsealsubscriptions_resume_subscription 内
- LOWsealsubscriptions_reactivate_subscription 内
- LOWsealsubscriptions_cancel_customer_subscription 内
ツール定義とプロトコルへの準拠に関する自動分析に基づいています。
コンテキストコスト
これは、サーバーのツールがモデルのコンテキストに読み込まれるたびに消費されるおおよそのトークン数です。数が多いほど、ほかのタスクに使える注意が減ります。
インストール
ワンクリックインストール
これを `claude_desktop_config.json` ファイルに追加してください:
{
"mcpServers": {
"seal-subscriptions": {
"url": "https://seal-subscriptions.usefulapi.io/mcp"
}
}
}リモートエンドポイント
https://seal-subscriptions.usefulapi.io/mcpstreamable-httpできること
ツール一覧
ツール(27)
🟢sealsubscriptions_list_subscriptions(query, status, with_items, with_billing_attempts, page)
List or search the shop's subscriptions (50 per page): status, customer, interval, total value, shipping address and card brand/last digits. Search by customer email, first or last name; filter by status; optionally include the items and the billing attempts of each. GET /subscriptions.
入力スキーマ
{
"type": "object",
"properties": {
"query": {
"description": "Search text: customer email, first name or last name.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"status": {
"description": "Only subscriptions in this status (default: all).",
"type": "string",
"enum": [
"active",
"paused",
"cancelled"
]
},
"with_items": {
"description": "Include each subscription's items (default false).",
"type": "boolean"
},
"with_billing_attempts": {
"description": "Include each subscription's billing attempts (default false).",
"type": "boolean"
},
"page": {
"description": "Page number, from 1 (default 1); 50 per page. Pass the previous reply's next_page.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 100000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sealsubscriptions_list_subscriptions_by_billing_date(from_datetime, to_datetime, cursor)
Subscriptions that have at least one billing attempt scheduled between two UTC date-times: the way to see what will be charged tomorrow or this week. Each subscription carries a cursor; pass the last one's cursor as `cursor` to get the next page. GET /subscriptions-by-billing-date.
入力スキーマ
{
"type": "object",
"properties": {
"from_datetime": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d$",
"description": "Start of the period in UTC, yyyy-mm-ddThh:mm:ss, e.g. 2030-12-24T00:00:00."
},
"to_datetime": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d$",
"description": "End of the period in UTC, yyyy-mm-ddThh:mm:ss, e.g. 2030-12-24T23:59:59."
},
"cursor": {
"description": "Cursor of the last subscription of the previous page.",
"type": "string",
"minLength": 1,
"maxLength": 500
}
},
"required": [
"from_datetime",
"to_datetime"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sealsubscriptions_get_subscription(subscription_id)
One subscription with everything Seal knows: customer, shipping and billing address, status, intervals, delivery method, items with discounts, billing attempts (with status and error messages), fulfillment orders, invoices, tags and the activity log. Private customer links are removed. GET /subscription?id=.
入力スキーマ
{
"type": "object",
"properties": {
"subscription_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The subscription's `id` (not its `internal_id`)."
}
},
"required": [
"subscription_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sealsubscriptions_list_subscription_rules(page)
List the subscription rules (plans) of the shop: name, payment type, the products and variants they apply to and their selling plans. GET /subscription-rules.
入力スキーマ
{
"type": "object",
"properties": {
"page": {
"description": "Page number, from 1 (default 1); 50 per page. Pass the previous reply's next_page.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 100000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sealsubscriptions_get_subscription_rule(rule_id)
One subscription rule by id, with its products, variants and selling plans. GET /subscription-rule?id=.
入力スキーマ
{
"type": "object",
"properties": {
"rule_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Subscription rule id (from sealsubscriptions_list_subscription_rules)."
}
},
"required": [
"rule_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢sealsubscriptions_list_webhooks
List the webhooks registered for this shop through the API (topic and address). GET /webhooks.
入力スキーマ
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴sealsubscriptions_pause_subscription(subscription_id)
WRITE: Pause an active subscription: no further charges or shipments until it is resumed. Undo with sealsubscriptions_resume_subscription. PUT /subscription action=pause.
入力スキーマ
{
"type": "object",
"properties": {
"subscription_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The subscription's `id` (not its `internal_id`)."
}
},
"required": [
"subscription_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴sealsubscriptions_resume_subscription(subscription_id)
WRITE: Resume a paused subscription so charges and shipments continue on the schedule. PUT /subscription action=resume.
入力スキーマ
{
"type": "object",
"properties": {
"subscription_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The subscription's `id` (not its `internal_id`)."
}
},
"required": [
"subscription_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴sealsubscriptions_reactivate_subscription(subscription_id)
WRITE: Reactivate a cancelled subscription (the effect is the same as resume; use this for cancelled ones). Charges restart on the schedule, so the customer may be billed. PUT /subscription action=reactivate.
入力スキーマ
{
"type": "object",
"properties": {
"subscription_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The subscription's `id` (not its `internal_id`)."
}
},
"required": [
"subscription_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴sealsubscriptions_cancel_customer_subscription(subscription_id)
WRITE: Cancel a subscription now: all future charges and shipments stop and the customer may get Seal's cancellation email. It can be brought back with sealsubscriptions_reactivate_subscription. For a later cancellation use sealsubscriptions_schedule_cancellation. PUT /subscription action=cancel.
入力スキーマ
{
"type": "object",
"properties": {
"subscription_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The subscription's `id` (not its `internal_id`)."
}
},
"required": [
"subscription_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴sealsubscriptions_schedule_cancellation(subscription_id, date, time, timezone)
WRITE: Schedule the cancellation of a subscription for a future date and time (it stays active until then). PUT /subscription-schedule-cancellation.
入力スキーマ
{
"type": "object",
"properties": {
"subscription_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The subscription's `id` (not its `internal_id`)."
},
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Cancellation date, yyyy-mm-dd."
},
"time": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
"description": "Cancellation time, hh:mm (24-hour), in the given timezone."
},
"timezone": {
"type": "string",
"pattern": "^[+-]([01]\\d|2[0-3]):[0-5]\\d$",
"description": "UTC offset of the date and time, e.g. +00:00 or -04:00."
}
},
"required": [
"subscription_id",
"date",
"time",
"timezone"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴sealsubscriptions_add_items(subscription_id, items)
WRITE: Add products to a subscription. Prices are in the subscription's currency and change what the customer pays on the next charge. An item with one_time=true is removed after the next renewal. PUT /subscription action=add_items.
入力スキーマ
{
"type": "object",
"properties": {
"subscription_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The subscription's `id` (not its `internal_id`)."
},
"items": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"product_id": {
"description": "Shopify product id.",
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,20}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
]
},
"variant_id": {
"description": "Shopify variant id.",
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,20}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
]
},
"quantity": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 10000
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 500,
"description": "Product and variant title."
},
"price": {
"type": "number",
"minimum": 0,
"description": "Unit price in the subscription's currency."
},
"sku": {
"type": "string",
"maxLength": 200
},
"taxable": {
"description": "Default true.",
"type": "boolean"
},
"requires_shipping": {
"description": "Default true.",
"type": "boolean"
},
"one_time": {
"description": "Remove the item after the next renewal (default false).",
"type": "boolean"
},
"properties": {
"description": "Line item properties as { key, value } pairs.",
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"value": {
"type": "string",
"maxLength": 2000
}
},
"required": [
"key",
"value"
]
}
}
},
"required": [
"product_id",
"variant_id",
"quantity",
"title",
"price"
]
}
}
},
"required": [
"subscription_id",
"items"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴sealsubscriptions_edit_items(subscription_id, items)
WRITE: Change existing items of a subscription: variant, quantity (> 0), price (>= 0), SKU, one-time flag, properties. Changes what the customer pays on the next charge. PUT /subscription action=edit_items.
入力スキーマ
{
"type": "object",
"properties": {
"subscription_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The subscription's `id` (not its `internal_id`)."
},
"items": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Subscription item id (items[].id from sealsubscriptions_get_subscription)."
},
"variant_id": {
"description": "Switch the item to this Shopify variant id.",
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,20}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
]
},
"quantity": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 10000
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"price": {
"description": "Unit price in the subscription's currency.",
"type": "number",
"minimum": 0
},
"sku": {
"type": "string",
"maxLength": 200
},
"one_time": {
"description": "Remove the item after the next renewal.",
"type": "boolean"
},
"properties": {
"description": "Line item properties as { key, value } pairs.",
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"value": {
"type": "string",
"maxLength": 2000
}
},
"required": [
"key",
"value"
]
}
}
},
"required": [
"id"
]
}
}
},
"required": [
"subscription_id",
"items"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴sealsubscriptions_remove_items(subscription_id, item_ids)
WRITE: Remove items from a subscription by item id. The customer stops receiving and paying for them. PUT /subscription action=remove_items.
入力スキーマ
{
"type": "object",
"properties": {
"subscription_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The subscription's `id` (not its `internal_id`)."
},
"item_ids": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Subscription item id (items[].id from sealsubscriptions_get_subscription)."
}
}
},
"required": [
"subscription_id",
"item_ids"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴sealsubscriptions_edit_subscription(subscription_id, delivery_interval, billing_interval, automatically_update_product_prices, billing_min_cycles, ...)
WRITE: Edit a subscription's schedule and details: delivery and billing interval (a billing interval longer than the delivery interval makes it prepaid), min/max number of payments, note attributes (an empty list removes them), delivery method and price, and the shipping address. Only the fields you pass change. To change items use the item tools. PUT /subscription action=edit.
入力スキーマ
{
"type": "object",
"properties": {
"subscription_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The subscription's `id` (not its `internal_id`)."
},
"delivery_interval": {
"description": "Delivery interval, e.g. \"4 week\" or \"1 month\".",
"type": "string",
"minLength": 3,
"maxLength": 30
},
"billing_interval": {
"description": "Billing interval, e.g. \"8 week\". Longer than delivery_interval = prepaid.",
"type": "string",
"minLength": 3,
"maxLength": 30
},
"automatically_update_product_prices": {
"description": "When switching between prepaid and not prepaid, reprice the items.",
"type": "boolean"
},
"billing_min_cycles": {
"description": "Minimum number of payments.",
"type": "integer",
"minimum": 0,
"maximum": 1000
},
"billing_max_cycles": {
"description": "Maximum number of payments (0 = unlimited).",
"type": "integer",
"minimum": 0,
"maximum": 1000
},
"note_attributes": {
"description": "Replaces all note attributes.",
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"value": {
"type": "string",
"maxLength": 2000
}
},
"required": [
"name",
"value"
]
}
},
"delivery_method_title": {
"type": "string",
"maxLength": 200
},
"delivery_method_presentment_title": {
"type": "string",
"maxLength": 200
},
"delivery_price": {
"type": "number",
"minimum": 0
},
"delivery_method_code": {
"type": "string",
"maxLength": 200
},
"s_first_name": {
"type": "string",
"maxLength": 200
},
"s_last_name": {
"type": "string",
"maxLength": 200
},
"s_company": {
"type": "string",
"maxLength": 200
},
"s_address1": {
"type": "string",
"maxLength": 300
},
"s_address2": {
"type": "string",
"maxLength": 300
},
"s_zip": {
"type": "string",
"maxLength": 40
},
"s_city": {
"type": "string",
"maxLength": 200
},
"s_province": {
"type": "string",
"maxLength": 200
},
"s_province_code": {
"type": "string",
"maxLength": 20
},
"s_country": {
"type": "string",
"maxLength": 200
},
"s_country_code": {
"type": "string",
"maxLength": 10
},
"s_phone": {
"type": "string",
"maxLength": 60
}
},
"required": [
"subscription_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴sealsubscriptions_reschedule_billing_attempt(subscription_id, billing_attempt_id, date, time, timezone, ...)
WRITE: Move a billing attempt that has not been processed yet to another date and time. With reset_schedule=true the later attempts are rebuilt from the new date. PUT /subscription-billing-attempt action=reschedule.
入力スキーマ
{
"type": "object",
"properties": {
"subscription_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The subscription's `id` (not its `internal_id`)."
},
"billing_attempt_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Billing attempt id (billing_attempts[].id from sealsubscriptions_get_subscription)."
},
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "New date, yyyy-mm-dd."
},
"time": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
"description": "New time, hh:mm (24-hour), in the given timezone."
},
"timezone": {
"type": "string",
"pattern": "^[+-]([01]\\d|2[0-3]):[0-5]\\d$",
"description": "UTC offset of the date and time, e.g. +00:00 or -04:00."
},
"reset_schedule": {
"description": "Rebuild the rest of the schedule after this attempt (default false).",
"type": "boolean"
}
},
"required": [
"subscription_id",
"billing_attempt_id",
"date",
"time",
"timezone"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴sealsubscriptions_skip_billing_attempt(subscription_id, billing_attempt_id)
WRITE: Skip one upcoming billing attempt so the customer is not charged for that cycle. Undo with sealsubscriptions_unskip_billing_attempt. PUT /subscription-billing-attempt action=skip.
入力スキーマ
{
"type": "object",
"properties": {
"subscription_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The subscription's `id` (not its `internal_id`)."
},
"billing_attempt_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Billing attempt id (billing_attempts[].id from sealsubscriptions_get_subscription)."
}
},
"required": [
"subscription_id",
"billing_attempt_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴sealsubscriptions_unskip_billing_attempt(subscription_id, billing_attempt_id)
WRITE: Bring back a skipped billing attempt, so it is charged on its date again. PUT /subscription-billing-attempt action=unskip.
入力スキーマ
{
"type": "object",
"properties": {
"subscription_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The subscription's `id` (not its `internal_id`)."
},
"billing_attempt_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Billing attempt id (billing_attempts[].id from sealsubscriptions_get_subscription)."
}
},
"required": [
"subscription_id",
"billing_attempt_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴sealsubscriptions_delete_billing_attempt(subscription_id, billing_attempt_id)
WRITE: Delete a billing attempt that has not been processed. Seal keeps 65 days of attempts scheduled, so a deleted one is recreated within hours unless the schedule is moved first (see sealsubscriptions_reschedule_billing_attempt). DELETE /subscription-billing-attempt.
入力スキーマ
{
"type": "object",
"properties": {
"subscription_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The subscription's `id` (not its `internal_id`)."
},
"billing_attempt_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Billing attempt id (billing_attempts[].id from sealsubscriptions_get_subscription)."
}
},
"required": [
"subscription_id",
"billing_attempt_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴sealsubscriptions_reschedule_fulfillment_order(subscription_id, fulfillment_order_id, date, time, timezone)
WRITE: Move a fulfillment order of a prepaid subscription to another date and time. PUT /subscription-fulfillment-order action=reschedule.
入力スキーマ
{
"type": "object",
"properties": {
"subscription_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The subscription's `id` (not its `internal_id`)."
},
"fulfillment_order_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Fulfillment order id (fulfillment_orders[].id from sealsubscriptions_get_subscription)."
},
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "New date, yyyy-mm-dd."
},
"time": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
"description": "New time, hh:mm (24-hour), in the given timezone."
},
"timezone": {
"type": "string",
"pattern": "^[+-]([01]\\d|2[0-3]):[0-5]\\d$",
"description": "UTC offset of the date and time, e.g. +00:00 or -04:00."
}
},
"required": [
"subscription_id",
"fulfillment_order_id",
"date",
"time",
"timezone"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴sealsubscriptions_create_charge_now(subscription_id, reset_schedule)
WRITE: CHARGES THE CUSTOMER'S PAYMENT METHOD IMMEDIATELY for the next billing attempt of the subscription and creates a Shopify order; it does not wait for the scheduled date. Only call it when the user clearly asked for an immediate charge. With reset_schedule=true the later attempts are rebuilt from today. PUT /subscription-create-charge-now.
入力スキーマ
{
"type": "object",
"properties": {
"subscription_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The subscription's `id` (not its `internal_id`)."
},
"reset_schedule": {
"description": "Rebuild the rest of the schedule after this charge (default false).",
"type": "boolean"
}
},
"required": [
"subscription_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴sealsubscriptions_process_charge(subscription_id, billing_attempt_id)
WRITE: CHARGES THE CUSTOMER'S PAYMENT METHOD NOW for one specific billing attempt (for example a failed or upcoming one) and creates a Shopify order. Only call it when the user clearly asked for that charge. PUT /subscription-process-charge.
入力スキーマ
{
"type": "object",
"properties": {
"subscription_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The subscription's `id` (not its `internal_id`)."
},
"billing_attempt_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Billing attempt id (billing_attempts[].id from sealsubscriptions_get_subscription)."
}
},
"required": [
"subscription_id",
"billing_attempt_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴sealsubscriptions_apply_discount_code(subscription_id, discount_code)
WRITE: Apply a Shopify discount code to an auto-charging subscription (not to recurring-invoice subscriptions); it lowers what the customer pays on the next charges. PUT /subscription-discount-code action=apply.
入力スキーマ
{
"type": "object",
"properties": {
"subscription_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The subscription's `id` (not its `internal_id`)."
},
"discount_code": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "The discount code as the customer would type it."
}
},
"required": [
"subscription_id",
"discount_code"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴sealsubscriptions_remove_discount_code(subscription_id, discount_code_id)
WRITE: Remove a discount code from a subscription. Use the discount code id from the subscription's items[].discount_codes[].id (a uuid), not the code text. DELETE /subscription-discount-code.
入力スキーマ
{
"type": "object",
"properties": {
"subscription_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The subscription's `id` (not its `internal_id`)."
},
"discount_code_id": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "Discount code id (a uuid) from sealsubscriptions_get_subscription → items[].discount_codes[].id."
}
},
"required": [
"subscription_id",
"discount_code_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴sealsubscriptions_send_payment_method_update_email(subscription_id)
WRITE: SENDS AN EMAIL TO THE CUSTOMER of the subscription with a link to update their payment method (for example after failed charges). Only call it when the user clearly asked to contact the customer. PUT /subscription action=send_payment_method_update_email.
入力スキーマ
{
"type": "object",
"properties": {
"subscription_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The subscription's `id` (not its `internal_id`)."
}
},
"required": [
"subscription_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴sealsubscriptions_edit_subscription_rule(rule_id, name, options, product_variants)
WRITE: Edit a subscription rule: its name, the plan selector label (`options`, e.g. "Deliver every") and the products it applies to. product_variants REPLACES all products and variants linked to the rule: to add some without removing the others use sealsubscriptions_append_rule_product_variants. PUT /subscription-rule.
入力スキーマ
{
"type": "object",
"properties": {
"rule_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Subscription rule id."
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"options": {
"description": "Label for the plan selector, e.g. \"Deliver every\".",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"product_variants": {
"description": "The complete new list of products/variants (replaces the current list; an empty list unlinks every product).",
"maxItems": 500,
"type": "array",
"items": {
"type": "object",
"properties": {
"product_id": {
"description": "Shopify product id.",
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,20}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
]
},
"variant_id": {
"anyOf": [
{
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,20}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
]
},
{
"type": "null"
}
],
"description": "Shopify variant id, or null for all variants of the product."
}
},
"required": [
"product_id",
"variant_id"
]
}
}
},
"required": [
"rule_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴sealsubscriptions_append_rule_product_variants(rule_id, product_variants)
WRITE: Add products or variants to a subscription rule without touching the ones already linked. PUT /subscription-rule/append-product-variants.
入力スキーマ
{
"type": "object",
"properties": {
"rule_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Subscription rule id."
},
"product_variants": {
"minItems": 1,
"maxItems": 500,
"type": "array",
"items": {
"type": "object",
"properties": {
"product_id": {
"description": "Shopify product id.",
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,20}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
]
},
"variant_id": {
"anyOf": [
{
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,20}$"
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
]
},
{
"type": "null"
}
],
"description": "Shopify variant id, or null for all variants of the product."
}
},
"required": [
"product_id",
"variant_id"
]
},
"description": "Products/variants to add."
}
},
"required": [
"rule_id",
"product_variants"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}コミュニティ
エビデンス