Settings API Endpoints

Settings Endpoints

The Settings API allows you to retrieve and modify system settings. These endpoints provide access to global configuration parameters and user-specific preferences.

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

Retrieves a list of all available system settings.

Supported Methods

Method Description
GET Retrieve all settings
Tip: Use filtering parameters to narrow down the results when retrieving multiple settings.

Example Response

{
  "data": [
    {
      "id": "timezone",
      "name": "System Timezone",
      "value": "America/Sao_Paulo",
      "description": "Default timezone for date and time operations",
      "modifiable": true
    },
    {
      "id": "currency",
      "name": "Default Currency",
      "value": "BRL",
      "description": "Currency used for monetary values",
      "modifiable": true
    }
  ],
  "meta": {
    "total": 24,
    "page": 1,
    "per_page": 10
  }
}
GET PUT /settings/:id

Retrieve or update a specific setting by its ID.

Path Parameters

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

Supported Methods

Method Description
GET Retrieve a specific setting
PUT Update a specific setting
GET Response Example
PUT Request Example
{
  "id": "email_sender",
  "name": "Email Sender Address",
  "value": "no-reply@venddor.com.br",
  "description": "Default email address used for sending system notifications",
  "modifiable": true,
  "validation": "email",
  "last_modified": "2025-03-12T14:22:18Z",
  "modified_by": "admin"
}
{
  "value": "support@venddor.com.br"
}

Response Status Codes

Status Code Description
200 OK Setting retrieved or updated successfully
400 Bad Request Invalid request parameters or validation error
403 Forbidden Insufficient permissions to modify the setting
404 Not Found Setting with the specified ID does not exist
Important: Some settings cannot be modified and will return a 403 error if you attempt to update them.