Update Country
Update an existing country. Requires authentication.
Endpoint
Authentication
Required
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer | Yes | Country ID |
Request Body
Form data (multipart/form-data):
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | No | Country name (optional, only updates if provided) |
Response
Success (200 OK)
Error Responses
Not Found (404)
Missing ID Parameter (400)
Unauthorized (401)
Internal Server Error (500)
Example Request
curl -X PUT "https://api.luxmart.site/v1/accounts/country/?id=1" \
-H "Authorization: Token your_access_token" \
-F "name=Azerbaijan"
Notes
- Only updates fields that are provided in the request
- The
namefield is optional - if not provided, it remains unchanged - The
updatedtimestamp is automatically set by the system - Returns 404 if country is not found or has been deleted