Endpoints
Intent
Create a rental intent for a variant, including any add-ons, through the Storefront API
POST
Returns the form attributes that turn a line item into a cycle when it’s added to the cart.
Each method (calendar, subscription, membership, and resale) stores its options in a product metafield. Every option has a
With the variant ID and the option’s
global_id, which is what you pass to this endpoint.
The options array in each metafield carries a
global_id per option:
Calendar configuration
global_id, call this endpoint to get the attributes to attach to the line item so Supercycle processes it as a cycle.
The response attributes object is a set of key-value pairs to include when you submit the add-to-cart form. Add each one as a hidden input on the product form, or set it on the request body when you submit with AJAX. See Cycle line item property and Validations line item property for the full schema.
Hidden inputs
AJAX with fetch
Add-ons
add_ons are extra variants to submit in the same request, in the format of Shopify’s multiple items cart API. Include every add-on property except cart_quantity as items[n][property]:
Add-ons in the cart request
cart_quantity isn’t submitted. It’s the maximum total quantity of that variant that should be in the cart. Before you add the add-on, check the current cart and skip it if the quantity would exceed cart_quantity.Path Parameters
The Shopify proxy path prefix configured for the app (e.g., 'customer_portal')
Body
application/json
Response
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