---
schema_version: "1"
id: 4537a852ec1a0bacea66c4f065b497b17574e4cda74adc0851d8ae00235c6ec8
title: Query Services Status Codes
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/data-cloud/data-cloud-query-guide/references/data-cloud-query-api-reference/c360a-api-queryservices-statuscodes.md
canonical_url: https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/data-cloud-query-api-reference/c360a-api-queryservices-statuscodes.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: fc8b8477ea2784077ec5683c53a330921fb3b646506ba36ef5e732f7e1e583a8
products:
  - Data 360 Query Guide
  - Data 360 Developer Documentation
---
# Query Services Status Codes

The Query Services APIs return standard HTTP status codes to indicate the success or failure of a request. This document provides details about the status codes and their meanings.

## Status Codes

| Status Code              | Description          | Details                                                                                                 |
| ------------------------ | -------------------- | ------------------------------------------------------------------------------------------------------- |
| 200 OK                   | Request successful   | The request was processed successfully and the response contains the requested data.                    |
| 400 Bad Request          | Invalid request      | The request was malformed or contained invalid parameters. Check the request syntax and parameters.     |
| 403 Forbidden            | Authorization failed | The request failed to pass authorization. Verify your authentication credentials and permissions.       |
| 404 Not Found            | Resource not found   | The requested resource (callback ID, verification key, or both) was not found.                          |
| 422 Unprocessable Entity | Invalid attribute    | The attribute name used in fields/filter parameter doesn't exist. Verify the field names in your query. |
| 429 Too Many Requests    | Rate limit exceeded  | Too many requests were made in a given time period.    |
| 500 Server Error         | Internal error       | An unexpected error occurred on the server. Contact support if the issue persists.                      |

## Error Response Structure

When an error occurs, the response includes:

- `error`: Error message describing the issue
- `errorCode`: Unique identifier for the error type
- `details`: Additional information about the error (if available)

## Examples

The following are examples of error code request and responses.

### 400 Bad Request

```json
{
  "error": "Invalid SQL query syntax",
  "errorCode": "INVALID_SQL",
  "details": "Syntax error at line 1: unexpected token 'FROM'"
}
```

### 403 Forbidden

```json
{
  "error": "Insufficient permissions",
  "errorCode": "FORBIDDEN",
  "details": "User does not have permission to access this resource"
}
```

### 429 Too Many Requests

```json
{
  "error": "Rate limit exceeded",
  "errorCode": "RATE_LIMIT",
  "details": "Rate limit exceeded for this organization"
}
```

## Notes

- All error responses are in JSON format
- Error messages are designed to be human-readable
- The `errorCode` field can be used for programmatic error handling
- Rate limits are enforced per organization

## Related Resources

- [Query API Documentation](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/data-cloud-query-api-reference/query-services/c360a-api-queryservices-overview.md)
- [Data Cloud Query Guide](https://developer.salesforce.com/docs/data/data-cloud-query-guide/guide/query-guide-get-started.html)
