ScheduledTask
Modelo ScheduledTask
{
"id": 1,
"type": "batch_good_import",
"priority": "high",
"payload": {
"file": "C:\\Users\\EdyJe\\Projects\\DonDemand\\DonDemandAPI\\storage\\tmp\\phpAA57.tmp-1597932080.csv",
"parameters": {
"mapping": {
"Codigo_sucursal": "branch_code",
"Codigo_de_barra": "sku",
"Nombre": "name",
"Descripcion": "details",
"Familia": "category",
"Existencia": "quantity",
"Precio_de_venta": "price",
"Unidad_de_medida": "unit"
}
},
"send_at": null,
"send_at_timezone": null,
"branch_group_id": 21,
"task_result": {
"status_code": 200,
"content": null
}
},
"status": "dispatched",
"dispatch_at": null,
"dispatched_at": "2020-08-20 14:03:39",
"aborted_at": null,
"created_at": "2020-08-20 14:01:20",
"updated_at": "2020-11-16 18:45:04",
"branch_id": null,
"branch_group_id": null
}
Listar ScheduledTask
{info} Soporta:
Paginación
Filters
Carga dinámica
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/scheduled-tasks |
Authorization |
Listar ScheduledTask de Branch
{info} Soporta:
Paginación
Filters
Carga dinámica
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/branches/{branchId}/scheduled-tasks |
Authorization |
Mostrar ScheduledTask
{info} Soporta:
Carga dinámica
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/scheduled-tasks/{scheduledTaskId} |
Authorization |
Acciones de ScheduledTask
Send
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/send-broadcast-message |
Authorization |
{
"title": "required|string|max:80",
"body": "required|string|max:200",
"target_type": "required|string|in:everyone,clients,providers,custom,email",
"target_ids": [
"integer"
],
"target_emails": [
"email"
],
"action_type": "string|in:branch_group,good,branch_category,category",
"action_id": "required_with:action_type|integer",
"image": "image|mimes:jpeg,png|max:1024|dimensions:width=1000,height=500",
"segmentation": [
{
"string": true,
"regex": "/^(geofence:[1-9][0-9]*)|(company_geofence:(inside|outside))(,(geofence:[1-9][0-9]*)|(company_geofence:(inside|outside)))*$/"
}
],
"send_at": "date|after:2021-08-18 13:58:37",
"send_at_timezone": {
"string": true,
"regex": "/^[\\+\\-]([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
}
}
Send
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/schedule-request |
Authorization |
{
"name": "required|string|max:64",
"url": "required|url|regex:#^http://127.0.0.1:8000/api/v\\d+/.*$#",
"method": "required|string|in:POST,PATCH,UPDATE,DELETE",
"content": "array",
"send_at": "required|date|after:2021-08-18 13:58:37",
"send_at_timezone": {
"string": true,
"regex": "/^[\\+\\-]([0-1][0-9]|2[0-3]):[0-5][0-9]$/"
}
}
Abort
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/scheduled-tasks/{scheduledTaskId}/abort |
Authorization |
Enlaces de ScheduledTask