Skip to main content

Retrieve Shop Settings

Retrieves the shop settings of the project

HTTP Request

GET/api/settings/shop

Authorization

Authorization

  • Required: Yes
  • Permission: Staff with ShopSettingsPermission or Admin
  • Permission Code: 1061
  • Authentication: Token authentication

Example Requests

1import requests
2
3# Retrieve blog settings
4response = requests.get('http://www.example.com/api/settings/shop', 
5  headers={'Authorization': 'Token <your_api_key>'}
6)
7print(response.json())

Response Fields

FieldTypeDescription
shop_nameStringShop name (nullable)
shop_timezoneStringThe standard timezone name of the shop (default: Asia/Tehran)
shop_opening_hourStringThe opening time of the shop in UTC (nullable)
shop_closing_hourStringThe closing time of the shop in UTC (nullable)
shop_maintenance_modeBooleanDefines if the shop is in maintenance mode (default: False)
shop_force_user_loginBooleanDefines 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

Shop Responses

  • Maintenance Mode
    • status code: 503
    • code: 100
{
"message": "Shop is currently in maintenance mode.",
"code": 100,
},
  • Shop Closed
    • status code: 503
    • code: 101
{ 
"message": "Shop is currently closed",
"code": 101,
}