Move the reseller under another distributor by rewriting its
custom_data.createdBy, in Logto and locally. Allowed to the Owner
organization only (403 otherwise). A target that is not a distributor
is a 400 on key organization_id with message not_a_distributor.
Customers, systems and users stay with the reseller and follow it; the reseller keeps its own alerting tenant, re-rendered from the layers of its new hierarchy. What belongs to the hierarchy it leaves goes away: add-ons bought by that side stop renewing (they stay valid until they expire) and alerts assigned to its users are released. The response carries the applied counters.
Responses
-
Reseller transferred
-
Bad request - validation error
-
Unauthorized - invalid or missing token
-
Forbidden - insufficient permissions
-
Resource not found
-
The reseller cannot be transferred in its current state.
data.typeisvalidation_error, on keytransfer, with stablemessagecodes:reseller_is_suspended(reactivate it first),reseller_not_synced(no Logto organization yet),same_organization(already managed by the target),target_is_suspended,transfer_in_progress(another transfer of the same reseller is running).
curl \
--request PATCH 'https://my.nethesis.it/backend/api/resellers/{id}/transfer' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"organization_id": "5j8k2m4n6p8q"
}'
{
"organization_id": "5j8k2m4n6p8q"
}
{
"code": 200,
"message": "reseller transferred successfully",
"data": {
"reseller": {
"id": "5j8k2m4n6p8q",
"name": "ACME Reseller",
"type": "reseller"
},
"from": {
"id": "5j8k2m4n6p8q",
"name": "ACME Reseller",
"type": "reseller"
},
"to": {
"id": "5j8k2m4n6p8q",
"name": "ACME Reseller",
"type": "reseller"
},
"customers_count": 12,
"systems_count": 30,
"users_count": 8,
"addons": [
{
"system_id": "0f6e6a3a-2f7e-4a64-9a4c-0d1d2c3b4a59",
"system_name": "fw-headquarters",
"entitlement": "nsec-blacklist",
"display_name": "Advanced Threat Shield",
"scope": "string",
"valid_until": "2026-05-04T09:42:00Z",
"purchased_by_organization_name": "ACME Reseller",
"renewal": "continues"
}
],
"renewals_stopping": 1,
"assignments_count": 1,
"warnings": [
"string"
]
}
}
{
"code": 400,
"message": "validation failed",
"data": {
"type": "validation_error",
"errors": [
{
"key": "username",
"message": "required",
"value": "string"
}
]
}
}
{
"code": 401,
"message": "invalid token",
"data": {}
}
{
"code": 403,
"message": "insufficient permissions",
"data": {}
}
{
"code": 400,
"message": "validation failed",
"data": {
"type": "validation_error",
"errors": [
{
"key": "username",
"message": "required",
"value": "string"
}
]
}
}
{
"code": 409,
"message": "validation failed",
"data": {
"type": "validation_error",
"errors": [
{
"key": "transfer",
"message": "same_organization"
}
]
}
}