Skip to main content

Update Custom-price Link

Change a link's limits. Send only the keys to change — omitted keys keep their value, and null removes that limit.

Raising the cap on a used_up link, or moving the expiry of an expired link into the future, makes it sell again. See Limits.

Only max_purchases and expires_at can change. amount, variant_id, and is_net are fixed at create — for a different price, create a new link. An archived link cannot be updated.

Request​

PATCH /custom-price-links/{id}

Path Parameters​

ParameterTypeRequiredDescription
idstringYesCustom-price link UUID.

Request Body​

All fields optional.

ParameterTypeRequiredDescription
max_purchasesintegerNoNew purchase cap, 1–1,000,000. null removes the cap.
expires_atstringNoNew expiry. RFC 3339 with an offset, in the future. null removes the expiry.

Example Request​

Raise the cap on a used_up link from 5 to 10:

curl -X PATCH "https://cart.easy.tools/api/v1/custom-price-links/a81e5d20-6c37-4f9b-9e12-5b4d8f2c7a90" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"max_purchases": 10
}'

Send {"expires_at": null} to remove an expiry, or {"max_purchases": null} to remove the cap.

Response​

Success Response (200)​

The link is back to active:

{
"id": "a81e5d20-6c37-4f9b-9e12-5b4d8f2c7a90",
"product_id": "0632bef5-c308-42cd-9cba-89a7a4f722bb",
"variant_id": null,
"amount": 999,
"currency": "usd",
"is_net": false,
"max_purchases": 10,
"purchases_count": 5,
"expires_at": null,
"archived_at": null,
"status": "active",
"checkout_url": "https://cart.easy.tools/checkout/mystore/premium-coffee?_sig=amount%2Cprice_link&amount=999&price_link=a81e5d20-6c37-4f9b-9e12-5b4d8f2c7a90&signature=9e2d4c6b8a0f1e3d5c7b9a2e4f6d8c0b1a3e5f7d9c2b4a6e8f0d1c3b5a7e9f2d",
"created_at": "2026-11-02T10:04:12+01:00"
}

See Custom-price Link Object.

Error Responses​

Bad Request (400)​

{
"message": "Invalid custom-price link ID"
}

Not Found Error (404)​

{
"message": "Custom-price link with ID a81e5d20-6c37-4f9b-9e12-5b4d8f2c7a90 not found"
}

Validation Error (422 Unprocessable Entity)​

Returned when max_purchases is out of range or expires_at is not a date in the future. Field errors use { message, errors }. Messages on a field may be in Polish:

{
"message": "The given data was invalid.",
"errors": {
"max_purchases": [
"Minimalna wartość to 1"
]
}
}

An archived link returns a flat { message }:

{
"message": "Custom-price link \"3f9c2b7e-8d41-4a6f-b2e5-7c1d9a0e4f63\" is archived and can no longer be changed"
}

Unauthorized Error (401)​

{
"message": "Unauthenticated."
}

Forbidden Error (403)​

{
"message": "You do not have API access to the requested store."
}