Skip to content

Update user

PUT
/admin/users/{id}

Обновление пользователя (активность, роль администратора)

Authorizations

sessionCookie

PHP session cookie (HTTP-only, Secure, SameSite=Lax)

Type
API Key (cookie: PARTIZAP_SESSION)
+
csrfToken

CSRF token from CSRF_TOKEN cookie. Required on POST/PUT/PATCH/DELETE for
endpoints declaring csrfToken in their security block. Unauthenticated
session-establishment endpoints (login, register, forgot-password,
reset-password, validate-reset-token, admin login, admin TOTP verify) are
exempt — they declare security: [] and accept POST without a CSRF token.

Type
API Key (header: X-CSRF-TOKEN)

Parameters

Path Parameters

id*

User ID

Type
integer
Required

Request Body

application/json
JSON
{
  
"is_active": true,
  
"is_admin": true
}

Responses

User updated

application/json
JSON
{
  
"data": {
  
  
"id": 5,
  
  
"display_name": "BMW Parts Store",
  
  
"avatar_url": "https://s3.partizap.ru/avatars/5.webp",
  
  
"city_id": 0,
  
  
"rating": "4.85",
  
  
"reviews_count": 127,
  
  
"products_count": 342,
  
  
"created_at": "string",
  
  
"email": "string",
  
  
"phone": "+79991234567",
  
  
"account_type": "string",
  
  
"email_verified": true,
  
  
"district_id": 0,
  
  
"metro_station_id": 0,
  
  
"is_active": true,
  
  
"is_admin": true
  
}
}

Playground

Server
Authorization
Variables
Key
Value
Body

Samples

Powered by VitePress OpenAPI