Update Link
PATCH /v1/link/abc123 HTTP/1.1
Host: api.checkoutlinks.com
Authorization: Bearer <TOKEN>
X-Shopify-Shop: yourshop.myshopify.com
Content-Type: application/json
{
"name": "Updated Sale Link",
"type": "regular",
"status": "active",
"slug": "updated-sale",
"cart": {
"line_items": [
{ "variant_id": "123456789", "quantity": 2, "selling_plan_id": "sp_456" }
],
"attributes": [
{ "key": "utm_source", "value": "newsletter" },
{ "key": "utm_campaign", "value": "holidays" }
]
},
"discounts": {
"free_gifts": [],
"order_discount": { "value": 10 },
"free_shipping": true,
"discount_codes": ["SAVE10"]
},
"eligibility": {
"schedule": null,
"usage_limit": "none",
"passcode": null
},
"scripts": "<script>console.log('hello')</script>"
}
The unique handle (shortcode) of the checkout link to update.
New name for the checkout link.
Type of link. Possible values: regular
, dynamic
, reorder
, abandonment
.
Status of the link (“active” or “draft”).
Cart configuration. Required if type is regular
.
Array of line items. Each item includes. Required if type is regular
:
cart.line_items[].variant_id
Product variant ID.
cart.line_items[].quantity
Quantity of the variant.
cart.line_items[].selling_plan_id
Selling plan ID (optional).
Array of custom cart attributes (key/value pairs), e.g., UTM tags for tracking.
Attribute key (e.g., “utm_source”).
Attribute value (e.g., “newsletter”).
Array of free gift items.
discounts.order_discount.value
Discount value.
Whether free shipping is applied.
Schedule for link eligibility.
Usage limit for the link (e.g., “none”, “once”).
Passcode required to use the link.
Custom scripts to inject.
Checkout Links access token. Format: Bearer <token>
Shop domain (e.g., yourshop.myshopify.com
).
{
"status": "success",
"message": "Link updated successfully",
"data": {
"shortcode": "abc123",
"slug": "abc123",
"name": "Updated Sale Link",
"status": "active",
"type": "regular",
"url": "https://yourshop.com/abc123"
}
}