Provider


Provider o rider. También agrupa a los Providers que prestan servicios.

Modelo Provider

{
    "id": 1,
    "name": "Jose Daniel",
    "display_name": "Jose Daniel",
    "email": "joseg2@manzanares.com.ve",
    "phone": "+04147851509",
    "avatar_url": "http://127.0.0.1:8000/storage/companies/46/avatar/avatar_4_1582721104.jpg",
    "status": 801,
    "rating_e2": 500,
    "rating_sum": 10,
    "rating_count": 2,
    "created_at": "2019-02-13 15:03:01",
    "updated_at": "2020-03-12 19:56:42",
    "deleted_at": null,
    "account_id": 4,
    "profile_data": {
        "profile_extract": "Delivery y Servicios"
    }
}

Insertar Provider

Método URI Cabeceras
POST /companies/{companyId}/providers Authorization
{
    "access_type": "required|string|in:company,branch",
    "access_id": "required|integer",
    "name": "required|max:64",
    "email": "required|email:rfc,filter",
    "phone": "required",
    "status": "integer",
    "profile_data": {
        "extract": "string|max:255",
        "languages": {
            "string": true,
            "max": "255",
            "regex": "/^\\w+(,\\w+)*$/"
        }
    }
}

Insertar GrantAccess

Método URI Cabeceras
POST /companies/{companyId}/providers/{providerId}/grant-access Authorization
{
    "access_type": "required|string|in:company,branch",
    "access_id": "required|integer"
}

Listar Provider

{info} Soporta: Paginación Filters Carga dinámica

Método URI Cabeceras
GET /companies/{companyId}/providers Authorization
{
    "access_type": "string|in:company,branch",
    "access_id": "required_with:access_type"
}

Listar Access

{info} Soporta: Paginación Filters Carga dinámica

Método URI Cabeceras
GET /companies/{companyId}/providers/{providerId}/accesses Authorization

Listar Provider de Order

Método URI Cabeceras
GET /companies/{companyId}/orders/{orderId}/providers Authorization

Mostrar Provider

{info} Soporta: Carga dinámica

Método URI Cabeceras
GET /companies/{companyId}/providers/{providerId} Authorization

Mostrar Statistic

Método URI Cabeceras
GET /companies/{companyId}/providers/{providerId}/statistics Authorization

Actualizar Provider

Método URI Cabeceras
PATCH /companies/{companyId}/providers/{providerId} Authorization
{
    "name": "max:64|person_name",
    "email": "email:rfc,filter",
    "phone": "",
    "latitude_e6": "integer",
    "longitude_e6": "integer",
    "status": "integer",
    "profile_data": {
        "extract": "string|max:255",
        "languages": {
            "string": true,
            "max": "255",
            "regex": "/^\\w+(,\\w+)*$/"
        }
    },
    "reported_at": "date"
}

Eliminar Provider

Eliminar RevokeAccess

Método URI Cabeceras
POST /companies/{companyId}/providers/{providerId}/revoke-access Authorization
{
    "access_type": "required|string|in:company,branch",
    "access_id": "required|integer"
}

Acciones de Provider

Upload Avatar

Método URI Cabeceras
POST /companies/{companyId}/providers/{providerId}/upload-avatar Authorization
{
    "avatar": "required|image|mimes:jpeg,png,bmp|max:2048|dimensions:ratio=1/1"
}

Set Online

Método URI Cabeceras
POST /companies/{companyId}/providers/{providerId}/set-online Authorization

Set Offline

Método URI Cabeceras
POST /companies/{companyId}/providers/{providerId}/set-offline Authorization

Enlaces de Provider