Crear un tenant
Crea un nuevo tenant y una organización asociada para la organización propietaria especificada. El cuerpo de solicitud usa un discriminador type con rutas excluyentes: tenant (END CUSTOMER) y organization (PARTNER/WHOLESALER).
curl --request POST \
--url https://api.flexxible.net/v2/organizations/{organization_id}/tenants \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "tenant",
"name": "Tenant de producción",
"tenant_config": {
"product_config_id": "507f1f77bcf86cd799439030",
"analyzer": "existing"
},
"policy_id": "507f1f77bcf86cd799439050",
"organization_email": "[email protected]",
"organization_language": "en",
"organization_country": "US",
"organization_industry": "Tecnología"
}
'{
"id": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"region": "<string>",
"product_id": "<string>",
"policy_id": "<string>"
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}Autorizaciones
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Parámetros de ruta
El identificador único de la organización propietaria que creará el tenant
24^[0-9a-f]{24}$Cuerpo
Cuerpo único de creación con campos condicionales por type: si type=tenant, requiere tenant_config; si type=organization, requiere organization_config.
Tipo de creación. tenant para END CUSTOMER, organization para PARTNER/WHOLESALER.
tenant, organization 512512512512512Configuración específica para type=tenant.
Show child attributes
Show child attributes
Configuración específica para type=organization.
Show child attributes
Show child attributes
24^[0-9a-f]{24}$Respuesta
Tenant y organización asociados creados correctamente. Devuelve el recurso tenant creado.
curl --request POST \
--url https://api.flexxible.net/v2/organizations/{organization_id}/tenants \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "tenant",
"name": "Tenant de producción",
"tenant_config": {
"product_config_id": "507f1f77bcf86cd799439030",
"analyzer": "existing"
},
"policy_id": "507f1f77bcf86cd799439050",
"organization_email": "[email protected]",
"organization_language": "en",
"organization_country": "US",
"organization_industry": "Tecnología"
}
'{
"id": "<string>",
"organization_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"region": "<string>",
"product_id": "<string>",
"policy_id": "<string>"
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}