Fleet
Modelo Fleet
{
"id": 1,
"name": "General (Autogenerated)",
"is_enabled": true,
"passenger_capacity": 0,
"carry_capacity_kg": 1000,
"service_radius_m": 5000,
"service_distance_m": 25000,
"service_supplier_id": 1,
"owner_type": "App\Company",
"owner_id": 1,
"created_at": "2023-07-07 13:36:35",
"updated_at": "2024-09-27 20:16:01",
"config": null,
"pref_max_simultaneous_deliveries": 0,
"pref_allow_multi_delivery_by_self": false,
"pref_is_pet_allowed": false
}
Atributo |
Tipo |
Descripción |
id |
int |
- |
name |
string |
- |
is_enabled |
bool |
- |
passenger_capacity |
int |
- |
carry_capacity_kg |
int |
- |
service_radius_m |
int |
- |
service_distance_m |
int |
- |
service_supplier_id |
int |
- |
owner_type |
string |
- |
owner_id |
int |
- |
created_at |
datetime\|null |
- |
updated_at |
datetime\|null |
- |
pref_max_simultaneous_deliveries |
int |
BitMask ({@link self::preferences} & 0xf) |
pref_allow_multi_delivery_by_self |
bool |
BitMask (({@link self::preferences} & 0x10) !== 0) |
pref_is_pet_allowed |
bool |
BitMask (({@link self::preferences} & 0x20) !== 0) |
Insertar Fleet
Método |
URI |
Cabeceras |
POST |
/service-suppliers/{serviceSupplierId}/fleets |
Authorization |
{
"name": "required|string|max:255",
"passenger_capacity": "integer|min:0|max:255",
"carry_capacity_kg": "integer|min:0|max:4096",
"service_radius_m": "integer|min:0|max:100000",
"service_distance_m": "integer|min:0|max:100000",
"pref_max_simultaneous_deliveries": "nullable|integer|min:0|max:15",
"pref_allow_multi_delivery_by_self": "nullable|boolean",
"pref_is_pet_allowed": "nullable|boolean"
}
Mostrar Fleet
{info} Soporta:
Carga dinámica
Método |
URI |
Cabeceras |
GET |
/fleets/{fleetId} |
Authorization |
Actualizar Fleet
Método |
URI |
Cabeceras |
PATCH |
/fleets/{fleetId} |
Authorization |
{
"name": "string|max:255",
"passenger_capacity": "integer|min:0|max:255",
"carry_capacity_kg": "integer|min:0|max:4096",
"service_radius_m": "integer|min:0|max:100000",
"service_distance_m": "integer|min:0|max:100000",
"pref_max_simultaneous_deliveries": "nullable|integer|min:0|max:15",
"pref_allow_multi_delivery_by_self": "nullable|boolean",
"pref_is_pet_allowed": "nullable|boolean"
}
Eliminar Fleet
Método |
URI |
Cabeceras |
DELETE |
/fleets/{fleetId} |
Authorization |
Acciones de Fleet
Index For Service Supplier
{info} Soporta:
Paginación
Filters
Carga dinámica
Método |
URI |
Cabeceras |
GET |
/service-suppliers/{serviceSupplierId}/fleets |
Authorization |
Set Enabled
Método |
URI |
Cabeceras |
POST |
/fleets/{fleetId}/set-enabled |
Authorization |
Set Disabled
Método |
URI |
Cabeceras |
POST |
/fleets/{fleetId}/set-disabled |
Authorization |
Add Payment Method
Método |
URI |
Cabeceras |
PUT |
/fleets/{fleetId}/payment-methods |
Authorization |
{
"code": "required|string|max:16",
"name": "required|string|max:255|min:3",
"enabled": "nullable|boolean",
"currency_iso": "nullable|string|min:3|max:8",
"tax_flat_e2": "nullable|integer|min:0",
"tax_prc": "nullable|numeric|between:0.0000,1.0000",
"binding_attribute": {
"nullable": true,
"string": true,
"in": "providers:pos_serial"
}
}
Update Payment Method
Método |
URI |
Cabeceras |
PATCH |
/fleets/{fleetId}/payment-methods |
Authorization |
{
"code": "required|string|max:16",
"name": "nullable|string|max:255|min:3",
"enabled": "nullable|boolean",
"currency_iso": "nullable|string|min:3|max:8",
"tax_flat_e2": "nullable|integer|min:0",
"tax_prc": "nullable|numeric|between:0.0000,1.0000",
"binding_attribute": {
"nullable": true,
"string": true,
"in": "providers:pos_serial"
}
}
Destroy Payment Method
Método |
URI |
Cabeceras |
DELETE |
/fleets/{fleetId}/payment-methods |
Authorization |
{
"code": "required|string|max:16"
}
Enlaces de Fleet