get https://api.loopsubscriptions.com/api/external/v1/subscription-contracts/read-by-shopify-id
Fetch all important details of a specific subscription using Shopify ID. Rate limit: 10/ sec
Subscription Object Fields
Field | Description |
---|---|
subscription_shopify_id | Shopify id of the subscription contract. |
customer_shopify_id | Shopify id of the customer associated with the subscription. |
customer | Customer object with details such as "customer_shopify_id", "first_name", "last_name", "email". |
created_at | Date time when the subscription was created. |
updated_at | Date time when the subscription was updated. |
total_line_item_price | Total price of all the subscription line items not including taxes & discounts. |
total_line_item_discounted_price | Total price of all the subscription line items including discounts. |
delivery_price | Shipping charges associated with the delivery. |
currency_code | Currency code for all the prices. |
status | Status of the subscription as on Shopify. |
billing_attempt_success_count | Number of successful billing attempts or in other words the total number of orders created for a subscription including the first order. |
paused_at | Date time when the subscription was paused. |
cancelled_at | Date time when the subscription was cancelled. |
cancellation_reason | Reason selected by the customer for cancelling subscription. |
cancellation_comment | Remarks provided by the customer for cancelling subscription. |
is_prepaid | Boolean value specifying if the subscription is prepaid or not. |
next_billing_date | Date time of the next upcoming charge for the subscription. |
charge_offset_days | Useful for scheduling orders based on delivery dates. Delivery date = next_billing_date + charge_offset_days. |
billing_interval | Billing interval type (DAY, WEEK, MONTH, YEAR). |
billing_interval_count | Billing interval value. |
billing_min_cycles | Number of minimum payments before which the subscription cannot be cancelled. Initial order is counted towards the limit. |
billing_max_cycles | Number of maximum billings after which the subscription will auto-expire. Initial order is counted towards the limit. |
billing_anchor_type | Anchor type (WEEK, MONTH, YEAR) |
billing_anchor_day | Anchor day value (1-7 for WEEK, 1-31 for MONTH & YEAR anchor type). |
billing_anchor_month | Anchor month value (1-12 for YEAR anchor type). |
delivery_interval | Delivery interval type (DAY, WEEK, MONTH, YEAR). |
delivery_interval_count | Delivery interval value. |
line_items | Line item object having fields related to products added in subscription. Described in the table below. |
shipping_address | Shipping address object having fields like "first_name", "last_name", "phone", "company", "address1", "address2", "city", "zip", "country", "province", "province_code", "country_code" |
note | Note or special instructions which are stored on subscription and passed on for every recurring order placed on the subscription. |
custom_attributes | Appears in the Additional details section of an order details page. Each array entry must contain a hash with name and value keys. |
will_auto_resume | Boolean value specifying if a paused subscription will auto-resume or not after the paused duration is over. |
shipping_lines_title | Shipping method title. |
shipping_lines_code | Shipping method code which is used by 3rd party fulfillment apps to map the courier services. |
has_custom_plan | Boolean value specifying if the subscription is offering a custom frequency which is not part of the standard subscription plans. |
has_bundle | Boolean value specifying if the subscription has bundle items. |
Line Items Object Fields
Field | Description |
---|---|
line_shopify_id | Shopify id for the line. |
product_shopify_id | Shopify id for the product associated with the line. |
variant_shopify_id | Shopify id for the variant associated with the line. |
product_title | Title of the product associated with the line. |
variant_title | Title of the variant associated with the line. |
name | Name of the line combining product_title and variant_title |
variant_image | URL for the image associated with the product. |
requires_shipping | Specifies whether the product requires shipping or not. |
taxable | Specifies whether the product is taxable or not. |
currency_code | Currency code associated with the prices on the line. |
price | Subscription price for the product variant associated with the line. |
base_price | Base price for the product variant associated with the line. Subscription discounts are applied on this price. |
discounted_price | Final discounted price for the product variant charged to the customer after applying discounts. |
discount_allocations | Discount allocations on the line. It doesn't include discounts applied as part of subscription. |
quantity | Quantity for the product variant associated with the line. |
pricing_policy | Pricing policy for the product variant associated with the line. It includes the subscription discount info. |
selling_plan_id | Shopify subscription plan id through which the line was created. |
selling_plan_name | Name of the subscription plan associated with the line. |
sku | SKU associated with the product of the line. |
is_one_time_added | Specifies whether the product is added only for the upcoming order or not. |
is_one_time_removed | Specifies whether the product is removed only for the upcoming order or not. |
bundle_transaction_id | Unique ID to identify and group the bundle items together |
bundle_name | Name of the bundle the line item belongs to |
created_at | Date time when the line item was created. |
updated_at | Date time when the line item was updated. |
These docs are for a deprecated API version. Visit here to refer the latest API docs.