Skip to main content
GET
/
api
/
pedidos
List All Orders
curl --request GET \
  --url https://api.example.com/api/pedidos
Retrieves a list of all orders in the system.

Authentication

Requires JWT token in the Authorization header.
Authorization: Bearer YOUR_JWT_TOKEN

Response

Returns an array of order objects with complete details including line items.

Response Body

[
  {
    "pedido_id": 1,
    "referencia": "ORD-2026-001",
    "usuario": {
      "usuario_id": 5,
      "username": "john_doe",
      "email": {
        "address": "[email protected]"
      }
    },
    "fechaPedido": "2026-03-11T10:30:00",
    "estado": "PENDIENTE",
    "detalles": [
      {
        "detalle_id": 1,
        "producto": {
          "producto_id": 10,
          "nombre": "BILLY Bookcase",
          "precioCantidad": 49.99,
          "precioMoneda": "USD",
          "es_destacado": false
        },
        "cantidad": 2,
        "precioUnitario": 49.99,
        "subtotal": 99.98
      }
    ],
    "total": 99.98
  }
]

Response Fields

FieldTypeDescription
pedido_idLongUnique order identifier
referenciaStringAuto-generated order reference number
usuarioObjectUser who placed the order
usuario.usuario_idLongUser ID
usuario.usernameStringUsername
usuario.email.addressStringUser email address
fechaPedidoDateTimeOrder creation timestamp
estadoStringOrder status (see EstadoPedido values)
detallesArrayArray of order line items
detalles[].detalle_idLongLine item ID
detalles[].productoObjectProduct details
detalles[].cantidadIntegerQuantity ordered
detalles[].precioUnitarioBigDecimalUnit price at time of order
detalles[].subtotalBigDecimalLine item subtotal
totalBigDecimalTotal order amount

EstadoPedido Values

  • PENDIENTE - Order pending
  • PAGADO - Order paid
  • ENVIADO - Order shipped
  • ENTREGADO - Order delivered
  • CANCELADO - Order cancelled

Example Request

curl -X GET "https://api.iquea.com/api/pedidos" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json"

Status Codes

CodeDescription
200Success - Returns array of orders
401Unauthorized - Invalid or missing token
500Internal server error

Build docs developers (and LLMs) love