Update Partner
Sparse-update a published partner. Only the keys you send are changed.
null on commission_percent or cookie_valid_days clears that override so the partner inherits the store default. Omitting the key leaves the current value in place. Unknown keys return 422. Send commission_percent, not commission.
Email can be set only while it is null. See Email. There is no archive on this endpoint.
Request
PATCH /partners/{id}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Partner UUID. A malformed value returns 400. |
Request Body
All fields optional. Omit a key to leave it unchanged.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No | Partner name. 1–255 characters. |
ref | string | No | Checkout ?ref= slug. Same rules as Create Partner. Unique among other published partners of this store. |
email | string | No | Set only while the partner has no email. A different email, or null, once one is set returns 422. The same email is a no-op. |
cookie_valid_days | integer | No | Cookie-length override, 1–3650. null clears it. |
commission_percent | integer | No | Commission override, integer 1–100. 20 means 20%. null clears it. |
Example Request
Set a 14-day cookie and leave commission, name, ref, and email as they are:
curl -X PATCH "https://cart.easy.tools/api/v1/partners/7c2e9a14-3b6f-4d81-9e25-0c8a1f4b6d30" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"cookie_valid_days": 14
}'
Response
Success Response (200)
Returns the updated partner. stats is null.
{
"id": "7c2e9a14-3b6f-4d81-9e25-0c8a1f4b6d30",
"name": "Ada",
"email": "ada@example.com",
"ref": "ada",
"cookie_valid_days": 14,
"commission_percent": 15,
"is_auto_created": false,
"created_at": "2026-05-27T10:15:30+00:00",
"updated_at": "2026-05-27T11:00:00+00:00",
"stats": null
}
See the Partner object. commission_percent is unchanged because that key was omitted.
Error Responses
Bad Request (400)
A malformed partner id:
{
"message": "Invalid partner ID"
}
Not Found Error (404)
Unknown, archived, and the store referrer.
{
"message": "Partner with ID 7c2e9a14-3b6f-4d81-9e25-0c8a1f4b6d30 not found"
}
Validation Error (422 Unprocessable Entity)
Unknown keys, a bad slug, a ref longer than 49 characters, a duplicate published ref, an unknown email, and out-of-range commission or cookie use the same { message, errors } body as Create Partner.
{
"message": "The given data was invalid.",
"errors": {
"commission": [
"The commission field is not allowed."
]
}
}
Changing an email that is already set, clearing it, and the store referrer's email are email field errors. The partner is not updated.
{
"message": "Email cannot be changed once it is set",
"errors": {
"email": [
"Email cannot be changed once it is set"
]
}
}
Unauthorized Error (401)
{
"message": "Unauthenticated."
}
Forbidden Error (403)
Returned when your API key has not been granted access to the requested store.
{
"message": "You do not have API access to the requested store."
}
Rate Limit Error (429 Too Many Requests)
Returned when you exceed the rate limit. The Retry-After response header gives the number of seconds to wait.
{
"message": "Too many requests. Please retry after 60 seconds."
}