Skip to content

sergioortegadev/app-next-ex02

Repository files navigation

API documentation

API developed in Next.js with TypeScript. Frontend and Backend complete and working ok.

Endpoint currently working

Upcoming endpoints

Endpoint details GET: /api/products

Description: Returns a list of products.

Method: GET

Response:

[
  {
    "id": 1,
    "title": "Product 1",
    "price": 10.99
  },
  {
    "id": 2,
    "title": "Product 2",
    "price": 19.99
  }
]

Endpoint details POST: /api/products

Description: Create a new product.

Method: POST

Parámetros:

  • title (required): Product name.
  • description (required): Product description.
  • price (required): Product price.
  • category: Product category.
  • images (required): ["url into array"]

Respuesta:

{
  "id": 3,
  "title": "Nuevo producto",
  "description": "Descripción del nuevo producto",
  "price": 29.99,
  "category": "Categoria del nuevo producto",
  "images": ["https://example.com/images/123456.jpg"]
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published