Company
Representa a una compañía o negocio en particular, con sus productos y servicios, sus clientes,
y sus configuraciones independientes.
Modelo Company
{
"id": 3,
"name": "Zen Manzanares",
"email": "maria.ortiz@manzanares.com.ve",
"domain": "zen",
"custom_domain": null,
"expires_at": "2020-12-26 12:30:31",
"extension_days": 0,
"options": 1778594099,
"plan": 2147483647,
"enabled": true,
"strings_json": {
"strings": [],
"version": 1
},
"styles_json": {
"styles": {
"color_primary": "/docs/3/company#fafafa",
"color_accent": "/docs/3/company#af52af",
"company_logo": "https://ondemand-api.manzanares.com.ve/storage/companies/46/logo.png"
},
"version": 195
},
"default_iso_lang": "es",
"created_at": "2019-02-13 14:53:13",
"updated_at": "2020-03-09 17:57:58",
"deleted_at": null,
"country_iso": "ve",
"time_zone_offset": "-04:00",
"settings": {
"uid": "J-20574803-7",
"slogan": "¡Amor en cada mordisco!",
"mail_footer": "¡Saludos!",
"max_scheduling_days": 15,
"delivery_fee_e2": 0,
"delivery_providers_prc": 0,
"pay_in_store": true,
"enable_work_schedules": true,
"auto_sync_work_schedules": true,
"enable_invoices": true,
"enable_multi_providers": true,
"enable_phone_login": false,
"enable_coupons": true,
"invoice_next_number": 2,
"contact_phone": null,
"contact_phone_whatsapp": null,
"disable_balance": true,
"is_marketplace": false,
"human_delivery_fee_e2": 0,
"human_delivery_providers_prc": 0
}
}
Insertar Company
Método |
URI |
Cabeceras |
POST |
/companies |
Authorization |
{
"company": {
"name": "required|max:64",
"domain": "required|max:32|domain",
"custom_domain": "max:255|url",
"email": "required|email:rfc,filter|max:64",
"folder_name": "required|string",
"options": "numeric",
"plan": "numeric",
"default_iso_lang": "string|size:2",
"country_iso": "max:2|string",
"time_zone_offset": {
"string": true,
"regex": "/^[\\+\\-]([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
}
},
"user": {
"name": "required|max:64",
"email": "required|email:rfc,filter",
"phone": "required"
}
}
Listar Company
{info} Soporta:
Filters
Carga dinámica
Paginación
Método |
URI |
Cabeceras |
GET |
/companies |
Authorization |
Listar Setting
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/settings |
Authorization |
Mostrar Company
Mostrar Domain
{info} Soporta:
Carga dinámica
Método |
URI |
Cabeceras |
GET |
/companies/domain/{domain} |
N/A |
{
"updated_at": "date"
}
Mostrar Domain
{info} Soporta:
Carga dinámica
Método |
URI |
Cabeceras |
GET |
/companies/domain/{domain} |
N/A |
{
"updated_at": "date"
}
Mostrar TermsOfService
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/terms-of-service |
N/A |
Mostrar Branch DayTime
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/branches/{branchId}/day-time |
N/A |
{
"updated_at": "date"
}
Mostrar Branch DayTime
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/branches/{branchId}/day-time |
N/A |
{
"updated_at": "date"
}
Actualizar Company
Método |
URI |
Cabeceras |
PATCH |
/companies/{companyId} |
Authorization |
{
"name": "max:64",
"domain": "max:32|domain",
"custom_domain": "max:255|url",
"email": "email:rfc,filter|max:64",
"folder_name": "string",
"options": "numeric",
"plan": "numeric",
"default_iso_lang": "string|size:2",
"country_iso": "max:2|string",
"time_zone_offset": {
"string": true,
"regex": "/^[\\+\\-]([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
},
"custom_json": {
"subscription": "array"
}
}
Actualizar Setting
Método |
URI |
Cabeceras |
PATCH |
/companies/{companyId}/settings |
Authorization |
{
"uid": "string|max:64",
"slogan": "string|max:80",
"mail_footer": "string|max:255",
"max_scheduling_days": "integer|min:0|max:365",
"delivery_providers_prc": "numeric|between:0.0000,1.0000",
"human_delivery_providers_prc": "numeric|between:0.00,100.00",
"pay_in_store": "boolean",
"enable_work_schedules": "boolean",
"auto_sync_work_schedules": "boolean",
"enable_multi_providers": "boolean",
"enable_invoices": "boolean",
"enable_phone_login": "boolean",
"enable_coupons": "boolean",
"invoice_format": {
"head": "required_with:invoice_format|string",
"body": "required_with:invoice_format|string",
"item": "required_with:invoice_format|string",
"date_format": "required_with:invoice_format|string",
"paper": "required_with:invoice_format|string|max:32",
"orientation": "required_with:invoice_format|string|in:portrait,landscape"
},
"invoice_next_number": "integer|min:1",
"terms_of_service": "string",
"nearby_branches_distance": "integer|min:1000",
"nearby_providers_distance": "integer|min:1000",
"min_nearby_branches_count": "integer|min:1",
"max_nearby_branches_count": "integer|min:1|gte:min_nearby_branches_count",
"subcategories_count": "integer|min:1",
"assignable_orders_mask": "integer|min:0",
"order_expiration_minutes": "integer|min:0",
"cancel_on_payment_failure": "boolean",
"contact_phone": "string|max:32",
"contact_phone_whatsapp": "string|max:32",
"disable_reports": "boolean",
"default_promoted_banner": "image|mimes:jpeg,png|max:8192",
"service_app_to_full_amount": "boolean",
"disable_balance": "boolean",
"sms_providers": "array",
"sms_notifications_enabled": "boolean",
"sms_expiration_in_minutes": "integer|min:2",
"sms_cooldown_in_seconds": "integer|min:15",
"sms_enabled_for_clients_tracking": "boolean",
"delivery_fee_steps": [
{
"name": "required|string|max:32",
"label": "string|max:32",
"is_additional": "boolean",
"distance_min": "required|integer|min:0",
"distance_max": "required|integer|min:-1",
"fee_min_e2": "integer|min:0",
"human_fee_min_e2": "numeric|min:0.0",
"fee_max_e2": "integer|min:0",
"human_fee_max_e2": "numeric|min:0.0",
"delivery_providers_prc": "numeric|between:0.0000,1.0000",
"human_delivery_providers_prc": "numeric|between:0.00,100.00",
"hour_beg": {
"string": true,
"regex": "/^([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
},
"hour_end": {
"string": true,
"regex": "/^([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
}
}
],
"service_app_modifiers": [
{
"name": "required|string|max:32",
"label": "string|max:32",
"price_min_e2": "integer|min:0",
"human_price_min_e2": "numeric|min:0.0",
"price_max_e2": "integer|min:0",
"human_price_max_e2": "numeric|min:0.0",
"order_fee_e2": "integer|min:0",
"human_order_fee_e2": "numeric|min:0.0",
"client_fee_e2": "integer|min:0",
"human_client_fee_e2": "numeric|min:0.0",
"hour_beg": {
"string": true,
"regex": "/^([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
},
"hour_end": {
"string": true,
"regex": "/^([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
}
}
],
"sms_default_provider": "string|in:interconectados,plivo,twilio,twilio_whatsapp",
"sms_login_provider": "string|in:interconectados,plivo,twilio,twilio_whatsapp"
}
Actualizar Setting
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/settings |
Authorization |
{
"uid": "string|max:64",
"slogan": "string|max:80",
"mail_footer": "string|max:255",
"max_scheduling_days": "integer|min:0|max:365",
"delivery_providers_prc": "numeric|between:0.0000,1.0000",
"human_delivery_providers_prc": "numeric|between:0.00,100.00",
"pay_in_store": "boolean",
"enable_work_schedules": "boolean",
"auto_sync_work_schedules": "boolean",
"enable_multi_providers": "boolean",
"enable_invoices": "boolean",
"enable_phone_login": "boolean",
"enable_coupons": "boolean",
"invoice_format": {
"head": "required_with:invoice_format|string",
"body": "required_with:invoice_format|string",
"item": "required_with:invoice_format|string",
"date_format": "required_with:invoice_format|string",
"paper": "required_with:invoice_format|string|max:32",
"orientation": "required_with:invoice_format|string|in:portrait,landscape"
},
"invoice_next_number": "integer|min:1",
"terms_of_service": "string",
"nearby_branches_distance": "integer|min:1000",
"nearby_providers_distance": "integer|min:1000",
"min_nearby_branches_count": "integer|min:1",
"max_nearby_branches_count": "integer|min:1|gte:min_nearby_branches_count",
"subcategories_count": "integer|min:1",
"assignable_orders_mask": "integer|min:0",
"order_expiration_minutes": "integer|min:0",
"cancel_on_payment_failure": "boolean",
"contact_phone": "string|max:32",
"contact_phone_whatsapp": "string|max:32",
"disable_reports": "boolean",
"default_promoted_banner": "image|mimes:jpeg,png|max:8192",
"service_app_to_full_amount": "boolean",
"disable_balance": "boolean",
"sms_providers": "array",
"sms_notifications_enabled": "boolean",
"sms_expiration_in_minutes": "integer|min:2",
"sms_cooldown_in_seconds": "integer|min:15",
"sms_enabled_for_clients_tracking": "boolean",
"delivery_fee_steps": [
{
"name": "required|string|max:32",
"label": "string|max:32",
"is_additional": "boolean",
"distance_min": "required|integer|min:0",
"distance_max": "required|integer|min:-1",
"fee_min_e2": "integer|min:0",
"human_fee_min_e2": "numeric|min:0.0",
"fee_max_e2": "integer|min:0",
"human_fee_max_e2": "numeric|min:0.0",
"delivery_providers_prc": "numeric|between:0.0000,1.0000",
"human_delivery_providers_prc": "numeric|between:0.00,100.00",
"hour_beg": {
"string": true,
"regex": "/^([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
},
"hour_end": {
"string": true,
"regex": "/^([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
}
}
],
"service_app_modifiers": [
{
"name": "required|string|max:32",
"label": "string|max:32",
"price_min_e2": "integer|min:0",
"human_price_min_e2": "numeric|min:0.0",
"price_max_e2": "integer|min:0",
"human_price_max_e2": "numeric|min:0.0",
"order_fee_e2": "integer|min:0",
"human_order_fee_e2": "numeric|min:0.0",
"client_fee_e2": "integer|min:0",
"human_client_fee_e2": "numeric|min:0.0",
"hour_beg": {
"string": true,
"regex": "/^([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
},
"hour_end": {
"string": true,
"regex": "/^([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
}
}
],
"sms_default_provider": "string|in:interconectados,plivo,twilio,twilio_whatsapp",
"sms_login_provider": "string|in:interconectados,plivo,twilio,twilio_whatsapp"
}
Eliminar Company
Método |
URI |
Cabeceras |
DELETE |
/companies/{companyId} |
Authorization |
Restaurar Company
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/restore |
Authorization |
Acciones de Company
Resolve
{info} Soporta:
Carga dinámica
Método |
URI |
Cabeceras |
GET |
/domains/{domainToResolve} |
N/A |
Show Domain
{info} Soporta:
Carga dinámica
Método |
URI |
Cabeceras |
GET |
/branches/domain/{domainName} |
N/A |
Show Domain
{info} Soporta:
Carga dinámica
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/branch-groups/domain/{domainName} |
N/A |
Update Styles
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/styles |
Authorization |
{
"color_primary": {
"string": true,
"regex": "/^#(?:[0-9a-fA-F]{3}){1,2}$/"
},
"color_accent": {
"string": true,
"regex": "/^#(?:[0-9a-fA-F]{3}){1,2}$/"
},
"company_logo": "image|mimes:jpeg,png|max:1024"
}
Index Allowed
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/allowed-settings |
Authorization |
Get
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/branches/{branchId}/delivery-fee |
Authorization |
{
"latitude_e6": "required|integer",
"longitude_e6": "required|integer",
"subtotal_e2": "integer|min:0",
"subtotal_full_e2": "integer|min:0",
"base_price_e2": "integer|min:0",
"time": {
"string": true,
"regex": "/^([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
}
}
Calculate
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/branches/{branchId}/calculate-fees |
Authorization |
{
"latitude_e6": "required|integer",
"longitude_e6": "required|integer",
"subtotal_e2": "integer|min:0",
"subtotal_full_e2": "integer|min:0",
"base_price_e2": "integer|min:0",
"time": {
"string": true,
"regex": "/^([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
}
}
Enlaces de Company