Create an intent for a rental option.
global_id that is passed to this endpoint.
| Metafield | Method |
|---|---|
product.metafields.supercycle.calendar_configuration | Calendar |
product.metafields.supercycle.subscription_configuration | Subscription |
product.metafields.supercycle.membership_configuration | Membership |
product.metafields.supercycle.resale_configuration | Resale |
global_id for each option:
global_id, call this endpoint to get the attributes that need to be attached to the line item so Supercycle processes it as a Cycle.
The response attributes object contains key-value pairs that must be included when submitting the add-to-cart form. Each entry should be added as a hidden input on the product form, or included in the request body when submitting via AJAX. See Cycle line item property and Validations line item property for the full schema.
Hidden inputs:
add_ons are additional variants that must be submitted in the same request using Shopify’s multiple items cart API format. Each add-on property (except cart_quantity) should be included as items[n][property]:
cart_quantity is not submitted — it is the maximum total quantity of that variant that should be present in the cart. Before adding the add-on, check the current cart to see if the variant is already there and skip if the quantity would exceed cart_quantity.The Shopify proxy path prefix configured for the app (e.g., 'customer_portal')
Successful response with intent attributes and add-ons
Key-value pairs to be submitted with the Shopify add-to-cart form. Includes line item properties (keys prefixed with properties[...]) and a selling_plan ID where applicable.
Additional variants that must be added to the cart as separate line items (e.g. deposits, card authorisations)
Number of available inventory items for the variant within the requested schedule