interface OnfleetNodeParameters {
additionalFields?:
| { isReadOnly?: boolean; phone?: string }
| {
addressApartment?: string;
addressName?: string;
addressNotes?: string;
}
| {
addressApartment?: string;
addressName?: string;
addressNotes?: string;
addressPostalCode?: string;
}
| { teams?: unknown[] }
| {
recipientNotes?: string;
recipientSkipSMSNotifications?: boolean;
}
| { notes?: string }
| {
completeAfter?: string;
completeBefore?: string;
executor?: string;
merchant?: string;
notes?: string;
pickupTask?: boolean;
quantity?: number;
recipient?: {
recipientProperties: {
recipientName: string;
recipientNotes?: string;
recipientPhone: string;
recipientSkipSMSNotifications?: boolean;
};
};
recipientName?: string;
recipientNotes?: string;
recipientSkipSMSNotifications?: boolean;
serviceTime?: number;
useMerchantForProxy?: boolean;
}
| { enableSelfAssignment?: boolean; hub?: string }
| {
endingRoute?: {
endingRouteProperties: {
hub?: string;
routeEnd:
| "hub"
| "team_hub"
| "worker_routing_address"
| "anywhere";
};
};
maxAllowedDelay?: number;
maxTasksPerRoute?: number;
scheduleTimeWindow?: {
scheduleTimeWindowProperties: {
endTime?: string;
startTime?: string;
};
};
serviceTime?: number;
taskTimeWindow?: {
taskTimeWindowProperties: {
endTime?: string;
startTime?: string;
};
};
}
| {
capacity?: number;
displayName?: string;
vehicle?: {
vehicleProperties: {
color?: string;
description?: string;
licensePlate?: string;
type: "BICYCLE"
| "CAR"
| "MOTORCYCLE"
| "TRUCK";
};
};
};
address?: string;
addressCity?: string;
addressCountry?: string;
addressNumber?: string;
addressStreet?: string;
byLocation?: boolean;
containerId?: string;
containerType?: "organizations"
| "teams"
| "workers";
destination?: {
destinationProperties: {
address: string;
addressApartment?: string;
addressCity: string;
addressCountry: string;
addressName?: string;
addressNotes?: string;
addressNumber: string;
addressPostalCode?: string;
addressState: string;
addressStreet: string;
unparsed?: boolean;
};
};
email?: string;
filters?: | {
from?: string;
state?: (0 | 1 | 3 | 2 | "all")[];
to?: string;
}
| {
dropOff?: {
dropOffProperties: {
dropOffLatitude: number;
dropOffLongitude: number;
};
};
pickUp?: {
pickUpProperties: {
pickupLatitude: number;
pickupLongitude: number;
pickupTime?: string;
};
};
restrictedVehicleTypes?: | "BICYCLE"
| "CAR"
| "MOTORCYCLE"
| "TRUCK";
serviceTime?: number;
}
| { radius?: number }
| {
phones?: string;
states?: (0 | 1 | 2)[];
teams?: unknown[];
};
getBy?: "id"
| "name"
| "phone";
id?: string;
index?: number;
latitude?: number;
limit?: number;
longitude?: number;
managers?: unknown[];
name?: string;
operation?:
| "create"
| "get"
| "getAll"
| "update"
| "delete"
| "complete"
| "clone"
| "addTask"
| "updateTask"
| "getDelegatee"
| "autoDispatch"
| "getTimeEstimates"
| "getSchedule";
options?: | { considerDependencies?: boolean }
| { recipientSkipPhoneNumberValidation?: boolean }
| {
filter?: (
| "id"
| "organization"
| "name"
| "metadata"
| "imageUrl"
| "phone"
| "location"
| "displayName"
| "teams"
| "accountStatus"
| "activeTask"
| "capacity"
| "delayTime"
| "onDuty"
| "tasks"
| "timeCreated"
| "timeLastModified"
| "timeLastSeen"
| "userData"
| "vehicle"
)[];
}
| {
analytics?: boolean;
filter?: (
| "id"
| "organization"
| "name"
| "metadata"
| "imageUrl"
| "phone"
| "location"
| "displayName"
| "teams"
| "accountStatus"
| "activeTask"
| "capacity"
| "delayTime"
| "onDuty"
| "tasks"
| "timeCreated"
| "timeLastModified"
| "timeLastSeen"
| "userData"
| "vehicle"
)[];
};
overrideFields?: {
completeAfter?: string;
completeBefore?: string;
includeBarcodes?: boolean;
includeDependencies?: boolean;
includeMetadata?: boolean;
notes?: string;
pickupTask?: boolean;
serviceTime?: number;
};
phone?: string;
recipientName?: string;
recipientPhone?: string;
resource?: | "admin"
| "organization"
| "task"
| "container"
| "team"
| "destination"
| "hub"
| "recipient"
| "worker";
returnAll?: boolean;
schedule?: {
scheduleProperties: {
date: string;
shifts?: {
shiftsProperties: { end: string; start: string }[];
};
timezone: string;
}[];
};
success?: boolean;
tasks?: string;
teams?: unknown[];
type?: 0
| 1
| -1;
unparsed?: boolean;
updateFields?:
| {
isReadOnly?: boolean;
name?: string;
phone?: string;
}
| {
destination?: {
destinationProperties: {
address: string;
addressApartment?: string;
addressCity: string;
addressCountry: string;
addressName?: string;
addressNotes?: string;
addressNumber: string;
addressPostalCode?: string;
addressState: string;
addressStreet: string;
unparsed?: boolean;
};
};
name?: string;
teams?: unknown[];
}
| {
notes?: string;
recipientName?: string;
recipientPhone?: string;
skipSMSNotifications?: boolean;
}
| {
completeAfter?: string;
completeBefore?: string;
executor?: string;
merchant?: string;
notes?: string;
pickupTask?: boolean;
quantity?: number;
serviceTime?: number;
}
| {
enableSelfAssignment?: boolean;
hub?: string;
managers?: unknown[];
name?: string;
workers?: unknown[];
}
| {
capacity?: number;
displayName?: string;
name?: string;
teams?: unknown[];
};
workers?: unknown[];
}Properties§
readonly additional Fields?:
| { isReadOnly?: boolean; phone?: string }
| {
addressApartment?: string;
addressName?: string;
addressNotes?: string;
}
| {
addressApartment?: string;
addressName?: string;
addressNotes?: string;
addressPostalCode?: string;
}
| { teams?: unknown[] }
| {
recipientNotes?: string;
recipientSkipSMSNotifications?: boolean;
}
| { notes?: string }
| {
completeAfter?: string;
completeBefore?: string;
executor?: string;
merchant?: string;
notes?: string;
pickupTask?: boolean;
quantity?: number;
recipient?: {
recipientProperties: {
recipientName: string;
recipientNotes?: string;
recipientPhone: string;
recipientSkipSMSNotifications?: boolean;
};
};
recipientName?: string;
recipientNotes?: string;
recipientSkipSMSNotifications?: boolean;
serviceTime?: number;
useMerchantForProxy?: boolean;
}
| { enableSelfAssignment?: boolean; hub?: string }
| {
endingRoute?: {
endingRouteProperties: {
hub?: string;
routeEnd:
| "hub"
| "team_hub"
| "worker_routing_address"
| "anywhere";
};
};
maxAllowedDelay?: number;
maxTasksPerRoute?: number;
scheduleTimeWindow?: {
scheduleTimeWindowProperties: {
endTime?: string;
startTime?: string;
};
};
serviceTime?: number;
taskTimeWindow?: {
taskTimeWindowProperties: {
endTime?: string;
startTime?: string;
};
};
}
| {
capacity?: number;
displayName?: string;
vehicle?: {
vehicleProperties: {
color?: string;
description?: string;
licensePlate?: string;
type: "BICYCLE"
| "CAR"
| "MOTORCYCLE"
| "TRUCK";
};
};
}readonly address?: stringThe destination's street address details
readonly address City?: stringThe name of the municipality
readonly address Country?: stringThe name of the country
readonly address Number?: stringThe number component of this address, it may also contain letters
readonly address Street?: stringThe name of the street
readonly by Location?: booleanWhether to search for only those workers who are currently within a certain target area
readonly container Id?: stringThe object ID according to the container chosen
readonly container Type?: "organizations" | "teams" | "workers"§readonly destination?: { ... }Default: {}
readonly email?: stringThe administrator's email address
readonly filters?:
| {
from?: string;
state?: (0 | 1 | 3 | 2 | "all")[];
to?: string;
}
| {
dropOff?: {
dropOffProperties: {
dropOffLatitude: number;
dropOffLongitude: number;
};
};
pickUp?: {
pickUpProperties: {
pickupLatitude: number;
pickupLongitude: number;
pickupTime?: string;
};
};
restrictedVehicleTypes?: | "BICYCLE"
| "CAR"
| "MOTORCYCLE"
| "TRUCK";
serviceTime?: number;
}
| { radius?: number }
| {
phones?: string;
states?: (0 | 1 | 2)[];
teams?: unknown[];
}Default: {}
readonly get By?: "id" | "name" | "phone"The variable that is used for looking up a recipient Default: "id"
readonly id?: stringThe ID of the admin object for lookup
readonly index?: numberThe index given indicates the position where the tasks are going to be inserted
readonly latitude?: numberThe latitude component of the coordinate pair Type options: {"numberPrecision":14}
readonly limit?: numberMax number of results to return Default: 64 Type options: {"minValue":1,"maxValue":64}
readonly longitude?: numberThe longitude component of the coordinate pair Type options: {"numberPrecision":14}
readonly managers?: unknown[]A list of managing administrators. Choose from the list, or specify IDs using an expression. Default: [] Type options: {"loadOptionsMethod":"getAdmins"}
readonly name?: stringThe administrator's name
readonly operation?:
| "create"
| "get"
| "getAll"
| "update"
| "delete"
| "complete"
| "clone"
| "addTask"
| "updateTask"
| "getDelegatee"
| "autoDispatch"
| "getTimeEstimates"
| "getSchedule"Default: "getAll"
readonly options?:
| { considerDependencies?: boolean }
| { recipientSkipPhoneNumberValidation?: boolean }
| {
filter?: (
| "id"
| "organization"
| "name"
| "metadata"
| "imageUrl"
| "phone"
| "location"
| "displayName"
| "teams"
| "accountStatus"
| "activeTask"
| "capacity"
| "delayTime"
| "onDuty"
| "tasks"
| "timeCreated"
| "timeLastModified"
| "timeLastSeen"
| "userData"
| "vehicle"
)[];
}
| {
analytics?: boolean;
filter?: (
| "id"
| "organization"
| "name"
| "metadata"
| "imageUrl"
| "phone"
| "location"
| "displayName"
| "teams"
| "accountStatus"
| "activeTask"
| "capacity"
| "delayTime"
| "onDuty"
| "tasks"
| "timeCreated"
| "timeLastModified"
| "timeLastSeen"
| "userData"
| "vehicle"
)[];
}Default: {}
readonly override Fields?: { ... }Default: {}
readonly phone?: stringThe phone of the recipient for lookup
readonly recipient Name?: stringThe recipient's complete name
readonly recipient Phone?: stringA unique, valid phone number as per the organization's country if there's no leading + sign. If a phone number has a leading + sign, it will disregard the organization's country setting.
readonly resource?:
| "admin"
| "organization"
| "task"
| "container"
| "team"
| "destination"
| "hub"
| "recipient"
| "worker"The resource to perform operations on Default: "task"
readonly return All?: booleanWhether to return all results or only up to a given limit
readonly schedule?: { ... }Default: {} Type options: {"multipleValues":true,"multipleValueButtonText":"Add Schedule"}
readonly success?: booleanWhether the task's completion was successful Default: true
readonly tasks?: stringTask's ID that are going to be used Default: [] Type options: {"multipleValues":true,"multipleValueButtonText":"Add Task"}
readonly teams?: unknown[]One or more teams of which the worker is a member. Choose from the list, or specify IDs using an expression. Default: [] Type options: {"loadOptionsMethod":"getTeams"}
readonly type?: 0 | 1 | -1§readonly unparsed?: booleanWhether or not the address is specified in a single unparsed string
readonly update Fields?:
| {
isReadOnly?: boolean;
name?: string;
phone?: string;
}
| {
destination?: {
destinationProperties: {
address: string;
addressApartment?: string;
addressCity: string;
addressCountry: string;
addressName?: string;
addressNotes?: string;
addressNumber: string;
addressPostalCode?: string;
addressState: string;
addressStreet: string;
unparsed?: boolean;
};
};
name?: string;
teams?: unknown[];
}
| {
notes?: string;
recipientName?: string;
recipientPhone?: string;
skipSMSNotifications?: boolean;
}
| {
completeAfter?: string;
completeBefore?: string;
executor?: string;
merchant?: string;
notes?: string;
pickupTask?: boolean;
quantity?: number;
serviceTime?: number;
}
| {
enableSelfAssignment?: boolean;
hub?: string;
managers?: unknown[];
name?: string;
workers?: unknown[];
}
| {
capacity?: number;
displayName?: string;
name?: string;
teams?: unknown[];
}Default: {}
readonly workers?: unknown[]A list of workers. Choose from the list, or specify IDs using an expression. Default: [] Type options: {"loadOptionsMethod":"getWorkers"}
Default: {}