Skip to main content

Status Codes in HTTP

B
Written by BatchData Support
Updated over 4 months ago

HTTP Status Codes

The status codes indicate if the request is successfully served or not. There are codes for success results, deprecated results, errors from the client side, and errors from the server side. These responses are the most common results returned.

Error Response Format

status: This is an object containing details about the status of the response.

code: The HTTP status code indicating the type of error. For example, 401 corresponds to "Unauthorized". This means that the request lacks valid authentication credentials.

text: A human-readable description of the error status. In this case, it's "Unauthorized", which provides additional context about the error.

message: A specific message detailing the reason for the error. Here, it says "Invalid token.", suggesting that the error occurred due to an authentication token that is either missing or invalid.

{
"status": {
"code": 401,
"text": "Unauthorized",
"message": "Invalid token."
}
}

2xx Success Results

A status code of 2xx indicates that the request was successfully completed. This indicates that our servers processed the request and delivered the appropriate result.

Status Code

Text

Description

200

OK

The request has been successfully sent and processed.

4xx Errors from the Client Side

A status code 4xx indicates that the website or page could not be reached because of an error that is usually due to a problem on the client's end. Examples include invalid request body, invalid client token, grammatical mistakes in request body, unauthorized user, etc.

Status Code

Text

Description

400

Bad Request

The parameter you submitted is not valid. Please recheck request body before submitting the request.

401

Unauthorized

The credentials are not valid. You don't have authorization to access the resource. Example messages include "Invalid token".

403

Forbidden

The operation is not allowed, permission can't be given. Example messages include "Account is disabled", "Insufficient balance", "Token is disabled", "Insufficient permissions".

404

Not Found

The data you requested does not exist or cannot be found.

405

Method Not Allowed

The HTTP method used is not allowed for this endpoint.

410

Gone

The requested endpoint has been deprecated and is no longer available.

429

Too Many Requests

The request limit has been exceeded. Try again later. See API Rate Limits for details.

5xx Errors from the Server Side

The status code 5xx (Server Error) indicates that the server is unable to perform the requested operation. Although the request appears to be genuine, the server was unable to complete it due to technical issues.

Status Code

Text

Description

500

Internal Server Error

There is an error on the server. Contact support if this keeps happening.

502

Bad Gateway

The server received an invalid response from an upstream server.

503

Service Unavailable

The server is temporarily unavailable, usually due to maintenance or overload.

504

Gateway Timeout

The server did not receive a timely response from an upstream server.

Did this answer your question?