Ana içeriğe geç

Müşteri Geri Yükle

Silinmiş müşteriyi geri yükler.

Endpoint

POST /api/v1/customers/\{uuid\}/restore

Authentication

Bu endpoint authentication gerektirir.

Header: Authorization: Bearer \{token\}

Permission

  • customers.restore - Tüm müşterileri geri yükleme
  • customers.restore.own - Sadece kendi müşterilerini geri yükleme

Request

Headers

HeaderDeğerZorunlu
AuthorizationBearer \{token\}Evet

Path Parameters

ParametreTipZorunluAçıklama
uuidstringEvetMüşteri UUID'si

Response

Success Response (200 OK)

{
"message": "Customer restored",
"customer": {
"id": 1,
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"company_name": "Örnek Şirket",
"is_active": true,
"deleted_at": null
}
}

Error Responses

404 Not Found

{
"message": "Customer not found"
}

403 Forbidden

{
"message": "Forbidden"
}

Code Examples

cURL

curl -X POST https://api.example.com/api/v1/customers/550e8400-e29b-41d4-a716-446655440000/restore \
-H "Authorization: Bearer \{token\}"

Notes

  • Sadece soft delete ile silinmiş müşteriler geri yüklenebilir
  • Geri yüklenen müşteri is_active durumu korunur