Update a reseller organization (Owner + Distributor)
Body
Required
-
Organization name (cannot be empty)
Minimum length is
1. -
Organization description
-
Optional. Attributes the new organization to an ancestor org (its custom_data.createdBy) instead of the caller's own org — used to preserve hierarchical ownership when an upper tier creates an entity on behalf of a lower one. Honored only for reseller creation (owner only; target must be a distributor) and customer creation (owner or distributor; target must be a reseller or distributor) within the caller's hierarchy. Empty = owned by the caller's organization. When set, the created_by snapshot in responses shows the attributed org and carries on_behalf_of: true.
-
Distributors only. The third-party portals (application names as registered in Logto, e.g. nethshop.nethesis.it) the resellers and customers under the distributor may use on the dashboard: their users see only these portals, on top of the role filter each application declares. The distributor's own users are not bound by the list and see every portal their roles admit. Omitted or empty = no portal for the subtree. Names must belong to the catalogue returned by GET /third-party-applications/catalog, otherwise the request fails validation (third_party_apps: unknown_application). Ignored for resellers and customers, which inherit the list of the distributor above them. On update, omitting the field leaves the list untouched; an empty array clears it.
-
Custom organization data (vat field is required)
Additional properties are allowed.
curl \
--request PUT 'https://my.nethesis.it/backend/api/resellers/jf584cz36kce' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"name": "ACME Distribution SpA",
"description": "Main distributor for Italian and Swiss markets",
"created_by_organization_id": "eeex9cffzsd7",
"third_party_apps": [
"nethshop.nethesis.it",
"my.nethspot.com"
],
"custom_data": {
"vat": "IT12345678901",
"email": "contact@acme-distribution.com",
"contactPerson": "John Smith",
"region": "Italy"
}
}'
{
"name": "ACME Distribution SpA",
"description": "Main distributor for Italian and Swiss markets",
"created_by_organization_id": "eeex9cffzsd7",
"third_party_apps": [
"nethshop.nethesis.it",
"my.nethspot.com"
],
"custom_data": {
"vat": "IT12345678901",
"email": "contact@acme-distribution.com",
"contactPerson": "John Smith",
"region": "Italy"
}
}
{
"code": 200,
"message": "reseller updated successfully",
"data": {
"id": "4405ffd0-0aca-44ef-bae2-c8545bce94f4",
"logto_id": "akkbs6x2wo82",
"name": "ACME Distribution SpA",
"description": "Main distributor for Italian and Swiss markets",
"custom_data": {
"email": "contact@acme-distribution.com",
"contactPerson": "John Smith",
"region": "Italy"
},
"third_party_apps": [
"nethshop.nethesis.it",
"my.nethspot.com"
],
"suspended_at": "2026-05-04T09:42:00Z",
"suspended_by_org_id": "string",
"rebranding_enabled": false,
"rebranding_org_id": "string",
"created_by": {
"user_id": "aa15fcvgzw1y",
"username": "owner",
"name": "Nethesis Owner",
"email": "owner@nethesis.it",
"organization_id": "2wl3iixbc8ua",
"organization_name": "Owner",
"organization_type": "owner",
"on_behalf_of": true
},
"promoted_from": {
"level": "reseller",
"at": "2026-07-30T10:00:00Z",
"detached_from_organization_id": "akkbs6x2wo82",
"by": {
"user_id": "aa15fcvgzw1y",
"username": "owner",
"name": "Nethesis Owner",
"email": "owner@nethesis.it",
"organization_id": "2wl3iixbc8ua",
"organization_name": "Owner",
"organization_type": "owner",
"on_behalf_of": true
}
}
}
}
{
"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": 400,
"message": "validation failed",
"data": {
"type": "validation_error",
"errors": [
{
"key": "username",
"message": "required",
"value": "string"
}
]
}
}