Overview
TheReturnType model represents a generic response structure used by various API methods to indicate the success or failure of an operation.
Properties
Response code indicating the status of the operation. A value of
0 typically indicates success, while non-zero values indicate errors.Additional data or message describing the result of the operation
Example JSON
Usage Example
Methods
Getters
getCode(): int- Get the response codegetData(): string- Get the response data
Setters
setCode(int $code): self- Set the response codesetData(string $data): self- Set the response data
Common Response Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 401 | Authentication failed |
| 404 | Resource not found |
| 500 | Internal server error |
Related
- Error Handling - Learn how to handle API errors
- InitReturnType - Specific return type for initialization
- PingReturnType - Specific return type for ping requests