Skip to content

Commit ab6b871

Browse files
authored
Merge pull request #84 from route4me/1.0.16
1.0.16
2 parents d805410 + 142be73 commit ab6b871

27 files changed

+4550
-54
lines changed

book/en/SUMMARY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
### V5
4040

4141
* [AddressBookV5](code/AddressBookV5.md)
42+
* [AutomaticTerritories](code/AutomaticTerritories.md)
43+
* [TeamManagement](code/TeamManagement.md)
44+
* [VehiclesV5](code/VehiclesV5.md)
4245

4346
{% include "code/index.md" %}
4447

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<a id="AutomaticTerritories" name="AutomaticTerritories"></a>
2+
3+
## AutomaticTerritories ℗
4+
5+
AutomaticTerritories facility
6+
7+
**Category**: AutomaticTerritories
8+
**Access**: private
9+
**Since**: 1.0.16
10+
11+
* [AutomaticTerritories](#AutomaticTerritories)
12+
* [new AutomaticTerritories(requestManager)](#new_AutomaticTerritories_new)
13+
* [.createJob(addresses, [mode], [params], callback)](#AutomaticTerritories+createJob)
14+
* [.getJobStatus(jobId, callback)](#AutomaticTerritories+getJobStatus)
15+
* [.getJobResult(jobId, callback)](#AutomaticTerritories+getJobResult)
16+
17+
<a id="new_AutomaticTerritories_new" name="new_AutomaticTerritories_new"></a>
18+
19+
### new AutomaticTerritories(requestManager)
20+
21+
Constructor
22+
23+
**Returns**: [<code>AutomaticTerritories</code>](#AutomaticTerritories) - - AutomaticTerritories facility
24+
25+
| Param | Type | Description |
26+
| --- | --- | --- |
27+
| requestManager | <code>RequestManager</code> | Request Manager |
28+
29+
<a id="AutomaticTerritories+createJob" name="AutomaticTerritories+createJob"></a>
30+
31+
### automaticTerritories.createJob(addresses, [mode], [params], callback)
32+
33+
Create job.
34+
35+
**Since**: 1.0.16
36+
37+
| Param | Type | Default | Description |
38+
| --- | --- | --- | --- |
39+
| addresses | <code>Array.&lt;Object&gt;</code> | | An array of the address objects. |
40+
| addresses.id | <code>String</code> | | Address ID. |
41+
| addresses.lat | <code>Number</code> | | Address latitude. |
42+
| addresses.lng | <code>Number</code> | | Address longitude. |
43+
| [mode] | <code>Number</code> | <code>0</code> | |
44+
| [params] | <code>Array.&lt;String&gt;</code> | <code>[]</code> | An array of parameters. |
45+
| callback | <code>module:route4me-node~RequestCallback.&lt;jsonschema:AutomaticTerritories.JobID&gt;</code> | | |
46+
47+
<a id="AutomaticTerritories+getJobStatus" name="AutomaticTerritories+getJobStatus"></a>
48+
49+
### automaticTerritories.getJobStatus(jobId, callback)
50+
51+
Check the asynchronous job status by specifying the 'job_id' path parameter.
52+
53+
**Since**: 1.0.16
54+
55+
| Param | Type | Description |
56+
| --- | --- | --- |
57+
| jobId | <code>String</code> | Job ID to check status. |
58+
| callback | <code>module:route4me-node~RequestCallback.&lt;jsonschema:AutomaticTerritories.ResponseStatus&gt;</code> | |
59+
60+
<a id="AutomaticTerritories+getJobResult" name="AutomaticTerritories+getJobResult"></a>
61+
62+
### automaticTerritories.getJobResult(jobId, callback)
63+
64+
Get the asynchronous job result by specifying the 'job_id' path parameter.
65+
66+
**Since**: 1.0.16
67+
68+
| Param | Type | Description |
69+
| --- | --- | --- |
70+
| jobId | <code>String</code> | Job ID to get result. |
71+
| callback | <code>module:route4me-node~RequestCallback.&lt;jsonschema:AutomaticTerritories.ResponseJob&gt;</code> | |
72+

book/en/code/Optimizations.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Optimizations facility
1212
* [Optimizations](#Optimizations)
1313
* [new Optimizations(requestManager)](#new_Optimizations_new)
1414
* [.create(optimization, isRedirect, [callback])](#Optimizations+create)
15+
* [.createWithAdvancedConstraints(props, [isRedirect], callback)](#Optimizations+createWithAdvancedConstraints)
1516
* [.get(id, [callback])](#Optimizations+get)
1617
* [.list(states, options, [callback])](#Optimizations+list)
1718
* [.update(id, data, [reoptimize], [callback])](#Optimizations+update)
@@ -45,6 +46,74 @@ Create a new optimization
4546
| isRedirect | <code>boolean</code> | |
4647
| [callback] | <code>module:route4me-node~RequestCallback.&lt;jsonschema:Optimizations.Response&gt;</code> | |
4748

49+
<a id="Optimizations+createWithAdvancedConstraints" name="Optimizations+createWithAdvancedConstraints"></a>
50+
51+
### optimizations.createWithAdvancedConstraints(props, [isRedirect], callback)
52+
53+
Create a new optimization with Advanced constraints
54+
55+
**See**
56+
57+
- [https://route4me.io/docs/#create-an-optimization](https://route4me.io/docs/#create-an-optimization)
58+
- [https://github.com/route4me/route4me-json-schemas/blob/master/Optimization_create.json](https://github.com/route4me/route4me-json-schemas/blob/master/Optimization_create.json)
59+
- [https://github.com/route4me/route4me-json-schemas/blob/master/RouteParameters.json](https://github.com/route4me/route4me-json-schemas/blob/master/RouteParameters.json)
60+
- [https://github.com/route4me/route4me-json-schemas/blob/master/Address.json](https://github.com/route4me/route4me-json-schemas/blob/master/Address.json)
61+
- [https://github.com/route4me/route4me-json-schemas/blob/master/Optimization_response.json](https://github.com/route4me/route4me-json-schemas/blob/master/Optimization_response.json)
62+
63+
**Since**: 0.1.15
64+
65+
| Param | Type | Default | Description |
66+
| --- | --- | --- | --- |
67+
| props | <code>object</code> | | Optimization properties. Here are some required or useful properties, for full list of properties look at docs. |
68+
| props.parameters | <code>object</code> | | Route Parameters. Here are some required and useful parameters, for full list of properties look at docs. |
69+
| props.parameters.algorithm_type | <code>number</code> | | The optimization algorithm to be used. Possible values: 1 = TSP, 2 = VRP, 3 = CVRP_TW_SD, 4 = CVRP_TW_MD, 5 = TSP_TW, 6 = TSP_TW_CR, 7 = BBCVRP, 9 = ADVANCED_CVRP_TW,100 = ALG_NONE, 101 = ALG_LEGACY_DISTRIBUTED |
70+
| props.parameters.device_type | <code>string</code> | | The type of the device that is creating this route. Possible values: "web", "iphone", "ipad", "android_phone", "android_tablet". |
71+
| props.parameters.distance_unit | <code>string</code> | | The distance measurement unit for the route. Possible values: "mi", "km". |
72+
| props.parameters.route_max_duration | <code>number</code> | | = 86400 - How many seconds a route can last at most. Default is 24 hours = 86400 seconds. |
73+
| props.parameters.route_time | <code>number</code> | | = 25200 - Time when the route starts (relative to route_date) (Seconds). UTC timezone as well. Default is 07:00 UTC = 25200 seconds. |
74+
| props.parameters.travel_mode | <code>number</code> | | The mode of travel that the directions should be optimized for. Possible values: "Driving", "Walking", "Bicycling". |
75+
| [props.parameters.optimize] | <code>string</code> | | The driving directions will be generated biased for this selection. This has no impact on route sequencing. Possible values: "Distance", "Time", "timeWithTraffic". |
76+
| [props.parameters.parts] | <code>number</code> | | Legacy feature which permits a user to request an example number of optimized routes. |
77+
| [props.parameters.route_date] | <code>number</code> | | The route start date in UTC, unix timestamp seconds. Used to show users when the route will begin, also used for reporting and analytics. |
78+
| [props.parameters.route_name] | <code>string</code> | | The name of this route. this route name will be accessible in the search API, and also will be displayed on the mobile device of a user. |
79+
| [props.parameters.rt] | <code>boolean</code> | | The tour type of this route. rt is short for round trip, the optimization engine changes its behavior for round trip routes. |
80+
| [props.parameters.vehicle_capacity] | <code>number</code> | | How much cargo can the vehicle carry (units, e.g. cubic meters) |
81+
| [props.parameters.vehicle_max_distance_mi] | <code>number</code> | | Maximum distance for a single vehicle in this route (always in miles). |
82+
| [props.parameters.advanced_constraints] | <code>number</code> | | Advanced Constraints. |
83+
| [props.parameters.advanced_constraints.max_cargo_weight] | <code>number</code> | | Maximum cargo weight per route. |
84+
| [props.parameters.advanced_constraints.max_cargo_volume] | <code>number</code> | | Maximum cargo volume per route. |
85+
| [props.parameters.advanced_constraints.max_capacity] | <code>number</code> | | How much total cargo can be transported per route (units, e.g. cubic meters). |
86+
| [props.parameters.advanced_constraints.members_count] | <code>number</code> | | Legacy feature which permits a user to request an example number of optimized routes. |
87+
| props.parameters.advanced_constraints.available_time_windows | <code>Array.&lt;array&gt;</code> | | An array of the available time windows, e.g. [[43200, 72000], [TimeStart, TimeEnd]] Time Window Start in seconds: 7:00 am EST = (7 + 5) * 3600 = 43200 Time Window End in seconds: 15:00 am EST = (15 + 5) * 3600 = 72000 |
88+
| [props.parameters.advanced_constraints.tags] | <code>Array.&lt;string&gt;</code> | | The driver tags specified in a team member's custom data. (e.g. 'driver skills': ["Class A CDL", "Class B CDL", "Forklift", "Skid Steer Loader", "Independent Contractor"]) |
89+
| [props.parameters.advanced_constraints.route4me_members_id] | <code>Array.&lt;number&gt;</code> | | An array of the skilled driver IDs. |
90+
| [props.parameters.advanced_constraints.depot_address] | <code>object</code> | | A depot address. |
91+
| props.parameters.advanced_constraints.depot_address.source_id | <code>number</code> | | Source ID. |
92+
| props.parameters.advanced_constraints.depot_address.source_type | <code>string</code> | | Source type (e.g. input_addresses). |
93+
| [props.parameters.advanced_constraints.location_sequence_pattern] | <code>Array.&lt;object&gt;</code> | | The parameter is used in advanced constraints to set the stops you plan to visit each route. Note: empty string "" means any stops, for example ["", AddresssObject1, AddresssObject2, "", AddresssObject3] means any stops before AddresssObject1 and between AddresssObject2 and AddresssObject3. |
94+
| [props.parameters.advanced_constraints.location_sequence_pattern.alias] | <code>string</code> | | Location alias |
95+
| [props.parameters.advanced_constraints.location_sequence_pattern.address] | <code>string</code> | | Location address |
96+
| props.parameters.advanced_constraints.location_sequence_pattern.lat | <code>number</code> | | Location latitude |
97+
| props.parameters.advanced_constraints.location_sequence_pattern.lng | <code>number</code> | | Location longitude |
98+
| [props.parameters.advanced_constraints.location_sequence_pattern.time] | <code>number</code> | | Location service time |
99+
| [props.parameters.advanced_constraints.group] | <code>string</code> | | Group name of the advanced constraints. |
100+
| [props.depots] | <code>Array.&lt;object&gt;</code> | | A valid array of Address objects of Depots. |
101+
| props.addresses | <code>Array.&lt;object&gt;</code> | | A valid array of Address objects. Here are some required and useful properties of the Address object, for full list of properties look at docs. |
102+
| props.addresses.lat | <code>number</code> | | Latitude. |
103+
| props.addresses.lng | <code>number</code> | | Longitude. |
104+
| [props.addresses.alias] | <code>string</code> | | Address Alias. |
105+
| [props.addresses.address] | <code>string</code> | | The route Address Line 1. |
106+
| [props.addresses.is_depot] | <code>boolean</code> | <code>false</code> | This address is a depot. |
107+
| [props.addresses.group] | <code>string</code> | | Address group. |
108+
| [props.addresses.time] | <code>number</code> | | Service time (seconds). |
109+
| [props.addresses.time_window_start] | <code>number</code> | | Time Window Start in seconds, relative to the route start date (midnight), UTC time zone. It is relative to start date because start time changes would shift time windows. |
110+
| [props.addresses.time_window_end] | <code>number</code> | | Time Window End in seconds, relative to the route start date (midnight), UTC time zone. It is relative to start date because start time changes would shift time windows. |
111+
| [props.addresses.tags] | <code>Array.&lt;string&gt;</code> | | Array of address tags. |
112+
| [props.addresses.contact_id] | <code>number</code> | | Address book contact id (0 means not connected to the address book). |
113+
| [props.optimized_callback_url] | <code>string</code> | | A URL that gets called when the optimization is solved, or if there is an error. The callback is called with a POST request. The POST data sent is: timestamp (Seconds) - Server timestamp of request sent; optimization_problem_id (Hash String) - ID of the optimization; state (Small Int) - The state can be one of the values: 4 = OPTIMIZATION_STATE_OPTIMIZED, which means the optimization was successful; 5 = OPTIMIZATION_STATE_ERROR, which means there was an error solving the optimization. Query string (GET fields). |
114+
| [isRedirect] | <code>boolean</code> | | If set, it will be redirected. Use false for no redirection or not send. |
115+
| callback | <code>RequestCallback</code> | | The callback that handles the response. |
116+
48117
<a id="Optimizations+get" name="Optimizations+get"></a>
49118

50119
### optimizations.get(id, [callback])

book/en/code/Route4Me.md

Lines changed: 41 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -84,22 +84,25 @@ With `route4me` instance you should get responses from API easy-peasy.
8484

8585
Main members of the instanse of `Route4Me` class:
8686

87-
* [ActivityFeed ](ActivityFeed)
88-
* [Addresses ](Addresses)
89-
* [AddressBook ](AddressBook)
90-
* [AddressBookV5 ](AddressBookV5)
91-
* [AddressBarcodes ](AddressBarcodes)
92-
* [AvoidanceZones ](AvoidanceZones)
93-
* [Geocoding ](Geocoding)
94-
* [Members ](Members)
95-
* [Notes ](Notes)
96-
* [Optimizations ](Optimizations)
97-
* [Orders ](Orders)
98-
* [OrderCustomFields](OrderCustomFields)
99-
* [Routes ](Routes)
100-
* [Territories ](Territories)
101-
* [Tracking ](Tracking)
102-
* [Vehicles ](Vehicles)
87+
* [ActivityFeed ](ActivityFeed)
88+
* [Addresses ](Addresses)
89+
* [AddressBook ](AddressBook)
90+
* [AddressBookV5 ](AddressBookV5)
91+
* [AddressBarcodes ](AddressBarcodes)
92+
* [AutomaticTerritories](AutomaticTerritories)
93+
* [AvoidanceZones ](AvoidanceZones)
94+
* [Geocoding ](Geocoding)
95+
* [Members ](Members)
96+
* [Notes ](Notes)
97+
* [Optimizations ](Optimizations)
98+
* [Orders ](Orders)
99+
* [OrderCustomFields ](OrderCustomFields)
100+
* [Routes ](Routes)
101+
* [TeamManagement ](TeamManagement)
102+
* [Territories ](Territories)
103+
* [Tracking ](Tracking)
104+
* [Vehicles ](Vehicles)
105+
* [VehiclesV5 ](VehiclesV5)
103106

104107
Each member corresponds to an bunch of methods, described in API-documentation,
105108
but the most methods in this SDK have unified names:
@@ -129,15 +132,18 @@ For most use cases it is necessary:
129132
* [.AddressBookV5](#Route4Me+AddressBookV5) : <code>AddressBookV5</code>
130133
* [.AddressBarcodes](#Route4Me+AddressBarcodes) : <code>AddressBarcodes</code>
131134
* [.Addresses](#Route4Me+Addresses) : <code>Addresses</code>
135+
* [.AutomaticTerritories](#Route4Me+AutomaticTerritories) : <code>AutomaticTerritories</code>
132136
* [.AvoidanceZones](#Route4Me+AvoidanceZones) : <code>AvoidanceZones</code>
133137
* [.Geocoding](#Route4Me+Geocoding) : <code>Geocoding</code>
134138
* [.Notes](#Route4Me+Notes) : <code>Notes</code>
135139
* [.Optimizations](#Route4Me+Optimizations) : <code>Optimizations</code>
136140
* [.Orders](#Route4Me+Orders) : <code>Orders</code>
137141
* [.Routes](#Route4Me+Routes) : <code>Routes</code>
142+
* [.TeamManagement](#Route4Me+TeamManagement) : <code>TeamManagement</code>
138143
* [.Territories](#Route4Me+Territories) : <code>Territories</code>
139144
* [.Tracking](#Route4Me+Tracking) : <code>Tracking</code>
140145
* [.Vehicles](#Route4Me+Vehicles) : <code>Vehicles</code>
146+
* [.VehiclesV5](#Route4Me+VehiclesV5) : <code>VehiclesV5</code>
141147
* [.version](#Route4Me+version) ⇒ <code>string</code>
142148
* [.baseUrl()](#Route4Me+baseUrl) ⇒ <code>string</code>
143149
* [.baseUrl5()](#Route4Me+baseUrl5) ⇒ <code>string</code>
@@ -197,6 +203,13 @@ Create new API client
197203
**Addresses** related API calls
198204

199205
**Since**: 0.1.8
206+
<a id="Route4Me+AutomaticTerritories" name="Route4Me+AutomaticTerritories"></a>
207+
208+
### route4Me.AutomaticTerritories : <code>AutomaticTerritories</code>
209+
210+
**AutomaticTerritories** related API calls
211+
212+
**Since**: 0.1.16
200213
<a id="Route4Me+AvoidanceZones" name="Route4Me+AvoidanceZones"></a>
201214

202215
### route4Me.AvoidanceZones : <code>AvoidanceZones</code>
@@ -237,6 +250,12 @@ Create new API client
237250
**Routes** related API calls
238251

239252
**Since**: 0.1.8
253+
<a id="Route4Me+TeamManagement" name="Route4Me+TeamManagement"></a>
254+
255+
### route4Me.TeamManagement : <code>TeamManagement</code>
256+
257+
**TeamManagement** related API calls
258+
240259
<a id="Route4Me+Territories" name="Route4Me+Territories"></a>
241260

242261
### route4Me.Territories : <code>Territories</code>
@@ -255,6 +274,12 @@ Create new API client
255274

256275
**Vehicles** related API calls
257276

277+
<a id="Route4Me+VehiclesV5" name="Route4Me+VehiclesV5"></a>
278+
279+
### route4Me.VehiclesV5 : <code>VehiclesV5</code>
280+
281+
**VehiclesV5** related API calls
282+
258283
<a id="Route4Me+version" name="Route4Me+version"></a>
259284

260285
### route4Me.version ⇒ <code>string</code>

0 commit comments

Comments
 (0)