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>"
}
{
  "status": "success",
  "message": "Link updated successfully",
  "data": {
    "shortcode": "abc123",
    "slug": "abc123",
    "name": "Updated Sale Link",
    "status": "active",
    "type": "regular",
    "url": "https://yourshop.com/abc123"
  }
}

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>"
}
handle
string
required
The unique handle (shortcode) of the checkout link to update.
name
string
New name for the checkout link.
type
string
Type of link. Possible values: regular, dynamic, reorder, abandonment.
status
string
Status of the link (“active” or “draft”).
slug
string
URL slug for the link.
cart
object
Cart configuration. Required if type is regular.
cart.line_items
array
Array of line items. Each item includes. Required if type is regular:
cart.line_items[].variant_id
string
Product variant ID.
cart.line_items[].quantity
integer
Quantity of the variant.
cart.line_items[].selling_plan_id
string
Selling plan ID (optional).
cart.attributes
array
Array of custom cart attributes (key/value pairs), e.g., UTM tags for tracking.
cart.attributes[].key
string
Attribute key (e.g., “utm_source”).
cart.attributes[].value
string
Attribute value (e.g., “newsletter”).
discounts
object
Discounts to apply.
discounts.free_gifts
array
Array of free gift items.
discounts.order_discount
object
Order discount object.
discounts.order_discount.value
integer
Discount value.
discounts.free_shipping
boolean
Whether free shipping is applied.
discounts.discount_codes
array
Array of discount codes.
eligibility
object
Eligibility rules.
eligibility.schedule
object
Schedule for link eligibility.
eligibility.usage_limit
string
Usage limit for the link (e.g., “none”, “once”).
eligibility.passcode
integer
Passcode required to use the link.
scripts
string
Custom scripts to inject.
Authorization
string
required
Checkout Links access token. Format: Bearer <token>
X-Shopify-Shop
string
required
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"
  }
}