Hatalar ve Yanıtlar
Mobil Uygulama Entegrasyon Kılavuzu
HTTP Durum Kodları
| 200 | OK - istek başarılı. |
| 204 | No Content - returned for OPTIONS preflight requests (CORS). |
| 400 | Bad Request - eksik veya geçersiz parametre. |
| 401 | Unauthorized - token eksik veya geçersiz. |
| 404 | Not Found - endpoint veya kaynak mevcut değil. |
| 405 | Method Not Allowed - bu endpoint için yanlış HTTP metodu. |
Başarılı Yanıt Şeması
JSON
{
"success": true,
"...": "endpoint-specific fields"
}
Hata Yanıtı Şeması
JSON
{
"success": false,
"message": "Human-readable error description"
}
CORS
All API responses include the following headers, so the API can be called from web clients:
HTTP
Access-Control-Allow-Origin: * Access-Control-Allow-Methods: GET, POST, OPTIONS Access-Control-Allow-Headers: Authorization, Content-Type, X-API-Token
Browsers send a preflight
OPTIONS request before a cross-origin POST. The API responds with 204 No Content and the CORS headers above - no body required.