Plan


{warning} Funcionalidad de planes de suscripción paralizada y sin continuidad. No usar; los recursos plans, plan-features y plan-prices se conservan solo por compatibilidad y se retirarán.

Plan de suscripción asignable a una Company: enabled lo activa internamente, published lo hace visible al público (requiere al menos un PlanPrice), enable_at / disable_at acotan su ventana de disponibilidad y trial_days son los días de prueba.

Estructura de Datos

Atributo Tipo Descripción
id int
name string Nombre del plan
enabled bool Si el plan está activo internamente
published bool Si el plan es visible al público (requiere al menos un precio)
description string Descripción del plan
trial_days int Días de prueba del plan
image_url string\|null URL de la imagen del plan
image_landscape_url string\|null URL de la imagen apaisada del plan
enable_at datetime\|null Inicio de la ventana de disponibilidad
disable_at datetime\|null Fin de la ventana de disponibilidad
created_at datetime\|null
updated_at datetime\|null
allLogs ApiLog>
attachedFeatures PlanFeature> Features configuradas del plan ({@link PlanFeature})
companyPlans CompanyPlan> Asignaciones del plan a companies
editable_features mixed Vista editable de las features del plan
features array Features del plan combinadas con sus valores por defecto
logs ApiLog>
prices PlanPrice> Precios del plan por período ({@link PlanPrice})
{
    "id": 1,
    "name": "DonDemand Unlimited",
    "enabled": true,
    "published": false,
    "description": "This plan never expires and all features are available",
    "trial_days": 0,
    "image_url": null,
    "image_landscape_url": null,
    "enable_at": null,
    "disable_at": null,
    "created_at": "2020-04-17 01:07:50",
    "updated_at": "2020-04-17 01:07:50",
    "features": [
        {
            "key": "limit_orders_saved",
            "type": "integer",
            "value": 0,
            "can_overflow": false,
            "overflow_cost_e2": 0
        },
        {
            "key": "limit_admins_count",
            "type": "integer",
            "value": 1,
            "can_overflow": false,
            "overflow_cost_e2": 0
        },
        {
            "key": "allow_work_schedules",
            "type": "boolean",
            "value": false,
            "can_overflow": false,
            "overflow_cost_e2": 0
        },
        {
            "key": "allow_push_notifications",
            "type": "boolean",
            "value": false,
            "can_overflow": false,
            "overflow_cost_e2": 0
        },
        {
            "key": "limit_providers_count",
            "type": "integer",
            "value": 0,
            "can_overflow": false,
            "overflow_cost_e2": 0
        },
        {
            "key": "allow_routes",
            "type": "boolean",
            "value": false,
            "can_overflow": false,
            "overflow_cost_e2": 0
        },
        {
            "key": "limit_delivery_proofs_count",
            "type": "integer",
            "value": 0,
            "can_overflow": false,
            "overflow_cost_e2": 0
        },
        {
            "key": "limit_storage_mb_size",
            "type": "integer",
            "value": 100,
            "can_overflow": false,
            "overflow_cost_e2": 0
        },
        {
            "key": "allow_ratings",
            "type": "boolean",
            "value": false,
            "can_overflow": false,
            "overflow_cost_e2": 0
        },
        {
            "key": "limit_data_storage_days",
            "type": "integer",
            "value": 7,
            "can_overflow": false,
            "overflow_cost_e2": 0
        },
        {
            "key": "limit_categories_count",
            "type": "integer",
            "value": 5,
            "can_overflow": false,
            "overflow_cost_e2": 0
        },
        {
            "key": "limit_goods_count",
            "type": "integer",
            "value": 15,
            "can_overflow": false,
            "overflow_cost_e2": 0
        },
        {
            "key": "limit_allowed_plan_mask",
            "type": "integer",
            "value": 0,
            "can_overflow": false,
            "overflow_cost_e2": 0
        },
        {
            "key": "limit_third_p_integration_count",
            "type": "integer",
            "value": 0,
            "can_overflow": false,
            "overflow_cost_e2": 0
        },
        {
            "key": "limit_payment_methods_count",
            "type": "integer",
            "value": 1,
            "can_overflow": false,
            "overflow_cost_e2": 0
        }
    ],
    "attached_features": []
}

Endpoints

Insertar Plan

Método URI Cabeceras
POST /plans Authorization
{
    "name": "required|string|max:32",
    "enabled": "boolean",
    "published": "boolean",
    "description": "required|string",
    "trial_days": "integer|min:0",
    "enable_at": "date|after:today",
    "disable_at": "date|after:tomorrow"
}

Listar Plan

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

Método URI Cabeceras
GET /plans N/A

Mostrar Plan

{info} Soporta: Carga dinámica

Método URI Cabeceras
GET /plans/{planId} N/A

Actualizar Plan

Método URI Cabeceras
PATCH /plans/{planId} Authorization
{
    "name": "string|max:32",
    "enabled": "boolean",
    "published": "boolean",
    "description": "string",
    "trial_days": "integer|min:0",
    "enable_at": "date|after:today",
    "disable_at": "date|after:tomorrow"
}

Eliminar Plan

Método URI Cabeceras
DELETE /plans/{planId} Authorization

Relaciones