awtomic_list_subscriptions
List shop subscriptions
List the shop's subscription contracts (id, status, next billing date and more), 100 per page by default. Use reverse to read the newest first. Pass next_cursor back as cursor for the next page. GET /subscriptions.
輸入參數limitcursorreverse
awtomic_get_subscription
Get subscription
One subscription contract with its lines (products, quantities, prices). Needs the customer id and the subscription id. GET /customers/{customerId}/subscriptions/{subscriptionId}.
輸入參數customer_id必填subscription_id必填
awtomic_list_customer_subscriptions
List a customer's subscriptions
List one customer's subscriptions (id, status, next billing date). Set expand_lines to include each subscription's lines; that makes the reply much larger. GET /customers/{customerId}/subscriptions.
輸入參數limitcursorcustomer_id必填expand_lines
awtomic_list_billing_attempts
List billing attempts
A subscription's billing attempts: status (SUCCESS or FAILURE), error code and message, amount, currency and dates. Use it to see why a renewal failed. GET /customers/{customerId}/subscriptions/{subscriptionId}/billing-attempts.
輸入參數limitcursorreversecustomer_id必填subscription_id必填
awtomic_get_successful_billing_count
Get successful billing count
How many billing attempts of a subscription succeeded, including those made before a migration from another subscription app. GET /subscriptions/{subscriptionId}/total-successful-billing-count.
輸入參數subscription_id必填
awtomic_get_origin_order
Get subscription origin order
The Shopify order that started a subscription (id, name, creation date). GET /customers/{customerId}/subscriptions/{subscriptionId}/origin-order.
輸入參數customer_id必填subscription_id必填
awtomic_get_origin_order_fulfillments
Get origin order fulfillments
Fulfillment status and the fulfillment orders (status, fulfill-at date) of a subscription's origin order. GET /customers/{customerId}/subscriptions/{subscriptionId}/origin-order/fulfillments.
輸入參數customer_id必填subscription_id必填
awtomic_get_customer
Get customer
A customer: name, email, phone, orders count, amount spent, customer-since date, Awtomic overrides and the ids of their subscription contracts. GET /customers/{customerId}.
輸入參數customer_id必填
awtomic_get_customer_addresses
Get customer addresses
A customer's saved addresses and which one is the default. GET /customers/{customerId}/address.
輸入參數customer_id必填
awtomic_get_customer_payment_methods
Get customer payment methods
A customer's payment methods on file: type (card, Shop Pay, PayPal), card brand, last digits, expiry and whether it was revoked. Never the full card number. Use it to spot expired cards before a renewal. GET /customers/{customerId}/payment-methods.
輸入參數customer_id必填
awtomic_list_selling_plan_groups
List selling plan groups
The shop's selling plan groups (subscription plans): name, summary, options, position and whether it is a prepaid plan. Use the ids with awtomic_get_selling_plan_group. GET /shops/selling-plan-groups.
無需輸入參數。
awtomic_get_selling_plan_group
Get selling plan group
One selling plan group with its selling plans (name, prepaid orders, gift support) and the products it applies to. GET /shops/selling-plan-groups/{sellingPlanGroupId}.
輸入參數selling_plan_group_id必填
awtomic_pause_subscription
Pause subscription
WRITE: pause a subscription so it is not billed or shipped until it is reactivated (awtomic_reactivate_subscription). A subscription in dunning is taken out of dunning. Awtomic runs the shop's own automations for this event, so the customer may get an email or SMS and webhooks may fire. Awtomic pauses it on its side even if Shopify rejects the pause. POST /customers/{customerId}/subscriptions/{subscriptionId}/pause.
輸入參數customer_id必填subscription_id必填
awtomic_reactivate_subscription
Reactivate subscription
WRITE: reactivate a paused or cancelled subscription, so billing resumes. A cancelled prepaid subscription cannot be reactivated. Without next_billing_date Awtomic works it out from the subscription's interval; the customer is charged on that date. Awtomic runs the shop's own automations for this event, so the customer may get an email or SMS and webhooks may fire. POST /customers/{customerId}/subscriptions/{subscriptionId}/reactivate.
輸入參數customer_id必填subscription_id必填next_billing_date
awtomic_skip_next_order
Skip next order
WRITE: skip a subscription's next order. The subscription must be active; Awtomic moves the next billing date by one interval (each call skips one more order, so do not repeat it). The reply has skipEventId: pass it to awtomic_undo_skip to undo. Awtomic runs the shop's own automations for this event, so the customer may get an email or SMS and webhooks may fire. POST /customers/{customerId}/subscriptions/{subscriptionId}/skip.
輸入參數customer_id必填subscription_id必填
awtomic_undo_skip
Undo skip
WRITE: undo a skipped order, restoring the billing date from before the skip. Needs the skipEventId returned by awtomic_skip_next_order; Awtomic refuses (409) when the skip can no longer be undone. POST /customers/{customerId}/subscriptions/{subscriptionId}/next-billing-date with eventType UNDO_SKIP.
輸入參數customer_id必填skip_event_id必填subscription_id必填
awtomic_set_next_billing_date
Set next billing date
WRITE: change when a subscription is next billed. The date must be later than the end of today. A paused subscription is reactivated by this call, and one in dunning is taken out of dunning. The customer is charged on the new date. POST /customers/{customerId}/subscriptions/{subscriptionId}/next-billing-date.
輸入參數customer_id必填subscription_id必填next_billing_date必填
awtomic_update_frequency
Update subscription frequency
WRITE: change how often a subscription is billed and delivered, for example every 2 WEEK or every 1 MONTH. Changes every future order of that subscription. POST /customers/{customerId}/subscriptions/{subscriptionId}/frequency.
輸入參數interval必填customer_id必填interval_count必填subscription_id必填
awtomic_cancel_customer_subscription
Cancel a customer's subscription
WRITE: cancel one shopper's subscription contract in Awtomic. Billing and shipping stop; a cancelled non-prepaid subscription can be brought back with awtomic_reactivate_subscription. This cancels the shop's customer subscription, not your usefulapi plan. Awtomic runs the shop's own automations for this event, so the customer may get an email or SMS and webhooks may fire. Awtomic cancels it on its side even if Shopify rejects the cancel. Only use it when the user explicitly asks to cancel this subscription, and confirm_cancel must be true. A cancelled prepaid subscription cannot be reactivated. POST /customers/{customerId}/subscriptions/{subscriptionId}/cancel.
輸入參數reasondetailscustomer_id必填confirm_cancel必填subscription_id必填
awtomic_order_now
Charge and order now
WRITE: bill the customer's saved payment method and create the subscription's next order immediately, instead of waiting for the billing date. THIS CHARGES THE CUSTOMER. Awtomic refuses (409 ORDER_RECENTLY_PLACED) if the latest billing attempt is pending or succeeded under 10 minutes ago. Set manual_retry only to retry a failed billing attempt. Only use it when the user explicitly asks to place this order now, and confirm_charge must be true. Awtomic runs the shop's own automations for this event, so the customer may get an email or SMS and webhooks may fire. POST /customers/{customerId}/subscriptions/{subscriptionId}/order-now.
輸入參數customer_id必填manual_retryconfirm_charge必填subscription_id必填
awtomic_send_payment_update_email
Email customer to update payment method
WRITE: make Shopify email the customer a link to update their payment method for this subscription. This SENDS AN EMAIL TO THE CUSTOMER each time it is called. Use it for failed payments or expired cards, only when the user asks, and confirm_send must be true. POST /customers/{customerId}/subscriptions/{subscriptionId}/send-customer-payment-email.
輸入參數customer_id必填confirm_send必填subscription_id必填