Skip to main content
GET
/
api
/
v1
/
vendedores
/
:id
Get Vendedor
curl --request GET \
  --url https://api.example.com/api/v1/vendedores/:id
{
  "success": true,
  "data": {
    "id": "770e8400-e29b-41d4-a716-446655440000",
    "name": "Carlos Martínez",
    "username": "cmartinez",
    "email": "[email protected]",
    "phone": "8091234567",
    "role": "VENDEDOR",
    "ventanaId": "660e8400-e29b-41d4-a716-446655440000",
    "code": "CM001",
    "isActive": true,
    "settings": {
      "print": {
        "name": "Portable Printer",
        "phone": "8091234567",
        "width": 58,
        "footer": "Gracias por su preferencia",
        "barcode": true,
        "bluetoothMacAddress": "AA:BB:CC:DD:EE:FF"
      },
      "theme": "dark"
    },
    "platform": "android",
    "appVersion": "2.0.7",
    "deletedAt": null,
    "deletedBy": null,
    "deletedReason": null,
    "createdAt": "2024-03-15T13:00:00Z",
    "updatedAt": "2024-03-15T14:30:00Z"
  }
}

Overview

Retrieves detailed information about a specific vendedor (seller). VENTANA users can only view vendedores within their own ventana.

Authorization

Required: Valid JWT token (all authenticated users)
Permissions:
  • ADMIN: Can view any vendedor
  • VENTANA: Can only view vendedores in their ventana
  • VENDEDOR: Can view any vendedor

Path Parameters

id
string
required
UUID of the vendedor to retrieve

Response

success
boolean
Indicates if the request was successful
data
object
The vendedor user object (password excluded)
{
  "success": true,
  "data": {
    "id": "770e8400-e29b-41d4-a716-446655440000",
    "name": "Carlos Martínez",
    "username": "cmartinez",
    "email": "[email protected]",
    "phone": "8091234567",
    "role": "VENDEDOR",
    "ventanaId": "660e8400-e29b-41d4-a716-446655440000",
    "code": "CM001",
    "isActive": true,
    "settings": {
      "print": {
        "name": "Portable Printer",
        "phone": "8091234567",
        "width": 58,
        "footer": "Gracias por su preferencia",
        "barcode": true,
        "bluetoothMacAddress": "AA:BB:CC:DD:EE:FF"
      },
      "theme": "dark"
    },
    "platform": "android",
    "appVersion": "2.0.7",
    "deletedAt": null,
    "deletedBy": null,
    "deletedReason": null,
    "createdAt": "2024-03-15T13:00:00Z",
    "updatedAt": "2024-03-15T14:30:00Z"
  }
}

Notes

  • Password is never included in response
  • ID must be a valid UUID format
  • VENTANA users can only access vendedores in their ventana (see src/api/v1/controllers/vendedor.controller.ts:70-76)
  • Returns 404 if vendedor is soft-deleted or doesn’t have VENDEDOR role
  • Implementation: src/api/v1/controllers/vendedor.controller.ts:69-77

Build docs developers (and LLMs) love