Admin
Representa a un Admin de una Company.
Modelo Admin
{
"id": 2,
"name": "Maria Ortiz",
"display_name": "Maria Ortiz",
"email": "maria.ortiz@manzanares.com.ve",
"phone": "04120819113",
"avatar_url": "http://127.0.0.1:8000/storage/companies/46/avatar/avatar_2_1581965927.jpg",
"status": 0,
"created_at": "2019-02-13 14:53:13",
"updated_at": "2020-03-10 20:34:57",
"deleted_at": null,
"account_id": 2,
"admin_type_id": null,
"settings": {
"preferences": {
"audible_notifications": {
"branch_in_service": "on",
"order_new": "off",
"payment_new": "off",
"order_being_prepared": "on",
"order_accepted": "on",
"order_prepared": "on",
"liver_arrived": "on",
"liver_in_commerce": "on",
"liver_on_the_way": "on",
"order_arrived": "off",
"order_delivered": "off",
"order_canceled": "off"
}
}
}
}
Insertar Admin
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/admins |
Authorization |
{
"name": "required|max:64",
"email": "required|email:rfc,filter",
"phone": "required|string|min:9",
"password": "string"
}
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/branch-groups/{branchGroupId}/admins |
Authorization |
{
"name": "required|max:64",
"email": "required|email:rfc,filter",
"phone": "required|string|min:9",
"password": "string"
}
Insertar Admin de Branch
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/branches/{branchId}/admins |
Authorization |
{
"name": "required|max:64",
"email": "required|email:rfc,filter",
"phone": "required|string|min:9",
"password": "string"
}
Listar Admin
{info} Soporta:
Paginación
Filters
Carga dinámica
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/admins |
Authorization |
Listar Admin de Client
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/clients/{clientId}/admins |
Authorization |
Listar Setting
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/admins/{adminId}/settings |
Authorization |
Mostrar Admin
{info} Soporta:
Carga dinámica
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/admins/{adminId} |
Authorization |
Actualizar Admin
Método |
URI |
Cabeceras |
PATCH |
/companies/{companyId}/admins/{adminId} |
Authorization |
{
"name": "max:64",
"phone": ""
}
Actualizar Setting
Método |
URI |
Cabeceras |
PATCH |
/companies/{companyId}/admins/{adminId}/settings |
Authorization |
{
"enable_sms": "boolean",
"enable_order_created_sms": "boolean",
"enable_payment_registered_sms": "boolean",
"enable_manual_payment_reported_sms": "boolean",
"enable_order_canceled_sms": "boolean",
"enable_support_sms": "boolean",
"preferences": "array"
}
Vincular Admin
Vincular AdminType
Método |
URI |
Cabeceras |
PUT |
/companies/{companyId}/admins/{adminId}/admin-types/{adminTypeId} |
Authorization |
Desvincular Admin
Desvincular AdminType
Método |
URI |
Cabeceras |
DELETE |
/companies/{companyId}/admins/{adminId}/admin-types/{adminTypeId} |
Authorization |
Sincronizar Admin
Sincronizar Admin de Client
Método |
URI |
Cabeceras |
PUT |
/companies/{companyId}/clients/{clientId}/admins |
Authorization |
[
"integer"
]
Acciones de Admin
Upload Avatar
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/admins/{adminId}/upload-avatar |
Authorization |
{
"avatar": "required|image|mimes:jpeg,png,bmp|max:2048|dimensions:ratio=1/1"
}
Upgrade
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/admins/{adminId}/upgrade |
Authorization |
Downgrade
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/admins/{adminId}/downgrade |
Authorization |
Set Online
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/admins/{adminId}/set-online |
Authorization |
Set Offline
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/admins/{adminId}/set-offline |
Authorization |
Set Main
Cambiar Admin Principal de un Cliente
Cuando un Cliente crea una Orden, La orden es asociada a su Admin
Principal, quien puede hacer seguimiento de la Orden y adquirir
comisiones.
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/clients/{clientId}/admins/{adminId}/set-main |
Authorization |
Index Allowed
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/admins/{adminId}/allowed-settings |
Authorization |
Enlaces de Admin