curl -X PATCH "https://api.affonso.io/v1/program/promotion-urls/promotion_url_abc123" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{ "sort_order": 20, "is_active": true }'
Promotion URLs
Update Promotion URL
Update a promotion URL and its audience assignments
PATCH
/
v1
/
program
/
promotion-urls
/
{id}
curl -X PATCH "https://api.affonso.io/v1/program/promotion-urls/promotion_url_abc123" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{ "sort_order": 20, "is_active": true }'
Update a promotion URL. All fields are optional. When supplied,
The same audience rules as Create Promotion URL apply. Legacy URLs created from a program website, group website, or product landing page must retain their original audience and assignment.
group_ids or product_ids replace the complete assignment set atomically.
A promotion URL that is currently a program or group default cannot be deactivated, deleted, or changed so that it no longer satisfies that default. Choose a replacement default first.
Path Parameters
string
required
The promotion URL identifier.
Body Parameters
string
Display name, 1–255 characters.
string
HTTP(S) destination URL, up to 2048 characters.
string | null
Optional description. Set to
null to clear.string
all_affiliates, groups, or products.array
Complete replacement group assignment list.
array
Complete replacement product assignment list.
boolean
Enable or disable the URL.
integer
Non-negative selection priority.
Response
Returns the updated promotion URL. See List Promotion URLs for the response object.curl -X PATCH "https://api.affonso.io/v1/program/promotion-urls/promotion_url_abc123" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{ "sort_order": 20, "is_active": true }'
Was this page helpful?
