Intent
Create a rental intent for a variant, including any add-ons, through the Storefront API
global_id, which is what you pass to this endpoint.
global_id per option:
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.
Shipping destination
On stores using the new shipping settings, send the destination you sent to the Availability log as alogistics object, so the booked dates match the availability the customer saw.
Add-ons
add_ons are extra variants to submit in the same /cart/add request as the cycle, in the format of Shopify’s Cart AJAX API. Include every add-on property except cart_quantity as items[n][property]:
cart_quantity. If you leave off parent_id, the add-on isn’t nested under the cycle.
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.
Submit parent_id from the response. It’s the Shopify variant ID of the cycle. Shopify nests the add-on under that cart line and removes the add-on with the line. Deposits and card authorizations omit parent_id and stay separate lines.
Shopify POS adds the add-on as its own line. Draft orders can’t nest a line, so the add-on stays separate there too.
Send the cycle and the add-on in the same request, as the product form does. A later request is rejected with Cannot reference existing parent lines by variant_id, and the add-on isn’t added.
properties[For] is the cycle product’s title, stored as a line item property on the add-on.
When the same product is rented twice with the same add-on, each cycle gets its own add-on line.
key. Remove by line to remove one of them. Removing by key removes both.Path Parameters
The Shopify proxy path prefix configured for the app (e.g., 'customer_portal')
Body
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 to add in the same cart request as the cycle. Product add-ons include parent_id and nest under the cycle line. Deposits and card authorizations omit parent_id and stay separate lines.
Number of available inventory items for the variant within the requested schedule