Country and State APIs

Get Country List Statistical-Tools Blog

Resources

There are 2 main resources needed in this prototype For Id you need to pass Id

# Users E-commerce
1 Users E-Commerec Product

This website has no relation to any names involving 'api' or 'tpoint'. It is a free study portal, an independent platform for educational purposes only.

API Verbs

Verb Description
GET Retrieves data from the server
POST Sends data to the server to create a new resource
PUT Updates an existing resource on the server
DELETE Deletes a resource on the server

HTTP Response Status Codes in Web API

When working with Web APIs, understanding HTTP response status codes is crucial for proper communication between the client and the server. These status codes are divided into five classes:

1xx: Informational

Informational responses indicate that the request was received and understood, and the client should continue with the request or ignore it if already finished. Common codes include:

  • 100 Continue: The initial part of the request has been received and the client should continue.
  • 101 Switching Protocols: The server is switching protocols as requested by the client.

2xx: Success

Success responses indicate that the client's request was successfully received, understood, and accepted. Common codes include:

  • 200 OK: The request was successful, and the server returned the requested resource.
  • 201 Created: The request was successful, and a new resource was created.
  • 204 No Content: The request was successful, but there is no content to return.

3xx: Redirection

Redirection responses indicate that further action needs to be taken by the client to complete the request. Common codes include:

  • 301 Moved Permanently: The resource has been moved to a new URL permanently.
  • 302 Found: The resource is temporarily located at a different URL.
  • 304 Not Modified: The resource has not been modified since the last request.

4xx: Client Error

Client error responses indicate that the request contains bad syntax or cannot be fulfilled. Common codes include:

  • 400 Bad Request: The server could not understand the request due to invalid syntax.
  • 401 Unauthorized: The client must authenticate itself to get the requested response.
  • 403 Forbidden: The client does not have access rights to the content.
  • 404 Not Found: The server could not find the requested resource.

5xx: Server Error

Server error responses indicate that the server failed to fulfill a valid request. Common codes include:

  • 500 Internal Server Error: The server encountered an unexpected condition.
  • 502 Bad Gateway: The server received an invalid response from the upstream server.
  • 503 Service Unavailable: The server is not ready to handle the request, often due to maintenance.