النشاط التجاري
نقاط النهاية للحصول على معلومات النشاط التجاري.
GET
/api/v1/negocio/
يحصل على المعلومات العامة للنشاط التجاري.
الرؤوس المطلوبة
| Header | القيمة |
|---|---|
X-API-Key |
مفتاح API الخاص بك |
مثال على الطلب
cURL
curl -X GET "https://app.salonbookit.com/api/v1/negocio/" \
-H "X-API-Key: hh_pub_live_abc123..."
الاستجابة (200 OK)
JSON
{
"success": true,
"data": {
"id": "uuid-del-tenant",
"nombre": "Hello Hair Men's Salon",
"descripcion": "Barbería premium en el centro de Alicante",
"email": "info@hellohair.com",
"telefono": "+34612345678",
"direccion": {
"calle": "Calle Principal 123",
"ciudad": "Alicante",
"codigo_postal": "03001",
"pais": "ES"
},
"coordenadas": {
"lat": 38.3452,
"lng": -0.4815
},
"logo_url": "https://app.salonbookit.com/media/logos/hellohair.png",
"imagen_portada_url": "https://app.salonbookit.com/media/portadas/hellohair.jpg",
"redes_sociales": {
"instagram": "hellohairalicante",
"facebook": "hellohairmen",
"website": "https://hellohair.com"
},
"configuracion": {
"moneda": "EUR",
"simbolo_moneda": "€",
"timezone": "Europe/Madrid",
"idioma_principal": "es",
"acepta_pagos_online": true,
"requiere_pago_anticipado": false,
"tiempo_cancelacion_horas": 24,
"puntos_activo": true
},
"estadisticas": {
"servicios_count": 12,
"profesionales_count": 5,
"valoracion_media": 4.8,
"total_resenas": 156
}
}
}
حقول الاستجابة
| الحقل | النوع | الوصف |
|---|---|---|
id |
string | المعرف الفريد للنشاط التجاري |
nombre |
string | الاسم التجاري |
descripcion |
string | وصف النشاط التجاري |
email |
string | بريد الاتصال الإلكتروني |
telefono |
string | الهاتف بالتنسيق الدولي |
direccion |
object | العنوان الفعلي للنشاط التجاري |
coordenadas |
object | خط العرض وخط الطول للخرائط |
configuracion |
object | إعدادات الحجوزات والمدفوعات |
estadisticas |
object | العدادات والتقييمات |
GET
/api/v1/negocio/horarios/
يحصل على ساعات عمل النشاط التجاري.
مثال على الطلب
cURL
curl -X GET "https://app.salonbookit.com/api/v1/negocio/horarios/" \
-H "X-API-Key: hh_pub_live_abc123..."
الاستجابة (200 OK)
JSON
{
"success": true,
"data": {
"horarios": [
{
"dia": 1,
"dia_nombre": "Lunes",
"abierto": true,
"apertura": "09:00",
"cierre": "20:00",
"descanso_inicio": "14:00",
"descanso_fin": "16:00"
},
{
"dia": 2,
"dia_nombre": "Martes",
"abierto": true,
"apertura": "09:00",
"cierre": "20:00",
"descanso_inicio": null,
"descanso_fin": null
},
// ... بقية الأيام
{
"dia": 7,
"dia_nombre": "Domingo",
"abierto": false,
"apertura": null,
"cierre": null,
"descanso_inicio": null,
"descanso_fin": null
}
],
"timezone": "Europe/Madrid"
}
}
حقول الاستجابة
| الحقل | النوع | الوصف |
|---|---|---|
dia |
integer | يوم الأسبوع (1=الاثنين، 7=الأحد) |
dia_nombre |
string | اسم اليوم |
abierto |
boolean | إذا كان النشاط التجاري مفتوحاً في ذلك اليوم |
apertura |
string|null | وقت الفتح (HH:MM) |
cierre |
string|null | وقت الإغلاق (HH:MM) |
descanso_inicio |
string|null | بداية الاستراحة (HH:MM) |
descanso_fin |
string|null | نهاية الاستراحة (HH:MM) |
GET
/api/v1/negocio/festivos/
يحصل على أيام العطل أو الإغلاق الخاص.
معلمات الاستعلام
| المعامل | النوع | الوصف |
|---|---|---|
desde |
string | تاريخ البدء (YYYY-MM-DD). الافتراضي: اليوم |
hasta |
string | تاريخ النهاية (YYYY-MM-DD). الافتراضي: +3 أشهر |
مثال على الطلب
cURL
curl -X GET "https://app.salonbookit.com/api/v1/negocio/festivos/?desde=2024-01-01&hasta=2024-12-31" \
-H "X-API-Key: hh_pub_live_abc123..."
الاستجابة (200 OK)
JSON
{
"success": true,
"data": {
"festivos": [
{
"fecha": "2024-01-01",
"motivo": "Año Nuevo",
"todo_el_dia": true
},
{
"fecha": "2024-01-06",
"motivo": "Reyes Magos",
"todo_el_dia": true
},
{
"fecha": "2024-08-15",
"motivo": "Vacaciones de verano",
"todo_el_dia": true
},
{
"fecha": "2024-12-25",
"motivo": "Navidad",
"todo_el_dia": true
}
]
}
}