Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Các mã trạng thái sau đây có thể được trả về trong phản hồi HTTP.
Mã HTTP
Nội dung mô tả HTTP
Ghi chú
2xx
OK
Không phải lỗi; được trả về khi thành công. Bạn cũng nên sử dụng phương thức này cho các lỗi logic nghiệp vụ (ví dụ: booking_failure trong CreateBookingResponse được điền sẵn)
400
Yêu cầu lỗi
Yêu cầu không hợp lệ/Đối số không hợp lệ (không tìm thấy người bán, dịch vụ, khung giờ, đang cố gắng đặt khung giờ không hợp lệ, huỷ một lượt đặt chỗ chưa từng tồn tại).
401
Không được cho phép
Chưa xác thực (thông tin xác thực không hợp lệ, hãy thử đăng nhập lại). Yêu cầu không có thông tin xác thực hợp lệ cho thao tác.
403
Cấm
Quyền bị từ chối/bị cấm (phương thức gọi được xác định và bị từ chối). Bạn không được sử dụng phản hồi này cho các trường hợp từ chối do sử dụng hết một số tài nguyên (hãy sử dụng Too Many Requests cho các lỗi đó).
Không được sử dụng Forbidden nếu không xác định được phương thức gọi (hãy sử dụng Unauthorized cho các lỗi đó).
404
Không Tìm thấy
Không tìm thấy (Không tìm thấy tài nguyên, URL không hợp lệ, bao gồm cả RPC không hợp lệ)
409
Tình huống xung đột
Thao tác đã bị huỷ, thường là do vấn đề đồng thời, chẳng hạn như lỗi kiểm tra trình tự hoặc huỷ giao dịch.
429
Quá nhiều yêu cầu
Một số tài nguyên đã hết, có thể là hạn mức trên mỗi người dùng hoặc có thể toàn bộ hệ thống tệp đã hết dung lượng.
499
Yêu cầu đã đóng của ứng dụng
Thao tác đã bị huỷ, thường là do phương thức gọi.
500
Lỗi máy chủ nội bộ
Lỗi nội bộ. Điều này có nghĩa là một số hằng số không đổi mà hệ thống cơ bản dự kiến đã bị phá vỡ. Mã lỗi này được dành riêng cho các lỗi nghiêm trọng.
501
Chưa triển khai
Thao tác này không được triển khai hoặc không được hỗ trợ/bật trong dịch vụ này.
503
Dịch vụ không khả dụng
Dịch vụ này hiện không dùng được. Đây có thể là một điều kiện tạm thời, có thể được khắc phục bằng cách thử lại với thời gian đợi.
504
Hết thời gian chờ của cổng
Thời hạn đã hết trước khi thao tác có thể hoàn tất. Đối với các thao tác thay đổi trạng thái của hệ thống, lỗi này có thể được trả về ngay cả khi thao tác đã hoàn tất thành công. Ví dụ: phản hồi thành công từ máy chủ có thể bị trì hoãn đủ lâu để thời hạn hết hạn.
Đôi khi, có thể áp dụng nhiều mã lỗi. Dịch vụ phải trả về mã lỗi cụ thể nhất có thể áp dụng.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003eHTTP status codes indicate the outcome of a request, ranging from success (2xx) to various error types.\u003c/p\u003e\n"],["\u003cp\u003eClient errors (4xx) signal issues like bad requests, authentication failures, or missing resources.\u003c/p\u003e\n"],["\u003cp\u003eServer errors (5xx) represent problems on the server side, such as internal errors or service unavailability.\u003c/p\u003e\n"],["\u003cp\u003eSpecific error codes provide detailed information about the nature of the problem, enabling appropriate action.\u003c/p\u003e\n"],["\u003cp\u003eWhen multiple error codes could apply, the most specific one should be used.\u003c/p\u003e\n"]]],["HTTP responses can include various status codes. Successful operations return a 2xx code. Client-side errors include 400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 409 (Conflict), 429 (Too Many Requests), and 499 (Client Closed Request). Server-side errors are 500 (Internal Server Error), 501 (Not Implemented), 503 (Service Unavailable), and 504 (Gateway Timeout). The most specific error code should be returned when multiple codes apply.\n"],null,["# Status Response Codes\n\nThe following status codes can be returned in HTTP responses.\n\n| HTTP Code | HTTP Description | Notes |\n|-----------|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 2xx | OK | Not an error; returned on success. This should also be used for business logic failures (e.g. `booking_failure` in [`CreateBookingResponse`](/actions-center/verticals/reservations/e2e/reference/booking-server-api-rest/e2e-methods/createbooking-method) is populated) |\n| 400 | Bad Request | Bad Request/Invalid Arguments (merchant, service, slot not found, trying to book an invalid slot, cancelling a booking that never existed). |\n| 401 | Unauthorized | Unauthenticated (invalid credentials, retry login). The request does not have valid authentication credentials for the operation. |\n| 403 | Forbidden | Permission denied/forbidden (caller is known and rejected). This response must not be used for rejections caused by exhausting some resource (use `Too Many Requests` instead for those errors). `Forbidden` must not be used if the caller can not be identified (use `Unauthorized` instead for those errors). |\n| 404 | Not Found | Not found (Resource not found, invalid url, including invalid RPCs) |\n| 409 | Conflict | The operation was aborted, typically due to a concurrency issue such as a sequencer check failure or transaction abort. |\n| 429 | Too Many Requests | Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space. |\n| 499 | Client Closed Request | The operation was cancelled, typically by the caller. |\n| 500 | Internal Server Error | Internal errors. This means that some invariants expected by the underlying system have been broken. This error code is reserved for serious errors. |\n| 501 | Not Implemented | The operation is not implemented or is not supported/enabled in this service. |\n| 503 | Service Unavailable | The service is currently unavailable. This is most likely a transient condition, which can be corrected by retrying with a backoff. |\n| 504 | Gateway Timeout | The deadline expired before the operation could complete. For operations that change the state of the system, this error may be returned even if the operation has completed successfully. For example, a successful response from a server could have been delayed long enough for the deadline to expire. |\n\nSometimes multiple error codes may apply. Services should return the most\nspecific error code that applies."]]