Organizasyon Oluştur
Yeni organizasyon oluşturur.
Endpoint
POST /api/v1/organizations
Authentication
Bu endpoint authentication gerektirir.
Header: Authorization: Bearer \{token\}
Permission
organizations.create- Tüm organizasyonları oluşturmaorganizations.create.own- Sadece kendi organizasyonunu oluşturma
Request
Headers
| Header | Değer | Zorunlu |
|---|---|---|
Authorization | Bearer \{token\} | Evet |
Content-Type | application/json | Evet |
Request Body
| Parametre | Tip | Zorunlu | Açıklama |
|---|---|---|---|
organization_name | string | Evet | Organizasyon adı |
organization_code | string | Evet | Organizasyon kodu |
legal_name | string | Hayır | Yasal ad |
tax_number | string | Hayır | Vergi numarası |
status | string | Hayır | Durum |
email | string | Hayır | E-posta |
phone | string | Hayır | Telefon |
website | string | Hayır | Web sitesi |
address | string | Hayır | Adres |
country | string | Hayır | Ülke |
city | string | Hayır | Şehir |
description | string | Hayır | Açıklama |
is_active | boolean | Hayır | Aktif durumu (varsayılan: true) |
Example Request
{
"organization_name": "CyberCert",
"organization_code": "CYB01",
"legal_name": "CyberCert Ltd.",
"tax_number": "1234567890",
"country": "TR",
"city": "Istanbul",
"is_active": true
}
Response
Success Response (201 Created)
Oluşturulan organizasyon nesnesi döner.
Code Examples
cURL
curl -X POST https://api.example.com/api/v1/organizations \
-H "Authorization: Bearer \{token\}" \
-H "Content-Type: application/json" \
-d '{
"organization_name": "CyberCert",
"organization_code": "CYB01",
"is_active": true
}'
Notes
- Organizasyon oluşturulduğunda otomatik olarak UUID oluşturulur
- Oluşturan kullanıcı otomatik olarak organizasyona üye olarak eklenir
Related Endpoints
- Organization List - Organizasyon listesi
- Organization Detail - Organizasyon detayı