Ana içeriğe geç

Dil Geri Yükle

Silinmiş dili geri yükler (Admin).

Endpoint

POST /api/v1/admin/locales/\{code\}/restore

Authentication

Bu endpoint authentication gerektirir.

Header: Authorization: Bearer \{token\}

Permission

  • locales.restore - Dil geri yükleme

Request

Headers

HeaderDeğerZorunlu
AuthorizationBearer \{token\}Evet

Path Parameters

ParametreTipZorunluAçıklama
codestringEvetDil kodu

Response

Success Response (200 OK)

{
"id": 1,
"code": "tr",
"name": "Turkish",
"native_name": "Türkçe",
"sort_order": 1,
"is_active": true,
"deleted_at": null,
"created_at": "2025-11-20T12:00:00.000000Z",
"updated_at": "2025-11-20T12:00:00.000000Z"
}

Error Responses

404 Not Found

{
"message": "Locale not found"
}

400 Bad Request

{
"message": "Locale is not deleted"
}

403 Forbidden

{
"message": "Forbidden"
}

Code Examples

cURL

curl -X POST https://api.example.com/api/v1/admin/locales/tr/restore \
-H "Authorization: Bearer \{token\}"

Notes

  • Sadece soft delete ile silinmiş diller geri yüklenebilir
  • Geri yüklenen dil is_active durumu korunur
  • Dil zaten silinmemişse 400 hatası döner
  • code alanına göre dil bulunur (route model binding değil, manuel sorgu)