API — Clientes
Documentacao tecnica gerada automaticamente a partir da especificacao OpenAPI.
GET /api/customers/me
Get My Profile
Exemplo resposta (200):
{
"id": 0,
"email": "string",
"first_name": "string",
"last_name": "string",
"phone": null,
"is_active": true,
"email_verified": true,
"created_at": null,
"updated_at": null
}
PUT /api/customers/me
Update My Profile
Corpo do pedido:
| Campo | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| first_name | object | Nao | First Name |
| last_name | object | Nao | Last Name |
| phone | object | Nao | Phone |
| object | Nao |
Exemplo pedido:
{
"first_name": null,
"last_name": null,
"phone": null,
"email": null
}
Exemplo resposta (200):
{
"id": 0,
"email": "string",
"first_name": "string",
"last_name": "string",
"phone": null,
"is_active": true,
"email_verified": true,
"created_at": null,
"updated_at": null
}
Erros possiveis: 422 Validation Error
DELETE /api/customers/me
Delete My Account
Exemplo resposta (200):
{}
PUT /api/customers/me/password
Change My Password
Corpo do pedido:
| Campo | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| current_password | string | Sim | Current Password |
| new_password | string | Sim | New Password |
Exemplo pedido:
{
"current_password": "string",
"new_password": "string"
}
Exemplo resposta (200):
{}
Erros possiveis: 422 Validation Error
GET /api/customers/me/data-export
Export My Data
Exemplo resposta (200):
{}
GET /api/customers/me/preferences
Get My Preferences
Exemplo resposta (200):
{
"order_updates": true,
"promotions": true,
"newsletter": true
}
PUT /api/customers/me/preferences
Update My Preferences
Corpo do pedido:
| Campo | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| order_updates | boolean | Nao | Order Updates |
| promotions | boolean | Nao | Promotions |
| newsletter | boolean | Nao | Newsletter |
Exemplo pedido:
{
"order_updates": true,
"promotions": true,
"newsletter": true
}
Exemplo resposta (200):
{
"order_updates": true,
"promotions": true,
"newsletter": true
}
Erros possiveis: 422 Validation Error
GET /api/customers/analytics/overview
Customer Analytics
Exemplo resposta (200):
{
"total_customers": 0,
"new_this_month": 0,
"active_rate": 0,
"segments": {},
"top_customers": [
"..."
]
}
GET /api/customers/export
Export Customers Csv
Exemplo resposta (200):
{}
GET /api/customers
List Customers
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| page | integer | Nao | — |
| page_size | integer | Nao | — |
| search | string | Nao | — |
| segment | string | Nao | — |
Exemplo resposta (200):
{
"items": [
"..."
],
"total": 0,
"page": 0,
"page_size": 0,
"pages": 0
}
Erros possiveis: 422 Validation Error
GET /api/customers/{customer_id}
Get Customer
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| customer_id | integer | Sim | — |
Exemplo resposta (200):
{
"id": 0,
"email": "string",
"first_name": "string",
"last_name": "string",
"phone": null,
"is_active": true,
"email_verified": true,
"created_at": null,
"updated_at": null,
"stats": {
"total_orders": 0,
"total_spent": "string",
"avg_order_value": "string",
"first_order_date": null,
"last_order_date": null
},
"orders": [
"..."
],
"addresses": [
"..."
],
"segment": "string",
"admin_notes": null
}
Erros possiveis: 422 Validation Error
PUT /api/customers/{customer_id}
Update Customer
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| customer_id | integer | Sim | — |
Corpo do pedido:
| Campo | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| first_name | object | Nao | First Name |
| last_name | object | Nao | Last Name |
| phone | object | Nao | Phone |
| is_active | object | Nao | Is Active |
Exemplo pedido:
{
"first_name": null,
"last_name": null,
"phone": null,
"is_active": null
}
Exemplo resposta (200):
{
"id": 0,
"email": "string",
"first_name": "string",
"last_name": "string",
"phone": null,
"is_active": true,
"email_verified": true,
"created_at": null,
"updated_at": null
}
Erros possiveis: 422 Validation Error
PUT /api/customers/{user_id}/role
Update User Role
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| user_id | integer | Sim | — |
Corpo do pedido:
| Campo | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| role | string | Sim | Role |
Exemplo pedido:
{
"role": "string"
}
Exemplo resposta (200):
{
"id": 0,
"email": "string",
"first_name": "string",
"last_name": "string",
"role": "string"
}
Erros possiveis: 422 Validation Error
Documentacao gerada automaticamente.