Update Shop Settings
Updates the shop settings of the project
HTTP Request
PATCH/api/settings/shop
Authorization
Authorization
- Required: Yes
- Permission: Staff with ShopSettingsPermission or Admin
- Permission Code: 1062
- Authentication: Token authentication
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| shop_name | String | No | Shop name (nullable) |
| shop_timezone | String | No | The standard timezone name of the shop (default: Asia/Tehran) |
| shop_opening_hour | String | No | The opening time of the shop in UTC (nullable) |
| shop_closing_hour | String | No | The closing time of the shop in UTC (nullable) |
| shop_maintenance_mode | Boolean | No | Defines if the shop is in maintenance mode (default: False) |
| shop_force_user_login | Boolean | No | Defines if authentication is required for shop customers (default: False) |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3# Update blog settings
4response = requests.patch('http://www.example.com/api/settings/shop',
5 headers={'Authorization': 'Token <your_api_key>'},
6 json={
7 "shop_name": "test store",
8 "shop_opening_hour": "08:30"
9 }
10)
11print(response.json())1# Update blog settings
2curl "http://www.example.com/api/settings/blog" -H "Authorization: Token <your_api_key>" -X PATCH -d '{
3 "shop_name": "test store",
4 "shop_opening_hour": "08:30"
5}'Response Fields
| Field | Type | Description |
|---|---|---|
| shop_name | String | Shop name (nullable) |
| shop_timezone | String | The standard timezone name of the shop (default: Asia/Tehran) |
| shop_opening_hour | String | The opening time of the shop in UTC (nullable) |
| shop_closing_hour | String | The closing time of the shop in UTC (nullable) |
| shop_maintenance_mode | Boolean | Defines if the shop is in maintenance mode (default: False) |
| shop_force_user_login | Boolean | Defines if authentication is required for shop customers (default: False) |
Example Response
{
"shop_name": "vitrin store",
"shop_timezone": "Asia/Tehran",
"shop_opening_hour": "08:00:00",
"shop_closing_hour": null,
"shop_maintenance_mode": false,
"shop_force_user_login": false
}
Notes
- shop timezone should be selected from a standard timezone name like 'Asia/Tehran'
- shop opening and closing hours are both optional
- if only opening hour is provided, the shop endpoints will be available at times greater than the opening hour
- if only closing hour is provided, the shop endpoints will be available at times smaller than the closing hour
- the opening and closing hours MUST be in utc
- when shop maintenance mode is true, there will be no access to the shop endpoints
- shop force user login parameter, limits the shop endpoints to the authenticated users