What is a REST API and what do GET, POST, PUT and DELETE mean?
Published on 2026-10-20 by frfrand
API REST explicada con ejemplos de clientes y productos: recursos, métodos HTTP, códigos de estado y diferencias con una API cualquiera.

A REST API is an interface designed following an architectural style centered on resources and the consistent use of web protocol mechanisms. Many APIs we call REST communicate via HTTP and use methods such as GET, POST, PUT, PATCH, and DELETE.
But REST is not simply "sending JSON over HTTP". Resource design, representations, and operation semantics also matter.
The example of an online store
Imagine you have products and orders. A mobile app and a website need to consult both types of information.
Instead of inventing a different textual command for each task, you can use recognizable routes: /products, /products/42, or /orders/15.
The route identifies a resource or a collection. The HTTP method indicates what type of operation the client requests.
What does GET do?
GET /products/42 usually requests a representation of the product identified as 42.
By design, GET should be used for read operations and should not cause dangerous business effects such as charging a purchase or deleting an account.
That does not prevent the server from logging metrics or accesses, but the operation exposed to the client must respect protocol expectations.
What are POST, PUT, PATCH, and DELETE for?
POST is usually used to send information that the server will process, such as creating an order.
PUT is commonly used to create or replace the representation of an identified resource.
PATCH allows applying partial modifications according to the defined request format.
DELETE requests deleting a resource or performing the corresponding deletion operation.
It is not correct to state that all backends must assign exactly CRUD to these methods without considering the design and real semantics.
What is an HTTP status code?
The server returns a code that helps understand the result of the request.
For example, 200 OK indicates success in a common case, 201 Created may indicate creation, 400 Bad Request an invalid request, 401 Unauthorized lack of proper authentication, 403 Forbidden a denied access and 404 Not Found a resource not found.
The code does not replace a useful explanation of the error, but allows clients and tools to react correctly.
What format does a REST API use?
Many use JSON because it is convenient for exchanging structured data. But REST does not necessarily require JSON. Other representations may exist depending on the application.
It also does not require the frontend to be made in a specific language. A Django backend can offer an API consumed from React, an Android app and other services.
Why is stateless mentioned?
In the REST style, requests should contain enough information for the server to interpret them, without depending on an implicit conversation that is only known by having received previous requests.
That does not mean that the system cannot store orders, users, or sessions in databases. It means that the request contract must allow understanding what each operation requires.
How is an API protected?
It needs authentication when appropriate, authorization by resource, data validation, abuse limits, and proper error handling.
Hiding a button on the frontend does not prevent someone from calling the endpoint directly. For example, GET /pedidos/15 should not reveal information simply because someone guessed the order number.
It is also advisable to apply parameterized queries and review what data is returned to avoid exposing internal fields.
What if I need to update information in real time?
You can complement an HTTP API with webhooks, WebSocket, or other technologies. You do not have to force all scenarios into the same pattern if an alternative is more suitable.
An application can query products via REST and receive notifications through a different channel.
How does it relate to ArduMaker?
Backends deployed within ArduMaker VPSs can offer HTTP APIs to connect with other programs. The platform provides the infrastructure and integration tools; the resource, method, and permission contract belongs to the software design.
In summary: REST is a way of organizing web interfaces around resources and consistent rules. Learning HTTP methods and codes allows understanding a good part of modern APIs.
Sources: HTTP Methods on MDN · HTTP Overview · What is an API.
