Users API Endpoints

User Management

The Users API provides endpoints for managing user accounts in your system. These endpoints allow you to create, retrieve, update, and delete user records, as well as manage user authentication and permissions.

Base URL: https://www.venddor.com.br/api
GET POST /users

Access all user accounts or create a new user account.

Supported Methods

Method Description
GET Retrieve all user accounts
POST Create a new user account
GET Response Example
POST Request Example
{
  "data": [
    {
      "id": "user_001",
      "first_name": "João",
      "last_name": "Silva",
      "email": "joao.silva@example.com",
      "role": "admin",
      "active": true,
      "created_at": "2024-12-01T14:30:15Z",
      "last_login": "2025-04-10T09:22:45Z"
    },
    {
      "id": "user_002",
      "first_name": "Maria",
      "last_name": "Santos",
      "email": "maria.santos@example.com",
      "role": "customer",
      "active": true,
      "created_at": "2025-01-15T16:45:30Z",
      "last_login": "2025-04-12T18:33:20Z"
    }
  ],
  "meta": {
    "total": 124,
    "page": 1,
    "per_page": 10
  }
}
{
  "first_name": "Ana",
  "last_name": "Oliveira",
  "email": "ana.oliveira@example.com",
  "password": "SecureP@ssw0rd",
  "role": "manager",
  "phone": "+5511987654321",
  "address": {
    "street": "Avenida Paulista, 1000",
    "city": "São Paulo",
    "state": "SP",
    "postal_code": "01310-100",
    "country": "Brazil"
  },
  "send_welcome_email": true
}
Note: When retrieving users, sensitive information like passwords is never included in the response.
GET PUT DELETE /users/:id

Access, update, or delete a specific user account by its ID.

Path Parameters

Parameter Type Description
id* string The unique identifier of the user

Supported Methods

Method Description
GET Retrieve a specific user
PUT Update a specific user
DELETE Delete a specific user

Example PUT Request

{
  "email": "joao.silva.updated@example.com",
  "phone": "+5511999998888",
  "role": "super_admin",
  "address": {
    "street": "Rua Augusta, 500",
    "city": "São Paulo",
    "state": "SP",
    "postal_code": "01304-000",
    "country": "Brazil"
  }
}

Response Status Codes

Status Code Description
200 OK Operation completed successfully
400 Bad Request Invalid request parameters
403 Forbidden Insufficient permissions to perform the operation
404 Not Found User with the specified ID does not exist
409 Conflict Email address already in use (when updating)
Important: When updating user information, only include the fields you want to change. Omitted fields will retain their current values.
Tip: To change a user's password, use the dedicated password reset endpoint for better security.