{"openapi":"3.1.0","info":{"title":"Navigation APIs (NBRoute)","version":"live","summary":"","description":null},"tags":[{"description":"Operations to manage routing","name":"routing"},{"description":"Optimise API in herald service","name":"Optimise-mvrp"},{"description":"Operations to manage geocode","name":"geocode"},{"description":"Operations to manage tiles","name":"tiles"},{"description":"RRT API","name":"RRT"},{"name":"Geofence"},{"name":"Optimization v2"},{"name":"Geocode Postal Code"},{"name":"Multi Geocoding"},{"name":"Skynet Asset and Track"},{"name":"Flexi"},{"name":"Clustering api"},{"name":"Post Trip Route api"},{"name":"Map SDK Web v2"},{"name":"static image"},{"name":"vector image"},{"name":"raster image"},{"name":"places API"}],"servers":[],"paths":{"/navigation/json":{"get":{"description":"Nextbillion.ai’s Navigation API is a service that computes a route between 2 places, and also returns detailed turn by turn instructions for the route.\n\nThe Navigation API can be used as an input into your Navigation app. Alternatively, you can directly use Nextbillion.ai’s Navigation SDK for a complete turn by turn navigation experience.","summary":"Navigation Fast API","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}},{"in":"query","name":"origin","description":"`origin` is the starting point of your route. Ensure that `origin` is a routable land location.\n\nPlease note that this parameter is mandatory if the geometry parameter is not given.","schema":{"type":"string","pattern":"^-?(\\d{1,2}(\\.\\d+)?),\\s*-?(\\d{1,3}(\\.\\d+)?)","format":"latitude,longitude","examples":["origin=41.349302,2.136480"]}},{"in":"query","name":"destination","description":"
destination
is the ending point of your route. Ensure that the destination
is a routable land location.
Please note that this parameter is mandatory if the original_shape
parameter is not given.
Specify the encoding format of route geometry provided in the request using original_shape
parameter. Please note that an error is returned when this parameter is not specified while an input is added to original_shape
parameter.
Include this parameter in the request to return segment-wise speed information of the route returned in the response.
Please note that returning speed information is a function of road_info
parameter, which is effective only when option=flexible
. However, the resultant route might not contain all the locations provided in path
input.
waypoints
are coordinates along the route between the origin
and destination
. It is a pipe-separated list of coordinate pairs. Please note that the route returned will arrive at the waypoints
in the sequence they are provided in the input request.
Please note that the maximum number of waypoints
that can be provided in a single request is 50 when using GET method and 200 with POST method.
A key is a unique identifier that is required to authenticate a request to the API.
","required":true,"schema":{"type":"string","format":"32 bit alphanumeric character","examples":["key=API_KEY"]}},{"in":"query","name":"id","description":"The unique ID that was returned on successful submission of the Optimization POST request.
","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"code":{"type":"integer","description":"A custom code representing the status of the result. A code other than 0, represents an internal error. In case of codes other than 0, please verify the parameter values, constraints and locations. If the issue does not resolve, please reach out to NextBillion at [support@nextbillion.ai](mailto:support@nextbillion.ai).","examples":[],"x-enum-options":[]},"summary":{"type":"object","properties":{"cost":{"type":"integer","description":"Returns the total cost of all the routes returned in the solution. The unit of cost type depends on the value of `travel_cost` attribute in the optimization request."},"routes":{"type":"integer","description":"Returns the total number of routes in the solution."},"unassigned":{"type":"integer","description":"Returns the number of unfulfilled tasks in the solution."},"duration":{"type":"integer","description":"Returns the total drive time, in seconds, needed to cover all routes. Please note that it does not include the service, setup or the waiting durations elapsed on these routes."},"distance":{"type":"number","description":"Returns the total distance of all routes, in meters. It is equal to the sum of distances of individual routes."},"setup":{"type":"integer","description":"Returns the total setup time, in seconds, of all assigned tasks. It is equal to the sum of setup time of individual tasks that were assigned."},"service":{"type":"integer","description":"Returns the total service time, in seconds, of all assigned tasks. It is equal to the sum of service time of individual tasks that were assigned."},"waiting_time":{"type":"integer","description":"Returns the sum of durations spent waiting, in seconds, by vehicles on all routes."},"priority":{"type":"integer","description":"Returns the sum of priorities of all tasks that were assigned."},"delivery":{"type":"array","description":"Returns the sum of all quantities that were delivered in the optimized solution. If quantities of different dimensions were delivered, then a matching number of elements is returned in the `delivery` array.\n\nPlease note that when both `shipments` and `jobs` are provided, this field corresponds to the sum of quantities delivered as part of all the assigned `shipments` and `jobs` .","items":{"type":"integer"}},"pickup":{"type":"array","description":"Returns the sum of all quantities that were picked-up in the optimized solution. If quantities of different dimensions were picked-up, then a matching number of elements is returned in the `pickup` array.\n\nPlease note that when both `shipments` and `jobs` are provided, this field corresponds to the sum of quantities picked-up as part of all the assigned `shipments` and `jobs` .","items":{"type":"integer"}}},"description":"An object to describe the summarized result of the optimization request. This object can be useful to quickly get an overview of the important result parameters."},"unassigned":{"type":"array","description":"An array of objects containing the details of unassigned tasks in the optimized solution. Each object represents one task.","items":{"type":"object","properties":{"id":{"type":"integer","description":"Returns the ID of the unassigned task. The ID returned is the same as that provided for the given task in the `jobs` or the `shipments` part in the input POST optimization request."},"type":{"description":"Returns the type of the task that was unassigned. Will always belong to one of `job`, `pickup`, or `delivery`.","type":"string"},"location":{"type":"array","description":"Returns the location of the unassigned tasks in the [latitude, longitude] format.","items":{"type":"number"}},"reason":{"description":"Returns the most likely reason due to which the task remained unassigned. The optimization service can capture the following causes of tasks remaining unassigned, among others:\n\n* unmatched `skills` of the tasks\n \n* insufficient `capacity` of vehicle to accommodate the tasks\n \n* `time_window` requirements of the tasks or the vehicles\n \n* violation of vehicle’s `max_activity_waiting_time` constraint\n \n* violation of vehicle’s `max_tasks` constraint\n \n* violation of vehicle’s `max_travel_cost` constraint\n \n* task unassigned due to zone constraints","type":"string"}}}},"routes":{"type":"array","description":"An array of objects containing the details of each route in the optimized solution. Each object represents one route.","items":{"type":"object","properties":{"vehicle":{"oneOf":[{"description":"Returns the ID of the vehicle that was assigned to the route. The value type will be string only if string IDs were provided in the input request.","type":"string"},{"type":"integer","description":"Returns the ID of the vehicle that was assigned to the route. The value type will be integer only if integer IDs were provided in the input request."}]},"cost":{"type":"integer","description":"Returns the cost of the route. The unit of cost type depends on the value of `travel_cost` attribute in the optimization request."},"steps":{"type":"array","description":"This attribute contains the details of all the steps involved in the route. It is an array of objects with each object representing one step.","items":{"type":"object","properties":{"id":{"type":"integer","description":"Returns the ID of the task. The ID returned here are the same values that were provided for the given task in the `jobs` or the `shipments` objects of the input POST optimization request."},"type":{"description":"Returns the type of the step. In case the type id `start` or `end`, `steps` object will not have the `id` field.","type":"string"},"arrival":{"type":"integer","description":"Returns the time at which the vehicle arrives at the `step` location. If `time_windows` is provided for the task it will be returned as an UNIX timestamp expressed in seconds. When `time_windows` is not provided, it is returned as the total duration, in seconds, elapsed since the start of the route.\n\nPlease note it includes all the other durations as well (setup, service, waiting)."},"duration":{"type":"integer","description":"Returns the total drive time, in seconds, from the start of the route up until the start of the `step`. Please note that this value does not include any other category of durations (service, wait, setup) and the value of this parameter accumulates with each step."},"location":{"type":"array","description":"Returns the location coordinates of the step in the [latitude, longitude] format.\n\nThe index of this location is also returned by the `location_index` parameter.","items":{"type":"number"}},"projected_location":{"type":"array","description":"In case this step is part of a task group, this field returns the location coordinates of the point, in [latitude, longitude] format, which was used as a common stop for all grouped tasks.","items":{"type":"number"}},"location_index":{"type":"integer","description":"Returns the index (in the `location` array) of the location coordinates where the step is performed. The index will always be in the range of [0, length of `location` array).\n\nActual coordinates are also returned by the `location` parameter."},"load":{"type":"array","description":"Returns the load on the vehicle after completing this step. In case of multiple dimensions, loads of each type are returned by a matching number of elements in the array.","items":{"type":"integer"}},"service":{"type":"integer","description":"Returns the service time, in seconds, for the task."},"waiting_time":{"type":"integer","description":"Returns the wait time of the vehicle at this step, in seconds."},"setup":{"type":"integer","description":"Returns the setup time, in seconds, for the task."},"late_by":{"description":"Returns the amount of time, in seconds, by which the vehicle is late when arriving at this step. Please note this field is present only when there is a non-zero value for vehicle lateness, otherwise it is not present in the response.","type":"string"},"description":{"description":"Returns the description of this step. The description returned here are the same values that were provided for the given task in the `jobs` or the `shipments` objects of the input POST optimization request.","type":"string"},"distance":{"type":"integer","description":"Returns the distance covered, in meters, from the start of the route and up until the current step.\n\nPlease note that the value of this parameter accumulates with each step. In case , the `travel_cost: air_distance`, then the distance here represents straight line distance."},"snapped_location":{"type":"array","description":"Returns the coordinates after snapping the location of this step to a nearby road.","items":{"type":"number"}}},"description":"This attribute contains the details of all the steps involved in the route. It is an array of objects with each object representing one step."}},"description":{"description":"Return the description of the assigned vehicle. It would be the same as that provided in the `description` field of `vehicles` part of the input POST optimization request.","type":"string"},"distance":{"type":"number","description":"Returns the total distance of the route, in meters."},"duration":{"type":"integer","description":"Returns the total drive duration of the route, in seconds."},"geometry":{"description":"Returns the geometry of this route encoded in polyline format.","type":"string"},"pickup":{"type":"array","description":"Returns the total quantities, for each dimension (or unit), of pickups performed in the route. Please note that when both `shipments` and `jobs` are provided, this field corresponds to the sum of quantities picked-up as part of the assigned `shipments` and `jobs` on the route.","items":{"type":"integer"}},"delivery":{"type":"array","description":"Returns the total quantities, for each dimension (or unit), of deliveries performed in the route. Please note that when both `shipments` and `jobs` are provided, this field corresponds to the sum of quantities delivered as part of the assigned `shipments` and `jobs` on the route.","items":{"type":"integer"}},"priority":{"type":"integer","description":"Returns the sum of priorities of all tasks on the route."},"service":{"type":"integer","description":"Returns the total service time for the tasks on the route, in seconds."},"vehicle_overtime":{"type":"integer","description":"Returns the total vehicle overtime for the route, in seconds. Please note this field is present only when there is a non-zero value for vehicle overtime, otherwise it is not present in the response."},"waiting_time":{"type":"integer","description":"Returns the total waiting time of the vehicle on the route, in seconds."},"setup":{"type":"integer","description":"Returns the total setup time, in seconds, for the tasks assigned on the route."}}}},"error":{"description":"Returns the error message for unfulfilled optimization jobs. This field will not be present in the response in case there are no errors.","type":"string","examples":["Error Input: not able to allocate vehicle to fulfill all input relations"]}},"description":"An object containing the details of the optimized routes."},"message":{"description":"Returns the error that happens while processing data.","type":"string"},"description":{"description":"Returns the `description` of the optimization job as given in the input POST optimization request. This field will not be present in the response if no `description` was provided in the input request.","type":"string"},"status":{"description":"It indicates the overall status or result of the API request denoting whether the operation was successful or did it encounter any errors.","type":"string","examples":[],"enum":["`Ok`","`Failed`"],"x-enum-options":[{"value":"`Ok`"},{"value":"`Failed`"}]}}}}}}},"tags":["Optimization v2"]}},"/optimization/v2":{"post":{"summary":"Flexible POST","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.
","required":true,"schema":{"type":"string","format":"32 bit alphanumeric character","examples":["key=API_KEY"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"locations":{"type":"object","properties":{"id":{"type":"integer","description":"A unique ID for the set of locations. It should be a positive integer.","examples":["“id”: 5"]},"location":{"type":"array","description":"Indicate all the location coordinates that will be used during optimization. The coordinates should be specified in the format \"latitude, longitude\". It is recommended to avoid adding duplicate location coordinates to this array. In case there are multiple tasks at the same location, users can repeat the index of the location while configuring all such tasks.\n\nPlease use this array to determine the index of a location when setting the `location_index` parameter in `jobs`, `shipments`, `vehicles` or other parts of the request. The length of this array determines the valid values for `location_index` parameter.","examples":["[\n \"28.511012,77.090198\",\n \"28.4819729,77.0151937\"\n]"],"items":{"type":"string"}},"approaches":{"type":"array","description":"Describe if the location is curbside. An array of strings indicates the side of the road from which to approach the location in the calculated route. If provided, the number of approaches must be equal to the number of locations. However, you can skip a coordinate and show its position in the list using `` (empty string). Please note these values are case-sensitive.","examples":["[\n\"curb\",\n\"unrestricted\",\n``,\n\"curb\"\n]"],"items":{"type":"string","default":"`unrestricted`","enum":["`unrestricted`","`curb`","``(empty string)"],"x-enum-options":[{"value":"`unrestricted`"},{"value":"`curb`"},{"value":"``(empty string)"}]}}},"description":"The `locations` object is used to define all the locations that will be used during the optimization process. Read more about this attribute in the [Location Object](#location-object) section.","required":["id","location"]},"vehicles":{"type":"array","description":"The `vehicles` attribute describes the characteristics and constraints of the vehicles that will be used for fulfilling the tasks. Read more about this attribute in the [Vehicle Object](#vehicle-object) section.","items":{"type":"object","properties":{"id":{"oneOf":[{"description":"Specify a unique ID for the vehicle. If multiple vehicles share the same ID, API would return an error.\n\nPlease note that this field is mandatory and providing an empty string will result in an error. The IDs are case-sensitive.","type":"string","examples":["\"id\":\"sample_ID\""]},{"type":"integer","description":"Specify a unique ID for the vehicle. If multiple vehicles share the same ID, API would return an error.\n\nPlease note that this field is mandatory.","examples":["10"]}]},"description":{"description":"Add some description on this vehicle","type":"string","examples":["VRP vehicle"]},"start_index":{"type":"integer","description":"Specify the index of the vehicle’s starting point in the `location` array. The valid value range is [0, length of `location` array).\n\nPlease note that when the vehicle is assigned to a `depot`, the location of `depot` becomes the starting point for the vehicle and `start_index` need not be specified. Either `start_index` or `end_index` is required, if the vehicle is not being assigned to a `depot`. If the `start_index` is not available, the vehicle starts from the location of the first task on its route.","examples":["“start_index”:12"]},"end_index":{"type":"integer","description":"Specify the index of the vehicle’s final stop point in the `location` array. The valid value range is [0, length of locations). If this parameter is not used, the last visited task by the vehicle would be considered as its final stop point, which is determined by the optimization solver.\n\nPlease note that either `start_index` or `end_index` is required, if the vehicle is not being assigned to a `depot`.","examples":["“end_index”:12"]},"capacity":{"type":"array","description":"`capacity` attribute is used to define multidimensional capacities of the vehicle.\n\nIt is recommended to keep the dimensions of `capacity` consistent with the dimensions provided in quantity related attributes of `jobs` and `shipments` objects.\n\nRead more about the behavior of this attribute in the [Multi-Dimensional Parameters](#multi-dimensional-parameters) section.","examples":["[\n 60,\n 80\n]"],"items":{"type":"integer"}},"time_window":{"type":"array","description":"`time_window` field is used to describe the time period during which a vehicle is available to perform assigned tasks. The time_window should be specified in the format of [start_timestamp,end_timestamp] and each timestamp must be expressed as an UNIX timestamp in seconds.\n\nPlease observe that it accepts only a single time window for the vehicle. It is important to note this difference with respect to the `time_windows` field used for `shipments` and `jobs`, which is a two-dimensional array used to describe the multiple time windows for each individual shipment or job.","examples":["[\n 1656570000,\n 1656620000\n]"],"items":{"type":"integer"}},"skills":{"type":"array","description":"It is a multi-dimensional object that can be used to define multiple skills and abilities of drivers or vehicles.\n\nPlease note that only those vehicles with all the skills needed for a job/shipment will be assigned to fulfill that task.\n\nRead more about the behavior of this attribute in the [Multi-Dimensional Parameters](#multi-dimensional-parameters) section.","examples":["[\n 101,\n 102\n]"],"items":{"type":"integer"}},"max_tasks":{"type":"integer","description":"Describe the maximum number of tasks that can be assigned to this vehicle. It should be a positive integer.","examples":["“max_tasks”: 5"]},"break":{"type":"object","properties":{"id":{"type":"integer","description":"Specify an ID for the break. It should be a positive integer.","examples":["\"id\":5"]},"time_windows":{"type":"array","description":"Describe the possible time periods for the driver to take a break. The time periods should be expressed as a UNIX timestamp in seconds.\n\nPlease note that the time periods should not overlap with each other and should always follow the format of [start_timestamp, end_timestamp].","examples":["[\n [\n 1656487800,\n 1656516600\n ]\n]"],"items":{"type":"array","items":{"type":"integer"}}},"description":{"description":"Add a custom description for the break.","type":"string","examples":["Lunch"]},"service":{"type":"integer","description":"Specify the break duration, in seconds.","examples":["“service”: 900"]}},"description":"The `break` attribute is used to provide details of the break that a driver can take during their route. Please note that only one break object is allowed for one vehicle, but you can provide multiple time windows during which the break can be taken.","required":["id","time_windows"]},"costs":{"type":"object","properties":{"fixed":{"type":"integer","description":"Specify a fixed cost for using a vehicle. It should be a positive integer.","examples":["“fixed”: 850"]},"per_hour":{"type":"integer","description":"Define the cost for one hour of travel time of the vehicle. When `per_hour` cost is used, the final vehicle cost is determined based on the given value, instead of travel duration of the route.\n\nPlease note that `per_hour` cost is effective only when `travel_cost` is `duration`. Consequently, both `per_hour` and `per_km` can not be used simultaneously for a given vehicle.","examples":["“per_hour”: 2000"],"default":3600},"per_km":{"type":"integer","description":"Define the cost incurred by the vehicle for travelling a distance of one kilometer (km). When `per_km` cost is used, the final vehicle cost is determined based on the given value, instead of distance travelled on the trip.\n\nPlease note that `per_km` cost is effective only when `travel_cost` is `distance`. Consequently, both `per_hour` and `per_km` can not be used simultaneously for a given vehicle.","examples":["“per_km”: 2000"]}},"description":"The `cost` attribute is used to define the cost of using the vehicle. It is a positive integer value with no specific unit of its own, but assumes the unit as per the value of `travel_cost` parameter.\n\n- When the `travel_cost` parameter is set to `distance` then `cost` will be in meters.\n\n- When the `travel_cost` parameter is set to `duration` then `cost` will be in seconds.\n\n- When the `travel_cost` is set to `customized` then `cost` will not have any unit, but during calculations it will be considered at its face value.\n\n- When the `travel_cost` is set to `air_distance` then `cost` will be in meters.\n\n`cost` parameter is critical in determining the number of vehicles to be used for optimization. The optimization engine will prefer using vehicles which help in lowering the cost for a particular route, if other parameters (location, time, etc) favor the configuration.\n\nPlease note that:\n\n- When only the `fixed` vehicle cost is provided, it will be added to the `travel_cost` of the optimized route to arrive at the overall cost of the route.\n\n- When only the `per_hour` or `per_km` cost is provided for a vehicle, then the cost of the route to which the vehicle is assigned, is calculated using only the given `per_hour` or `per_km` cost and not the `travel_cost` of the route.\n\n- When `per_hour` or `per_km` is provided along with `fixed` cost for a vehicle, then the cost of the route to which the vehicle is assigned, is equal to the sum of `fixed` and calculated `per_hour` or the `per_km` costs."},"max_travel_cost":{"type":"integer","description":"It restricts the maximum “cost” that a vehicle can incur while operating. This parameter is linked to `travel_cost` parameter, which determines whether the `max_travel_cost` value will be considered as `distance` (in meters) or `duration` (in seconds) or `customized`.\n\nFor example, if the `travel_cost` attribute is set to `distance`, the `max_travel_cost` value will be considered as the maximum allowable distance that a vehicle can travel in the optimized solution.\n\nIf the `travel_cost` parameter is set to `duration`, then the `max_travel_cost` value will be considered as the maximum allowable time that a vehicle can drive in the optimized solution.\n\nIf the `travel_cost` is `customized` then the value provided for `max_travel_cost` will be compared directly with the custom cost of the route to determine if the vehicle can be assigned for that route or not. Please note that `max_travel_cost`, in this case, will be considered abstract (unit-less) and at face value.\n\nSetting a value for `max_travel_cost` ensures the vehicle does not exceed its operational limits, which can result in increased fuel costs, longer delivery times, or potential vehicle breakdowns.","examples":["“max_travel_cost”: 1800"]},"depot":{"type":"integer","description":"The `depot` attribute specifies the ID of the depot that is assigned to the vehicle.\n\nPlease note that if `depot` is specified, then the depot’s location will act as the starting point for the vehicle.\n\nThere is no restriction on the number of vehicles that can be assigned to a depot but one vehicle can only have one depot.","examples":["“depot”: 7"]},"speed_factor":{"type":"number","description":"A positive number indicating the factor by which the vehicle's speed should be adjusted , relative to normal speed, affecting the driving durations consequently. When `speed_factor` is greater than 1, effective travel time will be less than the normal travel duration. Similarly, when `speed_factor` is less than 1, effective travel time will be more than the normal travel duration. Please note that the `speed_factor` value supports values greater than 0 upto a maximum of 5.0, with a precision of two digits after the decimal point.\n\nFor example, a normal trip duration of 1hr would be considered as a trip with duration of 30min if the `speed_factor` is 2.\n\nUsing this attribute will have an effect on the vehicle's arrival time at task locations (allocate task `time_windows` accordingly) and can affect the cost of the route as well (when `travel_cost=duration`).","default":1,"examples":["\"speed_factor\":2.5"]},"drive_time_layover_config":{"type":"object","properties":{"max_continuous_driving":{"type":"integer","description":"Define the maximum time, in seconds, that a driver can drive without taking a break. This field is mandatory when using the `drive_time_layover_config` attribute. Please note that accumulation of driving time is not interrupted by service time, setup or waiting time when fulfilling tasks.\n\nIt is worth highlighting that, if different `max_continuous_driving` durations are used then optimizer might choose vehicles with lower `max_continuous_driving` because layover time is not affecting its objectives.","examples":["\"max_contiuous_driving\": 3600"]},"layover_duration":{"type":"integer","description":"Specify the duration, in seconds, for which the driver should rest after driving continuously for the duration provided in `max_continuous_driving`. This field is mandatory when using the `drive_time_layover_config` attribute. \n\nPlease note that the `layover_duration` will be added to the total service time and will impact arrival time of vehicle/driver at task's location, but it won't influence the `cost` or `duration` of the routes.","examples":["\"layover_duration\": 600"]}},"description":"Use this object to configure continuous driving time limitations and subsequent rest duration for the driver. Please note that only one of `drive_time_layover_config` and `break` is allowed for a vehicle, at a time.","required":["max_continuous_driving","layover_duration"]},"allowed_zones":{"type":"array","description":"Specifies the zones where the vehicle is allowed to fulfil any tasks. Please note the following:\n\n* If this parameter is provided, then the vehicle can fulfil tasks only in the given zones but, it is restricted from taking up tasks anywhere else.\n \n* Providing an empty array implies that there are no allowed zones. Consequently, the vehicle cannot fulfil any tasks from anywhere.\n \n* If the parameter itself is not provided in the input, then the vehicle is allowed to complete tasks in all zones as well as outside them.","examples":["[\n 1,\n 2\n]"],"items":{"type":"integer"}},"restricted_zones":{"type":"array","description":"Specifies the zones where the vehicle is restricted from fulfilling any tasks. Although, the vehicle can be routed through such zones.\n\n* If this parameter is provided, then the vehicle is restricted from fulfilling tasks belonging to the given zones. Vehicle is allowed to fulfil tasks from everywhere else.\n \n* If an empty array is provided or if the parameter itself is not provided then zone based restrictions do not apply on the vehicle.","examples":["[\n 1,\n 2\n]"],"items":{"type":"integer"}}},"required":["id"]}},"jobs":{"type":"array","description":"`jobs` object is used to collect the details of a particular job or task that needs to be completed as part of the optimization process. Each job can have either a `pickup` or `delivery` step, but not both. Read more about this attribute in the [Job Object](#job-object) section.\n\nPlease note that either the `jobs` or the `shipments` attribute should be specified to build a valid request.","items":{"type":"object","properties":{"id":{"type":"integer","description":"Provide an unique ID for the job. Please note `id` is mandatory when using the `jobs` object.","examples":["“id”: 5"]},"description":{"description":"Add a custom description for the job.","type":"string"},"location_index":{"type":"integer","description":"An integer denoting the index (in the `location` array) of the location coordinates where the job needs to be performed. The valid range of values is [0, length of `location` array).\n\nPlease note the `location_index` is mandatory when using the `jobs` object.","examples":["“location_index”: 5"]},"delivery":{"type":"array","description":"In case the job involves a delivery step, use this attribute to describe delivery quantity. This attribute supports multidimensional quantities, to support delivering quantities of different units/dimensions. It is recommended to keep the dimensions of quantity for pickup/delivery consistent when defining them in `jobs` and `vehicles` (in `capacity` attribute).\n\nPlease note that the quantity of delivery will be added to the assigned vehicle's initial load.","examples":["[\n 5,\n 10\n]"],"items":{"type":"integer"}},"pickup":{"type":"array","description":"In case the job involves a pickup step, use this attribute to describe pickup quantity. This attribute supports multidimensional quantities, to support picking up quantities of different units/dimensions. It is recommended to keep the dimensions of quantity for pickup/delivery consistent when defining them in `jobs` and `vehicles` (in `capacity` attribute).","examples":["[\n 5,\n 10\n]"],"items":{"type":"integer"}},"service":{"type":"integer","description":"Use this attribute to define the time duration, in seconds, needed to complete the job.","examples":["“service”: 300"]},"time_windows":{"type":"array","description":"Define time periods within which this job should be fulfilled. The time periods should be expressed as a UNIX timestamp in seconds.\n\n\nPlease note that the time periods should not overlap with each other and should always follow the format of [start_timestamp, end_timestamp].","examples":["[\n [\n 1656487800,\n 1656516600\n ]\n]"],"items":{"type":"array","items":{"type":"integer"}}},"skills":{"type":"array","description":"Define the skills needed to complete the job. This attribute supports multidimensional skills allowing users to add multiple skills.\n\nRead more about the behavior of this attribute in the [Multi-Dimensional Parameters](#multi-dimensional-parameters) section.","examples":["[\n 101,\n 102\n]"],"items":{"type":"integer","description":"Represents a kind of skill"}},"priority":{"type":"integer","description":"Specify the priority of this job. The valid values are in the range of [0, 100]. Default value is 0.\n\nPlease note that setting a priority will only decide whether this job will be assigned or not, but has nothing to do with the sequence of job fulfilment.","examples":["“priority”: 20"]},"setup":{"type":"integer","description":"Specify the job set-up duration, in seconds. `setup` is the one-time effort needed apart from working on the original task - for example, effort to record some information for compliance, or effort to set-up the equipment, or perform any other action for completing all steps required to fulfil the job.\n\nPlease note that `setup` time is applied only once for a given task location. `setup` time, unlike `service` time, is not repeated in case there are multiple tasks at the same location.","examples":["\"setup\": 300"]},"zones":{"type":"array","description":"An array of integers specifying the IDs of the zone(s) that this job belongs to. The job can be fulfilled by all vehicles which are allowed to complete tasks in the zone(s) assigned to this job. Please note following points about job zones:\n\n* If zone IDs are provided for any one of the jobs, then all other jobs should also be specified with zone IDs. Zone IDs provided here will override any zone geometries provided in the `zones` attribute and these IDs will be used for allocating appropriate vehicles.\n \n* Jobs can be auto-allocated to zones if this parameter is not specified while the zone geometries (either `zones.geometry` or `zones.geofence_id`) are provided.\n \n* Jobs not falling in any zones can be fulfilled by only those vehicles which are allowed to take up tasks outside zones as well. Refer to `vehicles` attribute for more information.","examples":["\"zones\":[1,2]"],"items":{"type":"integer"}}},"required":["id","location_index"]}},"shipments":{"type":"array","description":"The `shipments` object is used to collect the details of shipments that need to be completed as part of the optimization process.\n\nEach shipment should have a pickup and the corresponding delivery step.\n\nPlease note that either the `jobs` or the `shipments` attribute should be specified to build a valid request.","items":{"type":"object","properties":{"pickup":{"type":"object","properties":{"id":{"type":"integer","description":"Indicate the ID of this shipment pickup step. An error will be reported if there are duplicate IDs for multiple shipment pick-ups. The `pickup` and `delivery` steps belonging to a single shipment task can have the same IDs.\n\nPlease note `id` is mandatory when using the `shipments` attribute.","examples":["“id”: 10"]},"description":{"description":"Specify a custom description for the shipment pickup step.","type":"string"},"location_index":{"type":"integer","description":"Indicate the index of the location for this shipment pickup. The index references the locations present in the `location` array. The valid range of value is [0, length of `location` array).","examples":["“location_index”: 10"]},"service":{"type":"integer","description":"Provide the time duration, in seconds, needed to complete the shipment pickup.","examples":["\"service\":180"]},"time_windows":{"type":"array","description":"Describe time periods within which the shipment should be picked-up. The time periods should be expressed as a UNIX timestamp in seconds.\n\nPlease note that the time periods should not overlap with each other and should always follow the format of [start_timestamp, end_timestamp]","examples":["[\n [\n 1656570000,\n 1656620000\n ]\n]"],"items":{"type":"array","items":{"type":"integer"}}},"setup":{"type":"integer","description":"Specify the set-up duration, in seconds, for the pickup. `setup` is the one-time effort needed apart from working on the original task- for example, effort to record some information for compliance, or effort to set-up the equipment, or perform any other action for completing all steps required to fulfil the job.\n\nPlease note that `setup` time is applied only once for a given task location. `setup` time, unlike `service` time, is not repeated in case there are multiple tasks at the same location.","examples":["\"setup\":600"]}},"description":"Specify the details of the pickup step of the shipment.","required":["id","location_index"]},"delivery":{"type":"object","properties":{"id":{"type":"integer","description":"Indicate the ID of this shipment delivery step. An error will be reported if there are duplicate IDs for multiple shipment deliveries. The `pickup` and `delivery` steps belonging to a single shipment task can have the same IDs.\n\nPlease note `id` is mandatory when using the `shipments` attribute.","examples":["“id”: 10"]},"description":{"description":"Specify a custom description for the shipment delivery step.","type":"string"},"location_index":{"type":"integer","description":"Indicate the index of location for this shipment delivery. The index references the locations present in the `location` array. The valid range of value is [0, length of `location` array).\n\nPlease note `location_index` is mandatory when using the `shipment` attribute.","examples":["“location_index”: 10"]},"service":{"type":"integer","description":"Provide the time duration, in seconds, needed to complete the shipment delivery.","examples":["\"service\":180"]},"time_windows":{"type":"array","description":"Describe time periods within which the shipment should be delivered. The time periods should be expressed as a UNIX timestamp in seconds.\n\nPlease note that the time periods should not overlap with each other and should always follow the format of [start_timestamp, end_timestamp].","examples":["[\n [\n 1656570000,\n 1656620000\n ]\n]"],"items":{"type":"array","items":{"type":"integer"}}},"setup":{"type":"integer","description":"Specify the set-up duration, in seconds, for the delivery. `setup` is the one-time effort needed apart from working on the original task- for example, effort to record some information for compliance, or effort to set-up the equipment, or perform any other action for completing all steps required to fulfil the job.\n\nPlease note that `setup` time is applied only once for a given task location. `setup` time, unlike `service` time, is not repeated in case there are multiple tasks at the same location.","examples":["\"setup\":600"]}},"description":"Specify the details of the delivery step of the shipment.","required":["id","location_index"]},"amount":{"type":"array","description":"This parameter defines the quantity that needs to be shipped. This attribute supports multidimensional quantities, to support shipment of quantities of different units/dimensions. It is recommended to keep the dimensions of `amount` in `shipments` and that of `capacity` in `vehicles` consistent.\n\nPlease note that the `amount` will be added to the assigned vehicle's initial load.\n\nRead more about the behavior of this attribute in the [Multi-Dimensional Parameters](#multi-dimensional-parameters) section.","examples":["[\n 5,\n 8\n]"],"items":{"type":"integer"}},"skills":{"type":"array","description":"Define the skills needed to complete the shipment. This attribute supports multidimensional skills allowing users to add multiple skills for a shipment.\n\nRead more about the behavior of this attribute in the [Multi-Dimensional Parameters](#multi-dimensional-parameters) section.","examples":["[\n 101,\n 102\n]"],"items":{"type":"integer"}},"priority":{"type":"integer","description":"Describe the priority of this shipment. The valid values are in the range of [0, 100]. Default value is 0.\n\nPlease note that setting a priority will only decide whether this shipment will be assigned or not, but has nothing to do with the sequence of fulfilling shipments.","examples":["“priority”: 80"]},"zones":{"type":"array","description":"An array of integers specifying the IDs of the zone(s) that this shipment belongs to. The shipment can be fulfilled by all vehicles which are allowed to complete tasks in the zone(s) assigned to this shipment. If the pickup and delivery steps belong to different zones, then a vehicle should be allowed to fulfil tasks in both zones to take up such shipments. Please note following points about shipment zones:\n\n* If zone IDs are provided for any one of the shipments, then all other shipments should also be specified with zone IDs. Zone IDs provided here will override any zone geometries provided in the `zones` attribute and these IDs will be used for allocating appropriate vehicles.\n \n* Shipment steps can be auto-allocated to zones if this parameter is not specified while the zone geometries (either `zones.geometry` or `zones.geofence_id`) are provided.\n \n* Shipments not falling in any zones can be fulfilled by only those vehicles which are allowed to take up tasks outside zones as well. Refer to `vehicles` attribute for more information.","examples":["\"zones\":[2,5]"],"items":{"type":"integer"}}},"required":["pickup","delivery"]}},"depots":{"type":"array","description":"`depots` object is used to collect the details of a depot. Depots can be used as a starting point and/or ending point for the routes and vehicles.","items":{"type":"object","properties":{"id":{"type":"integer","description":"Provide an unique ID for the depot. Please note `id` is mandatory when using the `depots` object.","examples":["“id”:5"]},"location_index":{"type":"integer","description":"Specify the index of coordinates (in the `location` array) denoting the depot’s location. The valid range of values is [0, length of `location` array). If the location index exceeds the count of input locations in the `location` array, the API will report an error.\n\nPlease note the `location_index` is mandatory when using the `depots` object.","examples":["“location_index”:5"]},"description":{"description":"Add a custom description for the depot.","type":"string","examples":["“description”:”Los_Angeles_depot”"]}},"required":["id","location_index"]}},"options":{"type":"object","properties":{"objective":{"type":"object","properties":{"travel_cost":{"description":"The `travel_cost` parameter specifies the type of cost used by the solver to determine the routes.\n\nIf the `travel_cost` parameter is set to `distance`, the solver will minimize the total distance traveled by vehicles while determining a solution. This objective would be useful in cases where the primary objective is to reduce fuel consumption or travel expenses.\n\nIf the `travel_cost` parameter is set to `duration`, the solver will minimize the total time taken by the vehicles to complete all tasks while determining a solution. This objective would be useful in cases where the primary objective is to minimize completion time or maximize the number of orders fulfilled within a given time window.\n\nIf the `travel_cost` parameter is set to `air_distance`, the solver will try to calculate the distance,in meters, between two points using the great-circle distance formula (i.e., the shortest distance between two points on a sphere) instead of the actual road distance. This would be useful in cases where the delivery locations are far apart and the road distance between them is significantly longer than the actual straight-line distance. For example, in Drone Delivery services.\n\nIf the `travel_cost` is set to `customized` the solver would use the custom cost values provided by the user (in `cost_matrix` attribute) and prefer a solution with lower overall cost. This enables the user to have greater control over the routes preferred by the solver and hence the sequence in which the jobs are completed.","type":"string","default":"duration","examples":["\"travel_cost\": \"distance\""],"enum":["duration","distance","air_distance","customized"],"x-enum-options":[{"value":"duration"},{"value":"distance"},{"value":"air_distance"},{"value":"customized"}]},"custom":{"type":"object","properties":{"type":{"description":"The `type` parameter accepts two inputs:\n\n- `min`: This type of customized objective will minimize the metric provided in the `value` parameter.\n\n- `min-max`: This type of customized objective will approximate an even distribution of the metric provided in the `value` parameter, among all the routes in solution.\n\nPlease note that `type` is mandatory only when using `custom` attribute.","type":"string","enum":["`min`","`min-max`"],"x-enum-options":[{"value":"`min`"},{"value":"`min-max`"}]},"value":{"description":"The `value` parameter accepts four inputs, two of them are valid for `min` type and other two are valid for `min-max` type custom objective. Let’s look at the values for `min` type objective:\n\n- `vehicles`: Solver will minimize the number of vehicles used in the solution.\n\n- `completion_time`: Solver will minimize the total time taken to complete all tasks.\n\nThe next set of values are acceptable when `type` is set to `min-max`.\n\n- `tasks`: Solver will evenly distribute the tasks on each route.\n\n- `travel_cost`: Solver will assign tasks such that the traveling cost of each route is within a close range of other routes.\n\nPlease note that `value` is mandatory only when using `custom` attribute. The above values provide flexibility to tune the optimization algorithm to fulfill practical objectives beyond the relatively simpler time or distance minimization approaches.","type":"string","enum":["vehicles","completion_time","travel_cost","tasks"],"x-enum-options":[{"value":"vehicles"},{"value":"completion_time"},{"value":"travel_cost"},{"value":"tasks"}]}},"description":"The `custom` parameter is used to define special objectives apart from the simpler travel cost minimization objectives.","required":["type","value"]}},"description":"This attribute is used to configure the objective of the optimization job."},"constraint":{"type":"object","properties":{"max_vehicle_overtime":{"type":"integer","description":"This is a soft constraint for vehicle overtime. Overtime is defined as the time that a vehicle spends to complete a set of jobs after its time window has ended. `max_vehicle_overtime` attribute specifies the maximum amount of overtime a vehicle can have, in seconds. If a vehicle's overtime exceeds this value, it will be considered a violation of this constraint.\n\nPlease note that this constraint applies to all vehicles in the optimization request.","examples":["“max_vehicle_overtime”: 1800"]},"max_visit_lateness":{"type":"integer","description":"This is a soft constraint for permissible delay, in seconds, to complete a job or shipment after its time window is over. If a job or shipment's lateness exceeds this value, it will be considered a violation of this constraint.\n\nPlease note that this constraint applies to all tasks in the optimization request.","examples":["“max_visit_lateness”: 180"]},"max_activity_waiting_time":{"type":"integer","description":"This is a hard constraint which specifies the maximum waiting time, in seconds, for each `step`. It ensures that the vehicles do not have unreasonable wait times between jobs or shipments. This feature is useful for use cases where avoiding long wait times between jobs or shipments is a primary concern.\n\n\nPlease note that the waiting time constraint applies to all tasks in the optimization request, ensuring that no single task exceeds the specified maximum waiting time. When being used together with `relations` attribute, this parameter is effective only for `in_same_route` relation type.","examples":["“max_activity_waiting_time”: 300"]}},"description":"This attribute defines both the soft and hard constraints for an optimization job.\n\nSoft constraints are constraints that do not necessarily have to be satisfied, but the optimization algorithm will try to satisfy them as much as possible. Whereas the hard constraints are the constraints that will not be violated by the solver. Users can use multiple constraints together.\n\nPlease note that soft constraints are ineffective when using `relations` attribute in a request. The hard constraint, `max_activity_waiting_time`, is effective only when relation type is `in_same_route` and ineffective for all other types."},"routing":{"type":"object","properties":{"mode":{"description":"Define the traveling mode to be used for determining the optimized routes.","type":"string","default":"`car`","examples":["\"mode\": \"truck\""],"enum":["`car`","`truck`"],"x-enum-options":[{"value":"`car`"},{"value":"`truck`"}]},"traffic_timestamp":{"type":"integer","description":"Specify the general time when the job needs to be carried out. The time should be expressed as an UNIX timestamp in seconds format. The solver will take into account the general traffic conditions at the given time to determine the routes and their ETAs.","examples":["“traffic-timestamp”: 1688115600"]},"truck_size":{"description":"Specify the truck dimensions, in centimeters, in the format of “height,width,length”. Please note that this parameter is effective only when `mode=truck`.","type":"string","examples":["\"truck_size\":\"200,210,600\""]},"truck_weight":{"type":"integer","description":"Specify the truck weight including the trailers and shipped goods, in kilograms. Please note that this parameter is effective only when `mode=truck`.","examples":["“truck_weight”: 5000"]},"avoid":{"type":"array","description":"Specify the type of objects/maneuvers that the route should avoid. If `none` is provided along with other values, an error is returned as a valid route is not feasible. The values are case sensitive.","examples":["[\n \"highway\",\n \"toll\"\n]"],"items":{"type":"string","enum":["`toll`","`highway`","`none`"],"x-enum-options":[{"value":"`toll`"},{"value":"`highway`"},{"value":"`none`"}]}},"disable_cache":{"type":"boolean","description":"Specify if the optimizer should cache the matrix result set (containing ETAs and distances) for the given set of locations in the request. Once the results are cached, the optimizer can use it during the next 60 mins if exactly the same set of locations are provided again. Please note that if a cached result is retrieved, the timer is reset and that result will be available for another 60 mins.\n\nIf the users want to regenerate the result set, they can set this parameter to `true` and optimizer will not use the cached results.\n\nThis feature is helpful in expediting the optimization process and generate results quickly. It also helps users to quickly simulate route plans for different combinations of constraints for a given set of locations."},"hazmat_type":{"type":"array","description":"Specify the type of hazardous material being carried and the service will avoid roads which are not suitable for the type of goods specified. Provide multiple values separated by a comma `,` .\n\nPlease note that this parameter is effective only when `mode=truck`.","examples":["\"hazmat_type\" : [\"explosive\",\"harmful_to_water\"]"],"items":{"type":"string","enum":["`general`","`circumstantial`","`explosive`","`harmful_to_water`"],"x-enum-options":[{"value":"`general`"},{"value":"`circumstantial`"},{"value":"`explosive`"},{"value":"`harmful_to_water`"}]}}},"description":"This attribute is used to define the routing configurations for the optimization job."},"grouping":{"type":"object","properties":{"order_grouping":{"type":"object","properties":{"grouping_diameter":{"type":"number","description":"Specify the straight line distance, in meters, which will be used to identify the tasks that should be part of a group. The default value is `null`."}},"description":"Specify the criteria for grouping nearby tasks. The grouped tasks will be treated as one stop by the optimizer and no cost would be incurred when driver travels to different tasks within a group.\n\nUsers can use this feature to model use cases like multiple deliveries in a building complex or a condo."},"route_grouping":{"type":"object","properties":{"zone_diameter":{"type":"number","description":"Specify the diameter of the zone, routes within which will be prioritised before routes falling in other zones. Please note that `zone_diameter` is the straight line distance, in meters.","default":1000},"penalty_factor":{"type":"number","description":"Specify a non-negative value which indicates the penalty of crossing zones on the same route. Default penalty value is 0.\n\nA higher value, for example 30.0, will place a higher penalty on zone violations and hence push the optimizer to prefer a solution without any zone violations, where all tasks in a single region are fulfilled before any tasks in other regions or outside the current region. Whereas a lower value, say 5.0, will place a lower penalty allowing the optimizer to return solutions which may have few violations, say a couple of routing zone violations in our example. A still lower penalty factor, like 1.0, may have several zone violations.","examples":["20.5"]}},"description":"Specify the criteria for prioritising routes in a zone over routes that are part of another zone. As a result, all the tasks falling in a zone will be fulfilled before any tasks that are part of a different zone."}},"description":"Set grouping rules for the tasks and routes.\n\n* Use `order_grouping` to group nearby tasks\n \n* Use `route_grouping` to control route sequencing."}},"description":"It represents the set of options that can be used to configure optimization algorithms so that the solver provides a solution that meets the desired business objectives."},"solution":{"type":"array","description":"This attribute is related to the re-optimization feature. It allows for the previous optimization result to be provided in case new orders are received and the solution needs to be re-planned. The `solution` attribute should contain the same routes as the previous optimization result. `solution` attribute is an array of objects with each object corresponding to one route.","items":{"type":"object","properties":{"vehicle":{"oneOf":[{"description":"Specify the ID of the vehicle that was assigned to the route. Please use the same value type that was used for the original request.\n\nPlease note that this is mandatory when using the `solution` attribute and providing an empty string would result in error. The IDs are case-sensitive.","type":"string","examples":["\"vehicle\":\"sample_ID\""]},{"type":"integer","description":"Specify the ID of the vehicle that was assigned to the route. Please use the same value type that was used for the original request.\n\nPlease note that this is mandatory when using the `solution` attribute.","examples":["10"]}]},"cost":{"type":"integer","description":"Specify the cost of the route.","examples":["“cost”:19924"]},"steps":{"type":"array","description":"Describe the steps in this route.","items":{"type":"object","properties":{"type":{"description":"Specify the type of the step.","type":"string","examples":["\"type\": \"pickup\""],"enum":["start","end","job","pickup","delivery","break"],"x-enum-options":[{"value":"start"},{"value":"end"},{"value":"job"},{"value":"pickup"},{"value":"delivery"},{"value":"break"}]},"id":{"type":"integer","description":"The ID of the step. This field is mandatory for all steps except for `start` and `end` type.\n\nPlease note that the ID provided here must also be present in either the `jobs` or the `shipments` objects.","examples":["“id”:10"]},"arrival":{"type":"integer","description":"Specify the time at which the vehicle arrives at the `step` location. If `time_windows` is provided, then `arrival` will be an UNIX timestamp expressed in seconds. Otherwise, it will be the total duration, in seconds, elapsed since the start of the route.\n\nPlease note that arrival is mandatory when using the `solution` object.","examples":["“arrival”:1693302400"]},"duration":{"type":"integer","description":"Specify the drive time, in seconds, from the start of the route up until the start of the `step`. Please note that the value of this parameter accumulates with each step","examples":["“duration”:600"]},"location":{"type":"array","description":"Specify the location coordinates of the step in the [latitude, longitude] format. Alternatively, `location_index` property can also be used to specify the location of the step.\n\nPlease note that either `location` or `location_index` is mandatory.","examples":["[\n 24.14381,\n 47.30476\n]"],"items":{"type":"number"}},"location_index":{"type":"integer","description":"Specify the index (in the `location` array) of the location coordinates where the step is performed. The valid range of values is [0, length of `location` array). Alternatively, `location` property can also be used to specify the location.\n\nPlease note that either `location` or `location_index` is mandatory.","examples":["“location_index”: 12"]},"service":{"type":"integer","description":"Specify the service time, in seconds, at this step.","examples":["“service”:600"]},"waiting_time":{"type":"integer","description":"Specify the wait time of the vehicle at this step, in seconds.","examples":["\"waiting_time\": 600"]},"load":{"type":"array","description":"Specify the load on the vehicle after completing this step. In case of multiple dimensions, please specify the load for each type.","examples":["[\n 50,\n 80\n]"],"items":{"type":"integer"}},"description":{"description":"Specify the description of this step.","type":"string","examples":[]},"setup":{"type":"integer","description":"Specify the set-up duration, in seconds, needed at the step."},"distance":{"type":"integer","description":"Specify the distance covered, in meters, from the start of the route up until the current step.\n\nPlease note that the value of this parameter accumulates with each step. In case , the `travel_cost: air_distance`, then the distance here should be the straight line distance.","examples":["\"distance\": 3000"]}},"description":"Describe details about a step of a route","required":["type","id","arrival"]}},"duration":{"type":"integer","description":"Specify the total drive duration of the route, in seconds.","examples":["\"duration\": 1548"]},"distance":{"type":"integer","description":"Specify the total distance of the route, in meters.","examples":["1548"]},"geometry":{"description":"Specify the geometry of this route encoded in polyline format.","type":"string","examples":["}ebGgcsxRE?CuDOYCYAG???"]},"service":{"type":"integer","description":"Specify the total service time for the route, in seconds.","examples":["“service”:600"]},"waiting_time":{"type":"integer","description":"Specify the total waiting time of the vehicle on the route, in seconds.","examples":["“waiting_time”:600"]},"priority":{"type":"integer","description":"Specify the sum of priorities of all tasks on the route.","examples":["150"]},"delivery":{"type":"array","description":"Specify the total quantities, for each dimension (or unit), of deliveries performed in the route.","examples":["[\n 50,\n 30\n]"],"items":{"type":"integer"}},"pickup":{"type":"array","description":"Specify the total quantities, for each dimension (or unit), of pickups performed in the route.","examples":["[\n 50,\n 30\n]"],"items":{"type":"integer"}},"description":{"description":"Specify the description of the assigned vehicle.","type":"string","examples":[]},"setup":{"type":"integer","description":"Specify the total set-up duration, in seconds, needed for the tasks on the route."}},"required":["vehicle","cost","steps"]}},"unassigned":{"type":"object","properties":{"jobs":{"type":"array","description":"Specify the unassigned job IDs from the previous optimization result. Please note the IDs should also be present in the `jobs` part of the input.","examples":["[\n 1,\n 2\n]"],"items":{"type":"integer"}},"shipments":{"type":"array","description":"Specify the unassigned shipment pickup & delivery IDs from the previous optimization result. Both the pickup & delivery steps of a shipment should be part of the same integer array.","examples":["[\n [\n 1,\n 1\n ],\n [\n 2,\n 2\n ]\n]"],"items":{"type":"array","items":{"type":"integer"}}}},"description":"`unassigned` attribute is related to the re-optimization feature. This attribute should contain the tasks that were not assigned during an earlier optimization process. Please note that the `unassigned` part in request should be consistent with the `unassigned` part in the previous optimization result.\n\nUsers can reduce the number of unassigned tasks in the re-optimized solution, by following strategies such as:\n\n- Extending the time windows for vehicles or tasks to give more flexibility\n\n- Adding more vehicles to the optimization problem\n\n- Adjusting the priority of different tasks to balance the workload more evenly\n\n- Modifying other constraints or parameters to make the problem more solvable\n\nUltimately, the goal is to minimize the number of unassigned tasks while still meeting all the necessary constraints and objectives."},"description":{"description":"Define the optimization job using any custom message. This description is returned as is in the response.","type":"string","examples":["\"description\": \"Sample Optimization\""]},"relations":{"type":"array","description":"`relations` attribute is an array of individual relation objects. `type` parameter and `steps` object are mandatory when using this attribute.\n\nPlease note that some `time_windows` might be violated to honor the `relations`. Also, the soft constraints are not effective when using the `relations` attribute.\n\nRead more about this attribute in the [Relations Object](#relations-object) section.","items":{"type":"object","properties":{"type":{"description":"Specifies the type of relation constraint. The following types are supported:\n\n- `in_same_route`: Ensures that all `steps` are covered in the same route in solution.\n\n- `in_sequence`: Ensures that all steps are in the same route and their sequence matches the order specified in the `steps` field. Insertion of new steps between the `steps` specified, is allowed.\n\n- `in_direct_sequence`: Similar to `in_sequence`, but insertion of new `steps` is not allowed in the final route.\n\n- `precedence`: Restricts the travel time between the first step and second step. If the precedence requirement cannot be satisfied, then the task specified at the second step will not be assigned. Only 2 steps can be specified in a single `precedence` type relations. Please use multiple `precedence` relations to apply restrictions on more than 2 tasks.\n\n\nIf the `vehicle` field is specified in the relations input, all steps will be served by that particular vehicle. Otherwise, the route can be allocated to any feasible vehicle.\n\nPlease note that the `type` field is mandatory when using the `relations` object.","type":"string","examples":["\"type\": \"in_direct_sequence\""],"enum":["`in_same_route`","`in_sequence`","`in_direct_sequence`","`precedence`"],"x-enum-options":[{"value":"`in_same_route`"},{"value":"`in_sequence`"},{"value":"`in_direct_sequence`"},{"value":"`precedence`"}]},"steps":{"type":"array","description":"The `steps` property specifies the tasks or steps that are part of the relation and must be carried out in a manner defined in the `type` parameter. Please note you can add any number of steps here, except when relation type is `precedence` where only 2 tasks can be added.","items":{"type":"object","properties":{"type":{"description":"Specifies the type of the step. The `start` and `end` step types have to be the first and last steps, respectively, in a relation.\n\nPlease note that the `type` is mandatory when using the `relations` object.","type":"string","examples":["\"type\": \"job\""],"enum":["start","end","job","pickup","delivery"],"x-enum-options":[{"value":"start"},{"value":"end"},{"value":"job"},{"value":"pickup"},{"value":"delivery"}]},"id":{"type":"integer","description":"This represents the ID of the task and should be consistent with the input IDs provided in the `jobs` or `shipments` objects for a given step. The `id` is required for all steps other than `start` and `end`.","examples":["\"id\":3"]}},"required":["type"]}},"id":{"type":"integer","description":"**Deprecated! Please use the** `vehicle` **parameter to specify the vehicle ID.**\n\nSpecifies the ID of the vehicle that would fulfil the steps. ID should be consistent with input IDs provided in the `vehicles` object.","examples":["“id”: 10"]},"vehicle":{"oneOf":[{"description":"Specifies the ID of the vehicle that would fulfil the steps. ID should be consistent with input IDs provided in the `vehicles` object. Providing the same vehicle ID to multiple 'relations' is prohibited and the IDs are case-sensitive.","type":"string","examples":["\"vehicle\": \"sample_ID\""]},{"type":"integer","description":"Specifies the ID of the vehicle that would fulfil the steps. ID should be consistent with input IDs provided in the `vehicles` object. Providing the same vehicle ID to multiple 'relations' is prohibited.","examples":["10"]}]},"max_duration":{"type":"integer","description":"This attribute is effective only when `precedence` type relation is used.\n`max_duration` restricts the travel time of the vehicle to go from location of first task to the location of second task specified in `steps` object. The unit for this parameter is seconds. It accepts values greater than 0 only.\n\nPlease note that `max_duration` is a hard constraint. Hence, if aggressive durations are provided such that the second task cannot be reached within the specified `max_duration`, it might be done before the first task (usually in case of `jobs`) or remain un-assigned (usually in case of `shipments`).","examples":["\"max_duration\": 300"]},"min_duration":{"type":"integer","description":"This attribute is effective only when `precedence` type relation is used. Use `min_duration` to enforce a minimum time-gap between the two tasks specified in `steps` object. When specified, the second task will get completed after a gap of `min_duration` with respect to the first task. The unit for this parameter is seconds.\n\nPlease note that `min_duration` is implemented as a soft constraint and it can be violated in presence of other relation types. The optimizer will tend to provide solutions where `min_duration` is not violated, but it is not guaranteed.","examples":["\"min_duration\": -300"]}},"required":["type","steps"]}},"cost_matrix":{"type":"array","description":"An array of arrays to denote the user-defined costs of traveling between each pair of geographic coordinates mentioned in the `location` array. The number of arrays should be equal to the number of coordinate points mentioned in the `location` array and each array should contain the same number of elements as well. Please note that `cost_matrix` is effective only when `travel_cost=customized`. Read more about this attribute in the [Custom Cost Matrix](#custom-cost-matrix) section.","examples":["[\n [\n 0,\n 4\n ],\n [\n 4,\n 0\n ]\n]"],"items":{"type":"array","items":{"type":"integer"}}},"zones":{"type":"array","description":"An array of objects to specify geometry of all the zones involved. Each object corresponds to a single zone. A valid zone can be a [geoJSON](https://datatracker.ietf.org/doc/html/rfc7946#page-9) polygon, multi-polygon or a geofence created using [NextBillion.ai](http://NextBillion.ai)'s [Geofence API](https://docs.nextbillion.ai/docs/tracking/api/geofence).\n\nPlease note that\n\n* Each zone should have a geometry specified either through`geometry` or through the `geofence_id` parameter.\n \n* When zone IDs are not provided for individual tasks (jobs or shipments) then the API will automatically allocate zones based on the task's geolocation and the geometries of the zones provided here. Otherwise, if the zone IDs are provided while configuring individual tasks, the zone IDs will override the geometries provided here.","items":{"type":"object","properties":{"id":{"type":"integer","description":"Provide an ID for the zone. This field is mandatory when adding zones."},"geometry":{"type":"object","properties":{"description":{"description":"Provide a description to identify the zone","type":"string"},"type":{"description":"Type of the geoJSON geometry. Should always be `Polygon` or `MultiPolygon`.","type":"string"},"coordinates":{"type":"array","description":"An array of coordinates in the [longitude, latitude] format, representing the zone boundary.","items":{"type":"array","items":{"type":"number"}}}},"description":"It is a [geoJSON object](https://datatracker.ietf.org/doc/html/rfc7946#page-9) with details of the geographic boundaries of the zone. Only \"Polygon\" and \"MultiPolygon\" geoJSON types are supported.\n\nPlease note that one of `geometry` or `geofence_id` should be provided."},"geofence_id":{"description":"Provide the ID of a pre-created geofence using the [Geofence API](https://docs.nextbillion.ai/docs/tracking/api/geofence).\n\nPlease note that one of `geometry` or `geofence_id` should be provided.","type":"string"}},"required":["id"]}}},"required":["locations","vehicles"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"A unique ID which can be used in the Optimization GET method to retrieve the result of optimization.","type":"string","examples":[]},"message":{"description":"Displays an acknowledgement message once the job is submitted.","type":"string","examples":[]},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages/codes are returned in case of errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string","const":"Ok"},"warnings":{"type":"array","description":"Display the warnings for the given input parameters, values and constraints.","items":{"type":"string"}}}}}}}},"tags":["Optimization v2"]}},"/v1/postalcode":{"post":{"summary":"Retrieve coordinates","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}}],"requestBody":{"required":true,"description":"Note:\n1. The user can include only the `at` parameter in the API request to obtain information about the postal code a specific geographic coordinate belongs to.\n\nFor example:\n{ \n\"at\":{\"lat\": 28.661332, \"lng\":77.197106}\n} \n\n\n2. To retrieve information about a specific postal code, include both the `postalcode` and the `country` parameter in the request. \nFor example:\n{ \n\"postalcode\": \"110007\",\n\"country\": \"India\"\n}\n\n\nWe do not recommend using both `postalcode` and `at` together in a single request","content":{"application/json":{"schema":{"type":"object","properties":{"postalcode":{"description":"Provide the postal code for which the information is needed. At least one of (`postalcode` + `country`) or `at` needs to be provided.\nPlease note that only 1 postal code can be requested. [See this example](#note).","type":"string"},"country":{"description":"Country containing the postal code or the location. It is mandatory if `postalcode` is provided in the request. [See this example](#note).\n\nPlease check the [API Query Limits](#api-query-limits) section below for a list of the countries covered by the Geocode Postcode API. Users can provide either the name or the alpha-2/3 code as per the [ISO 3166-1 standard](https://en.wikipedia.org/wiki/ISO_3166-1) of a country covered by the API as input for this parameter.","type":"string"},"at":{"type":"object","properties":{"lat":{"type":"number","description":"Latitude of the location."},"lng":{"type":"number","description":"Longitude of the location."}},"description":"Location coordinates that you want to get the postal code of. If not providing `postalcode` in the request, `at` becomes mandatory. \nPlease note that only 1 point can be requested. [See this example](#note)."},"format":{"description":"Specify the format in which the boundary details of the post code will be returned. When specified, the boundary details will be returned in the `geojson` format. When not specified, the boundary details are returned in general format.","type":"string","examples":["\"format\":\"geojson\""],"enum":["`geojson`"],"x-enum-options":[{"value":"`geojson`"}]}}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"warning":{"type":"array","description":"Returns a message, in case the input provided triggers any warnings.","items":{"type":"string"}},"places":{"type":"object","properties":{"geopoint":{"type":"object","properties":{"lat":{"type":"number","description":"Latitude of the location."},"lng":{"type":"number","description":"Longitude of the location."}},"description":"Refers to the geographic coordinate denoting the center of the postal code in latitude, longitude format."},"country":{"description":"Name of the country containing the geographic coordinate point / postal code provided in the input request.","type":"string"},"countryCode":{"description":"Returns the [alpha-3 ISO code](https://www.iban.com/country-codes) of the country containing the `postalcode` returned.","type":"string"},"state":{"description":"Name of the state or province containing the geographic coordinate point / postal code provided in the input request.","type":"string"},"district":{"description":"Name of the district or region containing the geographic coordinate point / postal code provided in the input request.","type":"string"},"subdistrict":{"description":"Name of the sub-district or sub-region containing the postal code or geographic coordinate point / postal code provided in the input request","type":"string"},"postalcode":{"description":"Returns the postal code associated with the requested geographic coordinate point or the postal code itself as provided in the input API request.","type":"string"},"address":{"description":"Returns the address of the `postalcode` returned.","type":"string"},"distance":{"type":"number","description":"This property is returned only when the API is requested to fetch the postal code containing the location coordinate provided in the `at` input parameter. `distance` denotes the straight line distance, in meters, from the requested location coordinate to the postal code centroid."},"boundary":{"type":"object","properties":{"multipolygon":{"type":"array","description":"An array of objects containing information about all the polygons forming the postal code area. In case, the postal code area is formed by multiple polygons not containing each other, a matching count of `polygon` objects will be returned.\n\nPlease note that this object is returned only when `format` field is not specified in the input, otherwise it is not present in the response.","items":{"type":"object","properties":{"polygon":{"type":"array","description":"An object containing the details of a single polygon that is a part of the postal code area. In case the postal code area contains other polygon(s), the details of such polygon(s) would be returned through an array of `points` object.","items":{"type":"object","properties":{"points":{"type":"array","description":"Represents an array of geographic coordinates that define a `polygon` boundary.","items":{"type":"object","properties":{"lat":{"type":"number","description":"Latitude of the coordinate."},"lng":{"type":"number","description":"Longitude of the coordinate."}}}}}}}}}},"type":{"description":"Type of the geoJSON object. This parameter is returned when the `format` field is set to `geojson` in the input request, otherwise it is not present in the response. The contents of this object follow the [geoJSON standard](https://datatracker.ietf.org/doc/html/rfc7946).","type":"string"},"geometry":{"type":"object","properties":{"type":{"description":"Type of the geoJSON geometry.","type":"string"},"coordinates":{"type":"array","description":"An array of coordinates in the [longitude, latitude] format, representing the coordinates points which lie on the boundary of the postal code area.","items":{"type":"array","items":{"type":"array","items":{"type":"number"}}}}},"description":"An object with geoJSON details of the boundary. This object is returned when the `format` field is set to `geojson` in the input request, otherwise it is not present in the response. The contents of this object follow the [geoJSON standard](https://datatracker.ietf.org/doc/html/rfc7946)."},"properties":{"description":"Property associated with the geoJSON shape.","type":"string"}},"description":"An object containing the boundary details of the postal code area. This object will not be returned in case the boundary information of the postal code provided is not available (only for selected countries).\n\nPlease note the contents of this object will change based on the `format` field in the input. When the `format` field is not present in the input this object would contain `multipolygon` - `polygon` - `points` objects depending on the boundary of the given postal code. When the `format` field is present in the input, then the contents of this object would match the [geojson format and standard](https://datatracker.ietf.org/doc/html/rfc7946)."}},"description":"An object that contains details about the place that was provided in the input."}}}}}}},"tags":["Geocode Postal Code"]}},"/v1/multi-geocode/search":{"post":{"description":"The method enables searching for known places from multiple data sources\n\nUse this method to find known places in default or your own custom (proprietary) dataset and get a combined search result. It accepts free-form, partially correct or even incomplete search texts. Results would be ranked based on the search score of a place.","summary":"Search Place","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"description":"A free-form, complete or incomplete string to be searched. It allows searching for places using keywords or names.","type":"string","examples":["“query”: “Taj Mahal”","“query”: “Eiff”","“query”: “Cape’","“query”: “Clifornia”"]},"at":{"type":"object","properties":{"lat":{"type":"number","description":"Latitude coordinate of the location"},"lng":{"type":"number","description":"Longitude coordinate of the location."}},"description":"Specify the center of the search context expressed as coordinates.","examples":[],"required":["lat","lng"]},"limit":{"type":"integer","description":"Sets the maximum number of results to be returned.","examples":["“limit” :15","“limit” : 20"],"default":10},"radius":{"description":"Filters the results to places within the specified radius from the 'at' location.\n\nNote: Supports 'meter' (m) and 'kilometer' (km) units. If no radius is given, the search method returns as many results as specified in `limit`.","type":"string","examples":["“radius”: “10m”","“radius”: “10km”"]},"country":{"description":"Country of the search context provided as comma-separated [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country codes. \nNote: Country codes should be provided in uppercase.","type":"string","examples":["“country”:”IND”","“country”:”USA”"]},"state":{"description":"Specifies the state of the search place.","type":"string","examples":["“state”: “California”"]},"city":{"description":"Specifies the primary city of the place.","type":"string","examples":["“city”: “Glendale”"]},"street":{"description":"Specifies the street name of the search place.","type":"string","examples":["“street”: “Americana Way”"]},"district":{"description":"Specifies the district of the search place.","type":"string","examples":["“district”: “City Center”"]},"subDistrict":{"description":"Specifies the subDistrict of the search place.","type":"string","examples":["“subDistrict”: “Golkonda”"]}},"required":["query","at"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"entities":{"type":"array","description":"An array of objects containing the search result response. Each object represents one place returned in the search response. An empty array would be returned if no matching place is found.","items":{"type":"object","properties":{"docId":{"description":"The unique NextBillion ID for the result item. This ID can be used as input in “Get Place”, “Update Place”, “Delete Place” methods.","type":"string"},"place":{"type":"array","description":"This parameter represents the place details, including geographical information, address and other related information.","items":{"type":"object","properties":{"geopoint":{"type":"object","properties":{"lat":{"type":"number","description":"This parameter represents the latitude value of the place."},"lng":{"type":"number","description":"This parameter represents the longitude value of the place."}},"description":"This parameter represents the geographical coordinates of the place. It includes the latitude and longitude values."},"country":{"description":"This parameter represents the country of the place.","type":"string"},"state":{"description":"This parameter represents the state or region of the place.","type":"string"},"city":{"description":"This parameter represents the city or town of the place.","type":"string"},"district":{"description":"This parameter represents the district of the place.","type":"string"},"subDistrict":{"description":"This parameter represents the sub-district or locality of the place.","type":"string"},"street":{"description":"This parameter represents the street name of the place.","type":"string"},"postalCode":{"description":"This parameter represents the postal code or ZIP code of the place.","type":"string"},"house":{"description":"This parameter represents the house or building number of the place.","type":"string"},"building":{"description":"This parameter represents additional building information if applicable.","type":"string"},"poi":{"type":"object","properties":{"title":{"description":"A title that describes the point of interest.","type":"string"}},"description":"This parameter represents a point of interest within the place. A Point of Interest (POI) refers to a specific location or area that is of interest to individuals for various reasons. It could be a landmark, tourist attraction, business, or any other location that people might find important or intriguing."},"address":{"description":"This parameter represents the complete address of the place, including the street, city, state, postal code and country.","type":"string"}}}},"dataSource":{"type":"object","properties":{"source":{"description":"This parameter represents the source of the data.","type":"string"},"refId":{"description":"This parameter represents the unique reference ID associated with the data source.","type":"string"},"status":{"description":"This parameter indicates if a place is searchable.","type":"string","enum":["enable","disable"],"x-enum-options":[{"value":"enable"},{"value":"disable"}]}},"description":"It contains information about the dataset that returns the specific result"},"score":{"type":"integer","description":"Integer value representing how good the result is. Higher score indicates a better match between the search query and the result. This can be used to accept or reject the results depending on how “relevant” a result is, for a given use case"}}}}}}}}},"400":{"description":"Such as missing parameters or parameters with invalid value types (for example value cannot be parsed into numbers).","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}},"tags":["Multi Geocoding"]}},"/v1/multi-geocode/place/{docId}":{"get":{"description":"Use this method to get the details of previously created custom places using its NextBillion ID.","summary":"Get Place","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}},{"in":"path","name":"docId","description":"Unique NextBillion ID of the location to be looked up.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"docId":{"description":"The unique NextBillion ID for the result item.","type":"string"},"place":{"type":"array","description":"This parameter represents the place details, including geographical information, address and other related information.","items":{"type":"object","properties":{"geopoint":{"type":"object","properties":{"lat":{"type":"number","description":"This parameter represents the latitude value of the place."},"lng":{"type":"number","description":"This parameter represents the longitude value of the place."}},"description":"This parameter represents the geographical coordinates of the place. It includes the latitude and longitude values."},"country":{"description":"This parameter represents the country of the place.","type":"string"},"state":{"description":"This parameter represents the state or region of the place.","type":"string"},"city":{"description":"This parameter represents the city or town of the place.","type":"string"},"district":{"description":"This parameter represents the district of the place.","type":"string"},"subDistrict":{"description":"This parameter represents the sub-district or locality of the place.","type":"string"},"street":{"description":"This parameter represents the street name of the place.","type":"string"},"postalCode":{"description":"This parameter represents the postal code or ZIP code of the place.","type":"string"},"house":{"description":"This parameter represents the house or building number of the place.","type":"string"},"building":{"description":"This parameter represents additional building information if applicable.","type":"string"},"poi":{"type":"object","properties":{"title":{"description":"A title that describes the point of interest.","type":"string"}},"description":"This parameter represents a point of interest within the place. A Point of Interest (POI) refers to a specific location or area that is of interest to individuals for various reasons. It could be a landmark, tourist attraction, business, or any other location that people might find important or intriguing."},"address":{"description":"This parameter represents the complete address of the place, including the street, city, state, postal code and country.","type":"string"}}}},"dataSorce":{"type":"object","properties":{"source":{"description":"This parameter represents the current dataset source of the information returned in the result.","type":"string"},"refId":{"description":"This parameter represents the unique reference ID associated with the data source.","type":"string"},"status":{"description":"This parameter indicates if a place is currently discoverable by search API or not.","type":"string","enum":["enable","disable"],"x-enum-options":[{"value":"enable"},{"value":"disable"}]}},"description":"It displays the information about the current source and current status of the place. Use the “Update Place” method to change these values, as needed."},"score":{"type":"integer","description":"It returns the system calculated weighted score of the place. It depends on how ‘richly’ the place was defined at the time of creation. In order to modify the score, use “Update Place” method and update information for parameters which are not set currently. As an alternative, you can directly update the `score` to a custom value."}}}}}}},"tags":["Multi Geocoding"]},"delete":{"description":"The \"Delete Place\" method enables businesses to delete a previously created place\n\nUse this method to delete a previously created place. Please note that the place associated with the specified docID only would be deleted. As a result, once a place is deleted, the search API can still return valid results from the default datasets or others, if present.","summary":"Delete Place","parameters":[{"in":"path","name":"docId","description":"Unique NextBillion ID of the location to be deleted","required":true,"schema":{"type":"string"}},{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"description":"Represents the status of the response.","type":"string"},"msg":{"description":"This could be “Ok” representing success or “not found” representing error in processing the request.","type":"string"}}}}}}},"tags":["Multi Geocoding"]},"put":{"description":"The \"Update Place\" method allows businesses to update the attributes of an existing place.\n\nThis method allows you to update the attributes of custom places. In effect, updating a place replaces the current information in search results with the updated information associated with the specific docID. Use this method to enhance the accuracy/usability of your search results with respect to the default dataset to suit your business needs.\n\n\nIf you want to prioritize a particular result in your search results, update the ‘score’ of that specific place. \nAlternatively, you can block places which are no longer needed by setting their status: ‘disable’.","summary":"Update Place","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}},{"in":"path","name":"docId","description":"Unique NextBillion ID of the location to be updated.","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"place":{"type":"array","description":"This parameter represents the place details, including geographical information, address and other related information.","items":{"type":"object","properties":{"geopoint":{"type":"object","properties":{"lat":{"type":"number","description":"This parameter represents the latitude value of the place."},"lng":{"type":"number","description":"This parameter represents the longitude value of the place."}},"description":"This parameter represents the geographical coordinates of the place. It includes the latitude and longitude values."},"country":{"description":"This parameter represents the country of the place.","type":"string"},"state":{"description":"This parameter represents the state or region of the place.","type":"string"},"city":{"description":"This parameter represents the city or town of the place.","type":"string"},"district":{"description":"This parameter represents the district of the place.","type":"string"},"subDistrict":{"description":"This parameter represents the sub-district or locality of the place.","type":"string"},"street":{"description":"This parameter represents the street name of the place.","type":"string"},"postalCode":{"description":"This parameter represents the postal code or ZIP code of the place.","type":"string"},"house":{"description":"This parameter represents the house or building number of the place.","type":"string"},"building":{"description":"This parameter represents additional building information if applicable.","type":"string"},"poi":{"type":"object","properties":{"title":{"description":"A title that describes the point of interest.","type":"string"}},"description":"This parameter represents a point of interest within the place. A Point of Interest (POI) refers to a specific location or area that is of interest to individuals for various reasons. It could be a landmark, tourist attraction, business, or any other location that people might find important or intriguing."},"address":{"description":"This parameter represents the complete address of the place, including the street, city, state, postal code and country.","type":"string"}}}},"dataSource":{"type":"object","properties":{"source":{"description":"1. Move the place to a new dataset by setting the value to a unique dataset name. You can also move the place to an existing dataset by using an existing dataset name other than the current one. In both cases, the current datasource will be replaced for the specified docID. \n\n2. Update the place in an existing dataset by setting the name to the current value.","type":"string"},"refId":{"description":"This parameter represents the unique reference ID associated with the data source.","type":"string"},"status":{"description":"Set this to either `enable` or `disable` to allow the place to be retrieved by a search API or block it respectively.","type":"string","enum":["enable","disable"],"x-enum-options":[{"value":"enable"},{"value":"disable"}]}},"description":"dataSource values can be updated to enhance or prioritize the search results to better suit specific business use cases."},"score":{"type":"integer","description":"Search score of the place. This is calculated based on how ‘richly’ the place is defined. For instance, a place with street name, city, state and country attributes set might be ranked lower than a place which has values of house, building, street name, city, state and country attributes set. The score determines the rank of the place among search results. You can also use this field to set a custom score as per its relevance to rank it among the search results from multiple data sources."}}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"description":"Represents the status of the response.","type":"string"},"msg":{"description":"This could be “Ok” representing success or “not found” representing error in processing the request.","type":"string"}}}}}}},"tags":["Multi Geocoding"]}},"/v1/multi-geocode/geocode/batch":{"post":{"summary":"Batch Geocode","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"q":{"description":"Specify the free-text search query.\n\nPlease note that whitespace, urls, email addresses, or other out-of-scope queries will yield no results.","type":"string","examples":["\"q\":\"125, Berliner, berlin\""]},"at":{"description":"Specify the center of the search context expressed as coordinates.\n\nPlease note that one of \"at\", \"in=circle\" or \"in=bbox\" should be provided for relevant results.","type":"string","format":"latitude,longitude","examples":["\"at\": \"52.5308,13.3856\""]},"in":{"description":"Search within a geographic area. This is a hard filter. Results will be returned if they are located within the specified area.\n\nA geographic area can be\n\n* a country (or multiple countries), provided as comma-separated [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country codes\n \n The country codes are to be provided in all uppercase.\n \n Format: `countryCode:{countryCode}[,{countryCode}]`\n \n* a circular area, provided as latitude, longitude, and radius (an integer with meters as unit)\n \n Format: `circle:{latitude},{longitude};r={radius}`\n \n* a bounding box, provided as _west longitude_, _south latitude_, _east longitude_, _north latitude_\n \n Format: `bbox:{west longitude},{south latitude},{east longitude},{north latitude}`\n \n\nPlease provide one of 'at', 'in=circle' or 'in=bbox' input for a relevant result.","type":"string","examples":["\"in\":\"countryCode:CAN,MEX,USA\"","\"in\":\"circle:52.53,13.38;r=10000\"","\"in\":\"bbox:13.08836,52.33812,13.761,52.6755\""]},"limit":{"type":"integer","description":"Maximum number of results to be returned. Please note that the minimum value that can be provided is 1 and the maximum that can be provided is 100.","default":10},"lang":{"description":"Select the language to be used for result rendering from a list of [BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) compliant language codes.","type":"string","examples":["\"lang\":\"en\""]}},"required":["q"]}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","description":"The results are presented as a JSON list of candidates in ranked order (most-likely to least-likely) based on the matched location criteria.","items":{"type":"object","properties":{"title":{"description":"The localized display name of this result item.","type":"string"},"id":{"description":"The unique identifier for the result item.","type":"string"},"address":{"type":"object","properties":{"label":{"description":"Assembled address value built out of the address components according to the regional postal rules. These are the same rules for all endpoints. It may not include all the input terms.","type":"string"},"countryCode":{"description":"A three-letter country code.","type":"string"},"countryName":{"description":"The localised country name.","type":"string"},"stateCode":{"description":"A country specific state code or state name abbreviation. For example, in the United States it is the two letter state abbreviation: \"CA\" for California.","type":"string"},"state":{"description":"The state division of a country.","type":"string"},"county":{"description":"A division of a state; typically, a secondary-level administrative division of a country or equivalent.","type":"string"},"city":{"description":"The name of the primary locality of the place.","type":"string"},"district":{"description":"A division of city; typically an administrative unit within a larger city or a customary name of a city's neighborhood.","type":"string"},"street":{"description":"Name of street of the returned place, if available.","type":"string"},"postalCode":{"description":"An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code.","type":"string"},"houseNumber":{"description":"House number of the returned place, if available.","type":"string"}},"description":"Postal address of the result item."},"scoring":{"type":"object","properties":{"queryScore":{"type":"number","description":"A score, out of 1, indicating how closely the result matches with the provided query `q` ."},"fieldScore":{"type":"object","properties":{},"description":"A breakdown of how closely individual field of the result matched with the provided query `q`."}},"description":"Score of the result. A higher score indicates a closer match."},"position":{"type":"object","properties":{"lat":{"description":"The latitude of the searched place.","type":"string"},"lng":{"description":"The longitude of the searched place.","type":"string"}},"description":"Returns the location coordinates of the result."},"access":{"type":"object","properties":{"lat":{"type":"number","description":"The latitude of the access point of the search result."},"lng":{"type":"number","description":"The longitude of the access point of the search result."}},"description":"An array returning the location coordinates of all the access points of the search result."},"distance":{"type":"integer","description":"The distance \"as the crow flies\" from the search center to this result item in meters."},"mapView":{"type":"object","properties":{"west":{"description":"Longitude of the western-side of the box.","type":"string"},"south":{"description":"Longitude of the southern-side of the box.","type":"string"},"east":{"description":"Longitude of the eastern-side of the box.","type":"string"},"north":{"description":"Longitude of the northern-side of the box.","type":"string"}},"description":"The bounding box enclosing the geometric shape (area or line) that an individual result covers. `place` typed results have no `mapView`."},"categories":{"type":"array","description":"The list of categories assigned to this place.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category.","type":"string"},"name":{"description":"Name of the place category in the result item language.","type":"string"},"primary":{"description":"Whether or not it is a primary category. This field is visible only when the value is 'true'.","type":"string"}}}},"contacts":{"type":"array","description":"Contact information like phone, email or website.","items":{"type":"object","properties":{"phone":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"mobile":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"tollFree":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"fax":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"www":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"email":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}}}}}}}}}}}}}},"tags":["Multi Geocoding"]}},"/v1/multi-geocode/place":{"post":{"description":"The \"Add Place\" method allows users to create custom places\n\nAdd place method provides the flexibility to create custom places in a way that suits your business needs. The newly created place and its attributes can be added to custom (proprietary) dataset - to the effect of building your own places dataset (s) - or, to a default dataset. Overcome inaccurate ‘POI’ details from default search provider by creating custom, highly accurate ‘POIs’.","summary":"Add a Place","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"place":{"type":"array","description":"This parameter represents the place details, including geographical information, address and other related information.","items":{"type":"object","properties":{"geopoint":{"type":"object","properties":{"lat":{"type":"number","description":"This parameter represents the latitude value of the place."},"lng":{"type":"number","description":"This parameter represents the longitude value of the place."}},"description":"This parameter represents the geographical coordinates of the place. It includes the latitude and longitude values.","examples":["geopoint:\n lat: 34.14311\n lng: -118.25743\n"]},"country":{"description":"Country of the search context provided as comma-separated [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country codes.\n\nNote: Country codes should be provided in uppercase.","type":"string","examples":["\"country\":\"IND\"","\"country\":\"CAN\""]},"state":{"description":"This parameter represents the state or region of the place.","type":"string"},"city":{"description":"This parameter represents the city or town of the place.","type":"string"},"district":{"description":"This parameter represents the district of the place.","type":"string"},"subDistrict":{"description":"This parameter represents the sub-district or locality of the place.","type":"string"},"street":{"description":"This parameter represents the street name of the place.","type":"string"},"postalCode":{"description":"This parameter represents the postal code or ZIP code of the place.","type":"string"},"house":{"description":"This parameter represents the house or building number of the place.","type":"string"},"building":{"description":"This parameter represents additional building information if applicable.","type":"string"},"poi":{"type":"object","properties":{"title":{"description":"A title that describes the point of interest.","type":"string"}},"description":"This parameter represents a point of interest within the place. A Point of Interest (POI) refers to a specific location or area that is of interest to individuals for various reasons. It could be a landmark, tourist attraction, business, or any other location that people might find important or intriguing."},"address":{"description":"This parameter represents the complete address of the place, including the street, city, state, postal code and country.","type":"string"}},"required":["geopoint"]}},"dataSource":{"type":"object","properties":{"source":{"description":"This parameter represents the source of the data.","type":"string"},"refId":{"description":"This parameter represents the unique reference ID associated with the data source.","type":"string"},"status":{"description":"This parameter indicates if a place is searchable.","type":"string","enum":["enable","disable"],"x-enum-options":[{"value":"enable"},{"value":"disable"}]}},"description":"It contains information about the dataset that returns the specific result"},"score":{"type":"integer","description":"Search score of the place. This is calculated based on how ‘richly’ the place is defined. For instance, a place with - street name, city, state and country attributes set might be ranked lower than a place which has values of - house, building, street name, city, state and country attributes set. The score determines the rank of the place among search results. You can also use this field to set a custom score as per its relevance to rank it among the search results from multiple data sources."},"force":{"type":"boolean","description":"When 2 places are located within 100 meters of each other and have more than 90% of matching attributes (at least 11 out of 12 attributes in the “place” object), they will be considered duplicates and any requests to add such a new place would be rejected. Set `force=true` to override this duplicate check. You can use this to create closely located POIs. For instance, places inside a mall, university or a government building etc."}},"required":["place"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"docId":{"description":"A unique NextBillion DocID will be created for the POI. Use this ID to search this place through the “Get Place” method, to update attributes or ‘status’ through the “Update Place” method or delete it using the “Delete Place” method.","type":"string"}}}}}}},"tags":["Multi Geocoding"]}},"/skynet/asset/{id}/location/last":{"parameters":[],"get":{"summary":"Track the last location of an asset","parameters":[{"in":"path","name":"id","description":"ID of the `asset` whose last location is to be retrieved. This is the same ID that was generated/provided at the time of creating the `asset`.","required":true,"schema":{"type":"string"}},{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"},"data":{"type":"object","properties":{"location":{"type":"object","properties":{"accuracy":{"type":"number","description":"If available, this property returns the accuracy of the GPS information received at the tracked location. It is represented as an estimated horizontal accuracy radius, in meters, at the 68th percentile confidence level."},"altitude":{"type":"number","description":"If available in the GPS information, this property returns the altitude of the `asset` at the tracked location. It is represented as height, in meters, above the WGS84 reference ellipsoid."},"bearing":{"type":"number","description":"If available in the GPS information, this property returns the heading of the `asset` calculated from true north in clockwise direction at the tracked location. Please note that the bearing is not affected by the device orientation.\n\nThe bearing will always be in the range of [0, 360)."},"location":{"type":"object","properties":{"lat":{"type":"number","description":"Latitude of the tracked location of the `asset`."},"lon":{"type":"number","description":"Longitude of the tracked location of the `asset`."}},"description":"An object with the coordinates of the last tracked location."},"meta_data":{"type":"object","properties":{},"description":"Specifies the custom data about the location that was added when the location was uploaded.","examples":["{\n \"sample_meta_data\": \"test\"\n}"]},"speed":{"type":"number","description":"If available in the GPS information, this property returns the speed of the `asset`, in meters per second, at the tracked location."},"timestamp":{"type":"integer","description":"A UNIX epoch timestamp in milliseconds, representing the time at which the location was tracked.","examples":["\"timestamp\":1672124157543"]},"battery_level":{"type":"integer","description":"Returns the battery level of the GPS device, as a percentage, when the location was tracked. It has a minimum value of 0 and a maximum value of 100."}},"description":"An object with details of the last tracked location."}},"description":"An object containing the information about the last tracked location of the requested `asset`."},"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}}},"tags":["Skynet Asset and Track"]}},"/skynet/monitor/list":{"parameters":[],"get":{"summary":"Get Monitor List","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}},{"in":"query","name":"tags","description":"`tags` can be used to filter the monitors. Only those monitors which have all the `tags` provided here, will be included in the search result. In case multiple `tags` need to be specified, use `,` to separate them.","explode":true,"schema":{"type":"string","examples":["tags=tag_1,tag_2"]}},{"in":"query","name":"pn","description":"Denotes page number. Use this along with the `ps` parameter to implement pagination for your searched results. This parameter does not have a maximum limit but would return an empty response in case a higher value is provided when the result-set itself is smaller.","schema":{"type":"integer","examples":["pn=5"],"default":1}},{"in":"query","name":"ps","description":"Denotes number of search results per page. Use this along with the `pn` parameter to implement pagination for your searched results.","schema":{"type":"integer","maximum":100,"examples":["ps=25"],"default":20}},{"in":"query","name":"sort","description":"Provide a single field to sort the results by. Only `updated_at` or `created_at` fields can be selected for ordering the results.\n\nBy default, the result is sorted by `created_at` field in the descending order. Allowed values for specifying the order are `asc` for ascending order and `desc` for descending order.","schema":{"type":"string","format":"field:order","default":"created_at:desc","examples":["updated_at:desc"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"},"data":{"type":"object","properties":{"list":{"type":"array","description":"An array of objects listing all the monitors. Each object represents one `monitor`.","items":{"type":"object","properties":{"id":{"description":"Unique ID of the `monitor`. This is the same ID that was generated at the time of creating the `monitor`.","type":"string"},"type":{"description":"Type of the `monitor`. It represents the type of `asset` activity that the `monitor` is configured to detect.","type":"string","enum":["`enter`","`exit`","`enter_and_exit`","`speeding`","`idle`"],"x-enum-options":[{"value":"`enter`"},{"value":"`exit`"},{"value":"`enter_and_exit`"},{"value":"`speeding`"},{"value":"`idle`"}]},"name":{"description":"Name of the `monitor`. The value would be the same as that provided for the `name` parameter at the time of creating or updating the `monitor`.","type":"string"},"tags":{"type":"array","description":"Tags of the `monitor`. The values would be the same as that provided for the `tags` parameter at the time of creating or updating the `monitor`.","examples":["[\n \"area_Los Angeles\",\n \"shift_1\"\n]"],"items":{"type":"string"}},"description":{"description":"Description of the `monitor`. The value would be the same as that provided for the `description` parameter at the time of creating or updating the `monitor`.","type":"string"},"geofences":{"type":"array","description":"Geofence IDs that are linked to the `monitor`. These IDs were associated with the `monitor` at the time of creating or updating it.\n\nThe `monitor` uses the geofences mentioned here to create events of `type` nature for the eligible asset(s).","items":{"type":"string"}},"updated_at":{"type":"integer","description":"A UNIX epoch timestamp in seconds representing the time at which the `monitor` was last updated.","examples":[1672124157]},"created_at":{"type":"integer","description":"A UNIX epoch timestamp in seconds representing the time at which the `monitor` was created.","examples":[1672124157]},"match_filter":{"type":"object","properties":{"include_all_of_attributes":{"type":"object","properties":{},"description":"A string type dictionary object to specify the `attributes` which will be used to identify the asset(s) on which the `monitor` would be applied. Please note that using this parameter overwrites the existing `attributes` of the monitor.\n\nIf the `attributes` added to a `monitor` do not match fully with the `attributes` added to any `asset`, the `monitor` will be ineffective.\n\nPlease note that the maximum number of `key`:`value` pairs that 'include_all_of_attributes' can take is 100. Also, the overall size of the `match_filter` object should not exceed 65kb.","examples":["{\n \"asset_type\": \"delivery\",\n \"area\": \"Los Angeles downtown\"\n}"]},"include_any_of_attributes":{"type":"object","properties":{},"description":"A string dictionary object to specify the `attributes`, separated by a `,`. Only the `assets` with any one of the `attributes` added to this parameter will be linked to this `monitor`. Once an `asset` and a `monitor` are linked, the `monitor` will be able to create events for the `asset` when an activity specified in `type` is detected.\n\nIf no input is provided for this object or if the `attributes` added here do not match at least one of the `attributes` added to any `asset`, the `monitor` will be ineffective.\n\nPlease note that the maximum number of `key`:`value` pairs that `include_any_of_attributes` can take is 100. Also, the overall size of `match_filter` object should not exceed 65kb.","examples":["{\n \"asset_type\": \"delivery\",\n \"area\": \"Los Angeles downtown\"\n}"]}},"description":"Use this object to update the `attributes` of the `monitor`."},"speeding_config":{"type":"object","properties":{"time_tolerance":{"type":"integer","description":"This property returns the time duration value, in milliseconds, for which the `monitor` will track the speed of the asset. An event is triggered if the speed remains higher than the specified limit for a duration more than the tolerance value.\n\nThe value returned for this parameter is the same as that provided while creating or updating a `speeding` type `monitor`."},"customer_speed_limit":{"type":"integer","description":"This property returns the actual speed limit that the `monitor` uses as a threshold for generating a speed limit event. The value returned for this parameter is the same as that provided while creating or updating a `speeding` type `monitor`."},"use_admin_speed_limit":{"type":"boolean","description":"A boolean value denoting if the administrative speed limit of the road was used as speed limit threshold for triggering events. The value returned for this parameter is the same as that provided while creating or updating a `speeding` type `monitor`."}},"description":"An object returning the details of the over-speeding constraints for a `speeding` type of `monitor`."},"idle_config":{"type":"object","properties":{"distance_tolerance":{"type":"number","description":"This parameter returns the distance threshold that was used to determine if the asset was idle or not. The value returned for this parameter is the same as that provided while creating or updating a `idle` type `monitor`."},"time_tolerance":{"type":"integer","description":"This parameter returns the time duration for which the `monitor` tracks the distance covered by an asset before triggering an idle event. The value returned for this parameter is the same as that provided while creating or updating a `idle` type `monitor`."}},"description":"An object returning the details of the idle activity constraints for a `idle` type of `monitor`."},"geofence_config":{"type":"object","properties":{"geofence_ids":{"type":"array","description":"An array of geofence IDs that are linked to the `monitor`. Geofences are geographic boundaries that can be used to trigger events based on an asset's location.","items":{"type":"string"}}},"description":"An object returning the details of the geofence that are associated with the `monitor` for an `enter`, `exit` or `enter_and_exit` type of monitor."}}}},"page":{"type":"object","properties":{"total":{"type":"integer","description":"An integer value indicating the total number of items available in the data set. This parameter can be used to calculate the total number of pages available."},"offset":{"type":"integer","description":"An integer value indicating the number of items that need to be skipped while displaying the results of the current page."},"page":{"type":"integer","description":"An integer value indicating the current page number (starting at 0)."},"size":{"type":"integer","description":"An integer value indicating the maximum number of items retrieved per `page`."},"hasmore":{"type":"boolean","description":"A boolean value indicating whether there are more items available beyond the current page."}},"description":"An object with pagination details of the search results. Use this object to implement pagination in your application."}},"description":"A data object containing the result."},"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}}},"tags":["Skynet Asset and Track"]}},"/skynet/config":{"parameters":[],"get":{"summary":"Get webhook configuration","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"},"data":{"type":"object","properties":{"config":{"type":"object","properties":{"webhook":{"type":"array","description":"An array of strings representing the list of webhooks. Webhooks are used to receive information, through POST requests, whenever any event is triggered.","examples":["[\n \"http://example.com/webhook1\",\n \"http://example2.com/webhook2\"\n]"],"items":{"type":"string"}}}}},"description":"A data object containing the `config` response."},"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"}}}}}}},"tags":["Skynet Asset and Track"]},"put":{"summary":"Update webhook configuration","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"type":"array","description":"Use this array to update information about the webhooks. Please note that the webhooks will be overwritten every time this method is used.","examples":["[\n \"http://example.com/webhook1\",\n \"http://example2.com/webhook2\"\n]"],"items":{"type":"string"}}}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}}},"tags":["Skynet Asset and Track"]}},"/skynet/config/testwebhook":{"post":{"summary":"Test webhook configurations","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"description":"A string indicating the state of the response. Please note this value will always be `Ok`.\n\nThe sample event information will be received on the webhook, if they were successfully configured. If no event information is received by the webhook, please reconfigure the webhook or else reach out to [support@nextbillion.ai](mailto:support@nextbillion.ai) for help.","type":"string"}}}}}}},"tags":["Skynet Asset and Track"]}},"/skynet/asset":{"parameters":[],"post":{"summary":"Create an Asset","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}}],"requestBody":{"required":true,"description":"Create Asset Body input","content":{"application/json":{"schema":{"type":"object","properties":{"custom_id":{"description":"Set a unique ID for the new `asset`. If not provided, an ID will be automatically generated in UUID format. A valid `custom_id` can contain letters, numbers, \"-\", & \"_\" only.\n\nPlease note that the ID of an `asset` can not be changed once it is created.","type":"string"},"description":{"description":"Description for the `asset`.","type":"string"},"name":{"description":"Name of the `asset`. Use this field to assign a meaningful, custom name to the `asset` being created.","type":"string"},"tags":{"type":"array","description":"**This parameter will be deprecated soon! Please use the `attributes` parameter to add labels or markers for the asset.**\n\nTags of the `asset`. `tags` can be used for filtering assets in operations like *Get Asset List* and asset **Search** methods. They can also be used for monitoring of assets using the **Monitor** methods after linking `tags` and `asset`.\n\nValid `tags` are strings consisting of alphanumeric characters (A-Z, a-z, 0-9) along with the underscore ('_') and hyphen ('-') symbols.","examples":["[\n \"area_Los Angeles\",\n \"shift_1\"\n]"],"items":{"type":"string"}},"attributes":{"type":"object","properties":{},"description":"`attributes` can be used to store custom information about an asset in `key`:`value` format. Use `attributes` to add any useful information or context to your assets like the vehicle type, shift timing etc. Moreover, these attributes can be used to filter `assets` in **Search**, **Monitor**, and *Get Asset List* queries. \n\nPlease note that the maximum number of `key`:`value` pairs that can be added to an `attributes` object is 100. Also, the overall size of `attributes` object should not exceed 65kb.","examples":["{\n \"shift_timing\": \"0800-1700\",\n \"driver_name\": \"John\"\n}"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"},"data":{"type":"object","properties":{"id":{"description":"Unique ID of the asset created. It will be the same as `custom_id`, if provided. Else it will be an auto generated UUID. Please note this ID cannot be updated.","type":"string"}},"description":"An object containing the ID of the `asset` created."},"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}}},"tags":["Skynet Asset and Track"]}},"/skynet/namespaced-apikeys":{"parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"query","name":"{key}","schema":{"type":"string"}}],"post":{"summary":"Create namespace under a parent key","parameters":[{"in":"query","name":"namespace","description":"Specify a name for the `namespace`. If the namespace specified is unique then a new namespace along with a new key is created. Whereas if the specified `namespace` is not unique, a new key will be created in the existing `namespace`. Please note that a `namespace` cannot be created using another namespace key.","required":true,"schema":{"type":"string","examples":["namespace=test_name"]}},{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"kid":{"description":"Returns the unique `key` created for the specified namespace.","type":"string"},"namespace":{"description":"Returns the name of the `namespace` for which the key is created.","type":"string"},"created_at":{"description":"Returns the time, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, at which the namespace was created.","type":"string"},"expire":{"type":"integer","description":"Returns the time, expressed as UNIX epoch timestamp in seconds, when the namespace key will expire."},"statusCode":{"type":"integer","description":"Returns the error code in case of any error. If there is no error, then this field is absent in the response."},"error":{"description":"Returns the error type in case of any error. If there is no error, then this field is absent in the response.","type":"string"},"message":{"description":"Returns the error message in case of any error. If there is no error, then this field is absent in the response.","type":"string"}}}}}}},"tags":["Skynet Asset and Track"]}},"/skynet/monitor":{"parameters":[],"post":{"summary":"Create a Monitor","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}}],"requestBody":{"required":true,"description":"Create Monitor Body input","content":{"application/json":{"schema":{"type":"object","properties":{"custom_id":{"description":"Set a unique ID for the new `monitor`. If not provided, an ID will be automatically generated in UUID format. A valid `custom_id` can contain letters, numbers, \"-\", & \"_\" only.\n\nPlease note that the ID of an `monitor` can not be changed once it is created.","type":"string"},"type":{"description":"Specify the type of activity the `monitor` would detect.\n\nThe `monitor` will be able to detect the specified `type` of activity and create events for eligible `asset`. A `monitor` can detect following types of asset activity:\n\n- `enter`: The `monitor` will create an event when a linked `asset` enters into the specified geofence.\n\n- `exit`: The `monitor` will create an event when a linked `asset` exits the specified geofence.\n\n- `enter_and_exit`: The `monitor` will create an event when a linked `asset` either enters or exits the specified geofence.\n\n- `speeding`: The `monitor` will create an event when a linked `asset` exceeds a given speed limit.\n\n- `idle`: The `monitor` will create an event when a linked `asset` exhibits idle activity.\n\nPlease note that `assets` and geofences can be linked to a `monitor` using the `match_filter` and `geofence_config` attributes respectively.","type":"string","examples":["\"type\":\"speeding\""],"enum":["`enter`","`exit`","`enter_and_exit`","`speeding`","`idle`"],"x-enum-options":[{"value":"`enter`"},{"value":"`exit`"},{"value":"`enter_and_exit`"},{"value":"`speeding`"},{"value":"`idle`"}]},"tags":{"type":"array","description":"Use this parameter to add `tags` to the `monitor`. `tags` can be used for filtering monitors in the *Get Monitor List* operation. They can also be used for easy identification of monitors.\n\nPlease note that valid `tags` are strings, consisting of alphanumeric characters (A-Z, a-z, 0-9) along with the underscore ('_') and hyphen ('-') symbols.","items":{"type":"string"}},"description":{"description":"Add a description for your `monitor` using this parameter.","type":"string"},"name":{"description":"Name of the `monitor`. Use this field to assign a meaningful, custom name to the `monitor` being created.","type":"string"},"match_filter":{"type":"object","properties":{"include_all_of_attributes":{"type":"object","properties":{},"description":"A string type dictionary object to specify the `attributes`. Only the assets having all of the `attributes` added to this parameter will be linked to this `monitor`. Once an `asset` is linked to a `monitor`, the `monitor` will be able to create events for that `asset` whenever an activity specified in `type` is detected. Multiple attributes should be separated by a comma `,`.\n\nPlease note that this parameter can not be used in conjunction with `include_any_of_attributes`. Also, the maximum number of `key`:`value` pairs that this parameter can take is 100 and the overall size of the `match_filter` object should not exceed 65kb.","examples":["{\n \"asset_type\": \"delivery\",\n \"area\": \"Los Angeles downtown\"\n}"]},"include_any_of_attributes":{"type":"object","properties":{},"description":"A string type dictionary object to specify the `attributes`. The assets having at least one of the `attributes` added to this parameter will be linked to this `monitor`. Once an `asset` is linked to a `monitor`, the `monitor` will be able to create events for that `asset` whenever an activity specified in `type` is detected. Multiple attributes should be separated by a comma `,`.\n\nPlease note that this parameter can not be used in conjunction with `include_all_of_attributes`. Also, the maximum number of `key`:`value` pairs that this parameter can take is 100 and the overall size of the `match_filter` object should not exceed 65kb.","examples":["{\n \"asset_type\": \"delivery\",\n \"area\": \"Los Angeles downtown\"\n}"]}},"description":"This object is used to identify the asset(s) on which the `monitor` would be applied."},"speeding_config":{"type":"object","properties":{"time_tolerance":{"type":"integer","description":"Use this parameter to configure a time tolerance before triggering an event. Adding a tolerance would make the Tracking service wait for the specified time before triggering the event. Consequently, an event is triggered only when the time for which the `asset` has been over-speeding continuously, exceeds the configured tolerance time. The unit for this parameter is milliseconds.\n\nIt can be seen that this attribute is used to control the \"sensitivity\" of the `monitor` with respect to speed alerts. Higher the value of `time_tolerance` the less sensitive the `monitor` would be to instances of over-speeding. Conversely, if 'time_tolerance' is set to 0, the `monitor` will be extremely sensitive and will create an event as soon as tracking information with a speed value greater than the specified limit is received.","examples":["\"time_tolerance\":10000"],"default":5000},"customer_speed_limit":{"type":"integer","description":"Use this parameter to establish the speed limit that will allow the `monitor` to create events, depending on the `time_tolerance` value, when an asset's tracked speed exceeds it. The speed limit should be specified in meters per second.\n\nPlease note that `customer_speed_limit` is mandatory when `use_admin_speed_limit` is false. However, when `use_admin_speed_limit` is true, `customer_speed_limit` is ineffective.","examples":["\"customer_speed_limit\":10"]},"use_admin_speed_limit":{"type":"boolean","description":"A boolean attribute to indicate which speed limit values should be used by the `monitor`. When `use_admin_speed_limit` is true, the administrative speed limit of the road on which the asset is located, will be used to generate events when the asset’s tracked speed exceeds it. Whereas, when `use_admin_speed_limit` is false, the `customer_speed_limit` specified will be used to generate events when the asset's tracked speed exceeds it.\n\nPlease note that if `use_admin_speed_limit` is false, `customer_speed_limit` is mandatory, however, when `use_admin_speed_limit` is true then `customer_speed_limit` is ineffective."}},"description":"`speeding_config` is used to set up constraints for creating over-speed events. When an `asset` associated with a `monitor` is traveling at a speed above the given limits, the Live Tracking API can create events to denote such instances. There is also an option to set up a tolerance before creating an event. Please note that this object is mandatory when `type=speeding`.\n\nLet's look at the properties of this object."},"idle_config":{"type":"object","properties":{"distance_tolerance":{"type":"number","description":"Use this parameter to configure a distance threshold that will be used to determine if the asset was idle or not. If the asset moves by a distance less than the value of this parameter within a certain time period, the `monitor` would create an idle event against the asset. The `distance_tolerance` should be provided in meters.\n\nUsers can set an appropriate value for this parameter, along with appropriate `time_tolerance` value, to avoid triggering idle events when the asset is crossing a busy intersection or waiting at the traffic lights.","examples":["\"distance_tolerance\":50"]},"time_tolerance":{"type":"integer","description":"Use this parameter to configure a time duration for which the `monitor` would track the distance covered by an asset before triggering an idle event. The `time_tolerance` should be provided in milliseconds.\n\nIf the distance covered by the asset during a `time_tolerance` is less than that specified in `distance_tolerance` the asset will be assumed to be idle.\n\nPlease observe that this attribute along with `distance_tolerance` parameter can be used to control the \"sensitivity\" of the `monitor` with respect to idle alerts. If the `distance_tolerance` is set a high value, then setting `time_tolerance` to a low value may result in a situation where asset is always judged as idle. On the contrary, it might never be judged as idle if `distance_tolerance` is set to a low value but `time_tolerance` is set to a high value.\n\nIt is recommended to use these properties with appropriate values to trigger genuine idle events. The appropriate values might depend on the traffic conditions, nature of operations that the asset is involved in, type of asset and other factors.","examples":["\"time_tolerance\":10000"],"default":300000}},"description":"`idle_config` is used to set up constraints for creating idle events. When an asset associated with the `monitor` has not moved a given distance within a given time, the Live Tracking API can create events to denote such instances. Please note that this object is mandatory when the monitor `type` is `idle`.\n\nLet's look at the properties of this object.","required":["distance_tolerance"]},"geofence_config":{"type":"object","properties":{"geofence_ids":{"type":"array","description":"An array of strings to collect the geofence IDs that should be linked to the `monitor`. Please note `geofence_ids` are mandatory when using the `geofence_config` attribute.","examples":["{\n \"geofence_ids\": [\n \"bedc6a94-50e3-409e-aeec-65f9a8dd6199\"\n ]\n}"],"items":{"type":"string"}}},"description":"Geofences are geographic boundaries surrounding an area of interest. `geofence_config` is used to specify the geofences for creating `enter` or `exit` type of events based on the asset's location. When an asset associated with the `monitor` enters the given geofence, an `enter` type event is created, whereas when the asset moves out of the geofence an `exit` type event is created.\n\nPlease note that this object is mandatory when the monitor `type` belongs to one of `enter`, `exit` or `enter_and_exit`.","required":["geofence_ids"]}},"required":["type","tags"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"},"data":{"type":"object","properties":{"id":{"description":"Unique ID of the `monitor` created. Please note this ID cannot be updated.","type":"string"}},"description":"A data object containing the ID of the `monitor` created."},"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}}},"tags":["Skynet Asset and Track"]}},"/skynet/asset/{id}/bind":{"parameters":[{"in":"path","name":"id","description":"ID of `asset` to which a device needs to be linked. This is the same ID that was generated/provided at the time of creating the `asset`.","required":true,"schema":{"type":"string"}}],"post":{"summary":"Bind asset to device","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"device_id":{"description":"Device ID to be linked to the `asset` identified by `id`.\n\nPlease note that the device needs to be linked to an `asset` before using it in the *Upload locations of an Asset* method for sending GPS information about the `asset`.","type":"string"}},"required":["device_id"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}}},"tags":["Skynet Asset and Track"]}},"/skynet/search/bound":{"get":{"summary":"Bound Search","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}},{"in":"query","name":"bound","description":"Specify two, pipe (|) delimited location coordinates which would act as corners of the bounding box area to be searched. The first one should be the southwest coordinate of the `bounds` and the second one should be the northeast coordinate of the `bounds`.","required":true,"schema":{"type":"string","format":"latitude_1,longitude_2|latitude_1,longitude_2","examples":["bounds=44.7664,-0.6941|44.9206,-0.4639"]}},{"in":"query","name":"filter","description":"**`tags` parameter will be deprecated soon! Please use the `include_any_of_attributes` or `include_all_of_attributes` parameters to match assets based on their labels or markers.**\n\nUse this parameter to filter the assets found inside the specified area by their `tags`. Multiple `tags` can be separated using commas (`,`).\n\nPlease note the tags are case sensitive.","schema":{"type":"string","format":"filter=tag:value_1,value_2...","examples":["filter=tag:delivery,truck"]}},{"in":"query","name":"ps","description":"Denotes number of search results per page. Use this along with the `pn` parameter to implement pagination for your searched results.","schema":{"type":"integer","maximum":100,"examples":["ps=25"],"default":20}},{"in":"query","name":"pn","description":"Denotes page number. Use this along with the `ps` parameter to implement pagination for your searched results. This parameter does not have a maximum limit but would return an empty response in case a higher value is provided when the result-set itself is smaller.","schema":{"type":"integer","examples":["pn=5"],"default":1}},{"in":"query","name":"include_any_of_attributes","description":"Use this parameter to filter the assets found inside the specified area by their `attributes`. Assets having at least one of the `attributes` added to this parameter, will be returned in the search results. Multiple `attributes` can be separated using pipes (`|`).\n\nPlease note the attributes are case sensitive. Also, this parameter can not be used in conjunction with `include_all_of_attributes` parameter.","schema":{"type":"string","format":"key1:value1|key2:value2|...","examples":["include_any_of_attributes=vehicle_type:pickup_truck|driver_name:John"]}},{"in":"query","name":"include_all_of_attributes","description":"Use this parameter to filter the assets found inside the specified area by their `attributes`. Only the assets having all the `attributes` that are added to this parameter, will be returned in the search results. Multiple `attributes` can be separated using pipes (`|`).\n\nPlease note the attributes are case sensitive. Also, this parameter can not be used in conjunction with `include_any_of_attributes` parameter.","schema":{"type":"string","format":"key_1:value_1|key_2:value_2","examples":["include_all_of_attributes=vehicle_type:pickup_truck|driver_name:John"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"},"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"data":{"type":"object","properties":{"assets":{"type":"array","description":"An array of objects with details of the asset(s) returned in the search result. Each object represents one `asset`","items":{"type":"object","properties":{"id":{"description":"ID of `asset` which was last located inside the specified area in the input request. This is the same ID that was generated/provided at the time of creating the `asset`.","type":"string"},"name":{"description":"Name of `asset`. The value would be the same as that provided for the `name` parameter at the time of creating or updating the `asset`.","type":"string"},"description":{"description":"Description of the `asset`. The value would be the same as that provided for the `description` parameter at the time of creating or updating the `asset`.","type":"string"},"latest_location":{"type":"object","properties":{"accuracy":{"type":"number","description":"If available, this property returns the accuracy of the GPS information received at the tracked location. It is represented as an estimated horizontal accuracy radius, in meters, at the 68th percentile confidence level."},"altitude":{"type":"number","description":"If available in the GPS information, this property returns the altitude of the `asset` at the tracked location. It is represented as height, in meters, above the WGS84 reference ellipsoid."},"bearing":{"type":"number","description":"If available in the GPS information, this property returns the heading of the `asset` calculated from true north in clockwise direction at the tracked location. Please note that the bearing is not affected by the device orientation.\n\nThe bearing will always be in the range of [0, 360)."},"location":{"type":"object","properties":{"lat":{"type":"number","description":"Latitude of the tracked location of the `asset`."},"lon":{"type":"number","description":"Longitude of the tracked location of the `asset`."}},"description":"An object with the coordinates of the last tracked location."},"meta_data":{"type":"object","properties":{},"description":"Specifies the custom data about the location that was added when the location was uploaded.","examples":["{\n \"sample_meta_data\": \"test\"\n}"]},"speed":{"type":"number","description":"If available in the GPS information, this property returns the speed of the `asset`, in meters per second, at the tracked location."},"timestamp":{"type":"integer","description":"A UNIX epoch timestamp in milliseconds, representing the time at which the location was tracked.","examples":["\"timestamp\":1672124157543"]},"battery_level":{"type":"integer","description":"Returns the battery level of the GPS device, as a percentage, when the location was tracked. It has a minimum value of 0 and a maximum value of 100."}},"description":"An object with details of the last tracked location."},"tags":{"type":"array","description":"**This parameter will be deprecated soon! Please move existing `tags` to `attributes` parameter.**\n\nTags associated with the `asset`.","items":{"description":"Tag string.","type":"string"}},"created_at":{"type":"integer","description":"A UNIX timestamp in seconds representing the time at which the `asset` was created.","examples":["\"created_at\":1672124157"]},"updated_at":{"type":"integer","description":"A UNIX timestamp in seconds representing the time at which the `asset` was last updated.","examples":["\"updated_at\":1672124157"]}}}},"page":{"type":"object","properties":{"total":{"type":"integer","description":"An integer value indicating the total number of items available in the data set. This parameter can be used to calculate the total number of pages available."},"offset":{"type":"integer","description":"An integer value indicating the number of items that need to be skipped while displaying the results of the current page."},"page":{"type":"integer","description":"An integer value indicating the current page number (starting at 0)."},"size":{"type":"integer","description":"An integer value indicating the maximum number of items retrieved per `page`."},"hasmore":{"type":"boolean","description":"A boolean value indicating whether there are more items available beyond the current page."}},"description":"An object with pagination details of the search results. Use this object to implement pagination in your application."}},"description":"A data object containing the search result."}}}}}}},"tags":["Skynet Asset and Track"]}},"/skynet/asset/{id}/event/list":{"parameters":[{"in":"path","name":"id","description":"ID of the `asset` whose event history needs to be fetched. This is the same ID that was generated/provided at the time of creating the `asset`.","required":true,"schema":{"type":"string"}}],"get":{"summary":"Event History of an Asset","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}},{"in":"query","name":"monitor_id","description":"Filter the events by `monitor_id`. When provided, only the events triggered by the `monitor` will be returned in response.\n\nPlease note that if the `attributes` of the asset identified by `id` and those of the `monitor` do not match, then no events might be returned for this `monitor_id`.","schema":{"type":"string"}},{"in":"query","name":"start_time","description":"Time after which the events triggered by the `asset` need to be retrieved.","schema":{"type":"integer","examples":["1577836800000"]}},{"in":"query","name":"end_time","description":"Time before which the events triggered by the `asset` need to be retrieved.","schema":{"type":"integer","examples":["1577836800000"]}},{"in":"query","name":"pn","description":"Denotes page number. Use this along with the `ps` parameter to implement pagination for your searched results. This parameter does not have a maximum limit but would return an empty response in case a higher value is provided when the result-set itself is smaller.","schema":{"type":"integer","examples":["pn=5"],"default":1}},{"in":"query","name":"ps","description":"Denotes number of search results per page. Use this along with the `pn` parameter to implement pagination for your searched results.","schema":{"type":"integer","maximum":100,"examples":["ps=25"],"default":20}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"},"data":{"type":"object","properties":{"list":{"type":"array","description":"An array of objects with each object on the list representing one event.","items":{"type":"object","properties":{"asset_id":{"description":"ID of the `asset`. This is the same ID that was generated/provided at the time of creating the `asset`.","type":"string"},"event_type":{"description":"Nature of the event triggered by the `asset`. It can have following values:\n\n- `enter`: When the `asset` enters a specific geofence\n\n- `exit`: When the `asset` moves out of a specific geofence.\n\n- `speeding`: When the `asset` exceeds the certain speed limit.\n\n- `idle`: When the `asset` exhibits idle or no activity.","type":"string","enum":["`enter`","`exit`","`speeding`","`idle`"],"x-enum-options":[{"value":"`enter`"},{"value":"`exit`"},{"value":"`speeding`"},{"value":"`idle`"}]},"geofence_id":{"description":"ID of the `geofence` associated with the event.","type":"string"},"monitor_id":{"description":"ID of the `monitor` associated with the event.","type":"string"},"monitor_tags":{"type":"array","description":"Tags associated with the `monitor`.","items":{"type":"string"}},"prev_location":{"type":"object","properties":{"location":{"type":"object","properties":{"lat":{"type":"number","description":"Latitude of the `prev_location` tracked for the `asset`."},"lon":{"type":"number","description":"Longitude of the `prev_location` tracked for the `asset`."}},"description":"`prev_location` information of the `asset`."},"timestamp":{"type":"integer","description":"A UNIX epoch timestamp in milliseconds representing the time at which the `asset` was at the `prev_location`.","examples":["\"timestamp\":1672124157543"]},"speed":{"type":"number","description":"If available, this property returns the speed of the `asset`, in meters per second, at the `prev_location` of the `asset`."},"bearing":{"type":"number","description":"If available, this property returns the heading of the `asset` from true north in clockwise direction, at the `prev_location` tracked for the `asset`."},"meta_data":{"type":"object","properties":{},"description":"Returns the custom data added during the location information upload."}},"description":"An object with details of the `asset` at the last tracked location before the event was triggered."},"timestamp":{"type":"integer","description":"A UNIX epoch timestamp in milliseconds representing the time at which the event was added/created.","examples":["\"timestamp\":1672124157543"]},"triggered_location":{"type":"object","properties":{"location":{"type":"object","properties":{"lat":{"type":"number","description":"Latitude of the `triggered_location` of the event."},"lon":{"type":"number","description":"Longitude of the `triggered_location` of the event."}},"description":"An object with information about the location at which the event was triggered."},"timestamp":{"type":"integer","description":"A UNIX epoch timestamp in milliseconds representing the time at which the `asset` was at the `triggered_location`.","examples":["\"timestamp\":1672124157543"]},"speed":{"type":"number","description":"If available, this property returns the speed of the `asset`, in meters per second, when the event was triggered."},"bearing":{"type":"number","description":"If available, this property returns the heading of the `asset` from true north in clockwise direction, when the event was triggered."},"meta_data":{"type":"object","properties":{},"description":"Returns the custom data added during the location information upload."}},"description":"An object with details of the `asset` at the location where the event was triggered."},"triggered_timestamp":{"type":"integer","description":"A UNIX epoch timestamp in milliseconds representing the time at which the event was triggered.","examples":["\"triggered_timestamp\":1672124157543"]},"extra":{"type":"object","properties":{},"description":"Additional information about the event. Currently, this object returns the speed limit that was used to generate the over-speeding events, for a `speeding` type event.\n\nIt is worth highlighting that, when the `use_admin_speed_limit` is `true`, the speed limit value will be obtained from the underlying road information. Whereas, if the `use_admin_speed_limit` is `false`, the speed limit will be equal to the `customer_speed_limit` value provided by the user when creating or updating the `monitor`."}}}},"page":{"type":"object","properties":{"total":{"type":"integer","description":"An integer value indicating the total number of items available in the data set. This parameter can be used to calculate the total number of pages available."},"offset":{"type":"integer","description":"An integer value indicating the number of items that need to be skipped while displaying the results of the current page."},"page":{"type":"integer","description":"An integer value indicating the current page number (starting at 0)."},"size":{"type":"integer","description":"An integer value indicating the maximum number of items retrieved per `page`."},"hasmore":{"type":"boolean","description":"A boolean value indicating whether there are more items available beyond the current page."}},"description":"An object with pagination details of the search results. Use this object to implement pagination in your application."}},"description":"An object containing the information about the event history for the requested `asset`."},"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}}},"tags":["Skynet Asset and Track"]}},"/skynet/monitor/{id}":{"get":{"summary":"Get a Monitor","parameters":[{"in":"path","name":"id","description":"ID of the `monitor` to be fetched. This is the same ID that was generated at the time of creating the `monitor`.","required":true,"schema":{"type":"string"}},{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"},"data":{"type":"object","properties":{"monitor":{"type":"object","properties":{"id":{"description":"Unique ID of the `monitor`. This is the same ID that was generated at the time of creating the `monitor`.","type":"string"},"type":{"description":"Type of the `monitor`. It represents the type of `asset` activity that the `monitor` is configured to detect.","type":"string","enum":["`enter`","`exit`","`enter_and_exit`","`speeding`","`idle`"],"x-enum-options":[{"value":"`enter`"},{"value":"`exit`"},{"value":"`enter_and_exit`"},{"value":"`speeding`"},{"value":"`idle`"}]},"name":{"description":"Name of the `monitor`. The value would be the same as that provided for the `name` parameter at the time of creating or updating the `monitor`.","type":"string"},"tags":{"type":"array","description":"Tags of the `monitor`. The values would be the same as that provided for the `tags` parameter at the time of creating or updating the `monitor`.","examples":["[\n \"area_Los Angeles\",\n \"shift_1\"\n]"],"items":{"type":"string"}},"description":{"description":"Description of the `monitor`. The value would be the same as that provided for the `description` parameter at the time of creating or updating the `monitor`.","type":"string"},"geofences":{"type":"array","description":"Geofence IDs that are linked to the `monitor`. These IDs were associated with the `monitor` at the time of creating or updating it.\n\nThe `monitor` uses the geofences mentioned here to create events of `type` nature for the eligible asset(s).","items":{"type":"string"}},"updated_at":{"type":"integer","description":"A UNIX epoch timestamp in seconds representing the time at which the `monitor` was last updated.","examples":[1672124157]},"created_at":{"type":"integer","description":"A UNIX epoch timestamp in seconds representing the time at which the `monitor` was created.","examples":[1672124157]},"match_filter":{"type":"object","properties":{"include_all_of_attributes":{"type":"object","properties":{},"description":"A string type dictionary object to specify the `attributes` which will be used to identify the asset(s) on which the `monitor` would be applied. Please note that using this parameter overwrites the existing `attributes` of the monitor.\n\nIf the `attributes` added to a `monitor` do not match fully with the `attributes` added to any `asset`, the `monitor` will be ineffective.\n\nPlease note that the maximum number of `key`:`value` pairs that 'include_all_of_attributes' can take is 100. Also, the overall size of the `match_filter` object should not exceed 65kb.","examples":["{\n \"asset_type\": \"delivery\",\n \"area\": \"Los Angeles downtown\"\n}"]},"include_any_of_attributes":{"type":"object","properties":{},"description":"A string dictionary object to specify the `attributes`, separated by a `,`. Only the `assets` with any one of the `attributes` added to this parameter will be linked to this `monitor`. Once an `asset` and a `monitor` are linked, the `monitor` will be able to create events for the `asset` when an activity specified in `type` is detected.\n\nIf no input is provided for this object or if the `attributes` added here do not match at least one of the `attributes` added to any `asset`, the `monitor` will be ineffective.\n\nPlease note that the maximum number of `key`:`value` pairs that `include_any_of_attributes` can take is 100. Also, the overall size of `match_filter` object should not exceed 65kb.","examples":["{\n \"asset_type\": \"delivery\",\n \"area\": \"Los Angeles downtown\"\n}"]}},"description":"Use this object to update the `attributes` of the `monitor`."},"speeding_config":{"type":"object","properties":{"time_tolerance":{"type":"integer","description":"This property returns the time duration value, in milliseconds, for which the `monitor` will track the speed of the asset. An event is triggered if the speed remains higher than the specified limit for a duration more than the tolerance value.\n\nThe value returned for this parameter is the same as that provided while creating or updating a `speeding` type `monitor`."},"customer_speed_limit":{"type":"integer","description":"This property returns the actual speed limit that the `monitor` uses as a threshold for generating a speed limit event. The value returned for this parameter is the same as that provided while creating or updating a `speeding` type `monitor`."},"use_admin_speed_limit":{"type":"boolean","description":"A boolean value denoting if the administrative speed limit of the road was used as speed limit threshold for triggering events. The value returned for this parameter is the same as that provided while creating or updating a `speeding` type `monitor`."}},"description":"An object returning the details of the over-speeding constraints for a `speeding` type of `monitor`."},"idle_config":{"type":"object","properties":{"distance_tolerance":{"type":"number","description":"This parameter returns the distance threshold that was used to determine if the asset was idle or not. The value returned for this parameter is the same as that provided while creating or updating a `idle` type `monitor`."},"time_tolerance":{"type":"integer","description":"This parameter returns the time duration for which the `monitor` tracks the distance covered by an asset before triggering an idle event. The value returned for this parameter is the same as that provided while creating or updating a `idle` type `monitor`."}},"description":"An object returning the details of the idle activity constraints for a `idle` type of `monitor`."},"geofence_config":{"type":"object","properties":{"geofence_ids":{"type":"array","description":"An array of geofence IDs that are linked to the `monitor`. Geofences are geographic boundaries that can be used to trigger events based on an asset's location.","items":{"type":"string"}}},"description":"An object returning the details of the geofence that are associated with the `monitor` for an `enter`, `exit` or `enter_and_exit` type of monitor."}}}},"description":"A data object containing the details of the `monitor`."},"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}}},"tags":["Skynet Asset and Track"]},"delete":{"summary":"Delete a Monitor","parameters":[{"in":"path","name":"id","description":"D of the `monitor` to be deleted. This is the same ID that was generated at the time of creating the `monitor`.","required":true,"schema":{"type":"string"}},{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}}},"tags":["Skynet Asset and Track"]},"put":{"summary":"Update a Monitor","parameters":[{"in":"path","name":"id","description":"ID of the `monitor` to be updated. This is the same ID that was generated at the time of creating the `monitor`.","required":true,"schema":{"type":"string"}},{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}}],"requestBody":{"required":true,"description":"Update Monitor Body input","content":{"application/json":{"schema":{"type":"object","properties":{"description":{"description":"Use this parameter to update the `description` of the `monitor`.","type":"string"},"name":{"description":"Use this parameter to update the `name` of the `monitor`. Users can add meaningful names to the monitors like \"warehouse_exit\", \"depot_entry\" etc.","type":"string","examples":["\"name\":\"warehouse_exit\""]},"tags":{"type":"array","description":"Use this parameter to update the `tags` of the `monitor`. `tags` can be used for filtering monitors in the *Get Monitor List* operation. They can also be used for easy identification of monitors. Using this parameter overwrites the existing `tags` of the monitor.\n\nPlease note that valid `tags` are strings, consisting of alphanumeric characters (A-Z, a-z, 0-9) along with the underscore ('_') and hyphen ('-') symbols.","examples":["[\n \"area_Los Angeles\",\n \"shift_1\"\n]"],"items":{"type":"string","examples":[]}},"type":{"description":"Use this parameter to update the `type` of the `monitor`. The `monitor` will be able to detect the specified `type` of activity and create events for eligible `asset`. A `monitor` can detect following types of asset activity:\n\n- `enter`: The `monitor` will create an event when a linked `asset` enters into the specified geofence.\n\n- `exit`: The `monitor` will create an event when a linked `asset` exits the specified geofence.\n\n- `enter_and_exit`: The `monitor` will create an event when a linked `asset` either enters or exits the specified geofence.\n\n- `speeding`: The `monitor` will create an event when a linked `asset` exceeds a given speed limit.\n\n- `idle`: The `monitor` will create an event when a linked `asset` exhibits idle activity.\n\nPlease note that `assets` and geofences can be linked to a `monitor` using the `match_filter` and `geofence_config` attributes respectively.","type":"string","examples":["\"type\":\"idle\""],"enum":["`enter`","`exit`","`enter_and_exit`","`speeding`","`idle`"],"x-enum-options":[{"value":"`enter`"},{"value":"`exit`"},{"value":"`enter_and_exit`"},{"value":"`speeding`"},{"value":"`idle`"}]},"match_filter":{"type":"object","properties":{"include_all_of_attributes":{"type":"object","properties":{},"description":"A string type dictionary object to specify the `attributes`. Only the assets having all of the `attributes` added to this parameter will be linked to this `monitor`. Once an `asset` is linked to a `monitor`, the `monitor` will be able to create events for that `asset` whenever an activity specified in `type` is detected. Multiple attributes should be separated by a comma `,`.\n\nPlease note that this parameter can not be used in conjunction with `include_any_of_attributes`. Also, the maximum number of `key`:`value` pairs that this parameter can take is 100 and the overall size of the `match_filter` object should not exceed 65kb.","examples":["{\n \"asset_type\": \"delivery\",\n \"area\": \"Los Angeles downtown\"\n}"]},"include_any_of_attributes":{"type":"object","properties":{},"description":"A string type dictionary object to specify the `attributes`. The assets having at least one of the `attributes` added to this parameter will be linked to this `monitor`. Once an `asset` is linked to a `monitor`, the `monitor` will be able to create events for that `asset` whenever an activity specified in `type` is detected. Multiple attributes should be separated by a comma `,`.\n\nPlease note that this parameter can not be used in conjunction with `include_all_of_attributes`. Also, the maximum number of `key`:`value` pairs that this parameter can take is 100 and the overall size of the `match_filter` object should not exceed 65kb.","examples":["{\n \"asset_type\": \"delivery\",\n \"area\": \"Los Angeles downtown\"\n}"]}},"description":"Use this object to update the `attributes` of the `monitor`. Please note that using this property will overwrite the existing `attributes` that the monitor might be using currently to match any asset(s)."},"idle_config":{"type":"object","properties":{"distance_tolerance":{"type":"number","description":"Use this parameter to update the distance threshold that will be used to determine if the asset was idle or not. When the asset, within `time_tolerance` duration, moves less than the value for this parameter, the `monitor` creates an idle event against the `asset`. The `distance_tolerance` should be provided in meters.\n\nPlease note `distance_tolerance` is mandatory when `idle_config` attribute is used."},"time_tolerance":{"type":"integer","description":"Use this parameter to update the time duration for which the `monitor` would track the distance covered by an asset before triggering an idle event. The `time_tolerance` should be provided in milliseconds.\n\nIf the distance covered by the asset during a `time_tolerance` is less than that specified in `distance_tolerance` the asset will be assumed to be idle.\n\nThis attribute along with `distance_tolerance` parameter can be used to control the \"sensitivity\" of the `monitor` with respect to idle alerts. It is recommended to use these properties with appropriate values to trigger genuine idle events. The appropriate values might depend on the traffic conditions, nature of operations that the asset is involved in, type of asset and other factors.","examples":["“time_tolerance”: 50000"],"default":300000}},"description":"`idle_config` is used to update the constraints for creating idle events. When an asset associated with the `monitor` has not moved a given distance within a given time, the Live Tracking API can create events to denote such instances.\n\nPlease note that this object is mandatory when the monitor `type` is `idle`.","required":["distance_tolerance"]},"speeding_config":{"type":"object","properties":{"time_tolerance":{"type":"integer","description":"Use this parameter to update the time tolerance before triggering an event. Adding a tolerance would make the Tracking service wait for the specified time before triggering the event. Consequently, an event is triggered only when the time for which the asset has been over-speeding continuously, exceeds the configured tolerance time. The unit for this parameter is milliseconds.\n\nIt can be seen that this attribute is used to control the \"sensitivity\" of the `monitor` with respect to speed alerts. Higher the value of `time_tolerance` the less sensitive the `monitor` would be to instances of over-speeding. Conversely, if 'time_tolerance' is set to 0, the `monitor` will be extremely sensitive and will create an event as soon as tracking information with a speed value greater than the specified limit is received.","examples":["\"time_tolerance\":10000"],"default":5000},"customer_speed_limit":{"description":"Use this parameter to update the speed limit value that the `monitor` will use to create events, depending on the `time_tolerance` value. The speed limit should be specified in meters per second.\n\nPlease note that `customer_speed_limit` is mandatory when `use_admin_speed_limit` is false. However, when `use_admin_speed_limit` is true, `customer_speed_limit` is ineffective.","type":"string","examples":["\"customer_speed_limit\":8"]},"use_admin_speed_limit":{"type":"boolean","description":"Use this attribute to update which speed limit values will be used by the `monitor`. When `use_admin_speed_limit` is true, the administrative speed limit of the road on which the asset is located, is used to generate events when the asset’s tracked speed exceeds it. Whereas, when `use_admin_speed_limit` is false, the `customer_speed_limit` specified will be used to generate events when the asset's tracked speed exceeds it.\n\nPlease note that if `use_admin_speed_limit` is false, `customer_speed_limit` is mandatory, otherwise when `use_admin_speed_limit` is true then `customer_speed_limit` is ineffective."}},"description":"`speeding_config` is used to update the tolerance values for creating over-speed events. When an asset associated with a `monitor` is traveling at a speed above the given limits, Live Tracking API creates events to indicate such instances.\n\nPlease note that this object is mandatory when the monitor `type` is `speeding`."},"geofence_config":{"type":"object","properties":{"geofence_ids":{"type":"array","description":"Use this array to update the geofence IDs that should be linked to the `monitor`. Please note `geofence_ids` are mandatory when using the `geofence_config` attribute.","items":{"type":"string"}}},"description":"`geofence_config` is used to update the set of geofences linked to the `monitor` for creating `enter` or `exit` type of events based on the asset's location. Please note that this object is mandatory when the monitor `type` belongs to one of `enter`, `exit` or `enter_and_exit`.","required":["geofence_ids"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}}},"tags":["Skynet Asset and Track"]}},"/skynet/asset/{id}/track":{"parameters":[],"post":{"summary":"Upload track info","parameters":[{"in":"path","name":"id","description":"ID of the `asset` whose track information is to be uploaded. This is the same ID that was generated/provided at the time of creating the `asset`.","required":true,"schema":{"type":"string"}},{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}}],"requestBody":{"required":true,"description":"Upload track Body input","content":{"application/json":{"schema":{"type":"object","properties":{"locations":{"type":"object","properties":{"accuracy":{"type":"number","description":"Use this parameter to provide the accuracy of the GPS information at the tracked location. It is the estimated horizontal accuracy radius, in meters.","examples":["\"accuracy\":3"]},"altitude":{"type":"number","description":"Use this parameter to provide the altitude, in meters, of the `asset` at the tracked location.","examples":["\"altitude\":175"]},"bearing":{"type":"number","description":"Use this parameter to provide the heading of the `asset`, in radians, calculated from true north in clockwise direction. This should always be in the range of [0, 360)."},"location":{"type":"object","properties":{"lat":{"type":"number","description":"Latitude of the tracked location of the `asset`."},"lon":{"type":"number","description":"Longitude of the tracked location of the `asset`."}},"description":"An object to collect the coordinate details of the tracked location. Please note this field is mandatory when uploading locations for an asset.","required":["lat","lon"]},"speed":{"type":"number","description":"Use this parameter to provide the speed of the `asset`, in meters per second, at the tracked location.","examples":["\"speed\":20"]},"timestamp":{"type":"integer","description":"Use this parameter to provide the time, expressed as UNIX epoch timestamp in milliseconds, when the location was tracked. Please note this field is mandatory when uploading locations for an asset.","examples":["\"timestamp\":1672124157543"]},"meta_data":{"type":"object","properties":{},"description":"Use this object to add any custom data about the location that is being uploaded. Recommended to use the `key`:`value` format for adding the desired information.\n\nPlease note that the maximum size of `meta_data` object should not exceed 65Kb.","examples":["{\n \"driver_name\": \"Tyler Durden\",\n \"type\": \"parcel\"\n}"]},"battery_level":{"type":"integer","description":"Use this parameter to provide the battery level of the GPS device, as a percentage, when the location is tracked. It should have a minimum value of 0 and a maximum value of 100."}},"description":"An array of objects to collect the location tracking information for an `asset`. Each object must correspond to details of only one location.","required":["location","timestamp"]},"device_id":{"description":"ID of the device used to upload the tracking information of the `asset`.\n\nPlease note that the `device_id` used here must already be linked to the `asset`. Use the *Bind Device to Asset* method to link a device with your `asset`.","type":"string"}},"required":["locations","device_id"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}}},"tags":["Skynet Asset and Track"]}},"/skynet/asset/list":{"parameters":[],"get":{"summary":"Get Asset List","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}},{"in":"query","name":"tags","description":"**This parameter will be deprecated soon! Please use the `include_all_of_attributes` or `include_any_of_attributes` parameters to provide labels or markers for the assets to be retrieved.**\n\n`tags` can be used to filter the assets. Only those assets which have all the `tags` provided, will be included in the result. In case multiple `tags` need to be specified, use `,` to separate them.","schema":{"type":"string","examples":["tags=tag_1,tag_2"]}},{"in":"query","name":"pn","description":"Denotes page number. Use this along with the `ps` parameter to implement pagination for your searched results. This parameter does not have a maximum limit but would return an empty response in case a higher value is provided when the result-set itself is smaller.","schema":{"type":"integer","examples":["pn=5"],"default":1}},{"in":"query","name":"ps","description":"Denotes number of search results per page. Use this along with the `pn` parameter to implement pagination for your searched results.","schema":{"type":"integer","maximum":100,"examples":["ps=25"],"default":20}},{"in":"query","name":"sort","description":"Provide a single field to sort the results by. Only `updated_at` or `created_at` fields can be selected for ordering the results.\n\nBy default, the result is sorted by `created_at` field in the descending order. Allowed values for specifying the order are `asc` for ascending order and `desc` for descending order.","schema":{"type":"string","format":"field:order","default":"created_at:desc","examples":["updated_at:desc"]}},{"in":"query","name":"include_all_of_attributes","description":"Use this parameter to filter the assets by their `attributes`. Only the assets having all the `attributes` added to this parameter, will be returned in the response. Multiple `attributes` can be separated using pipes (`|`).\n\nPlease note the attributes are case sensitive. Also, this parameter can not be used in conjunction with `include_any_of_attributes` parameter.","schema":{"type":"string","format":"key_1:value_1|key_2:value_2","examples":["include_all_of_attributes=vehicle_type:pickup_truck|driver_name:John"]}},{"in":"query","name":"include_any_of_attributes","description":"Use this parameter to filter the assets by their `attributes`. Assets having at least one of the `attributes` added to this parameter, will be returned in the response. Multiple `attributes` can be separated using pipes (`|`).\n\nPlease note the attributes are case sensitive. Also, this parameter can not be used in conjunction with `include_all_of_attributes` parameter.","schema":{"type":"string","format":"key1:value1|key2:value2|...","examples":["include_any_of_attributes=vehicle_type:pickup_truck|driver_name:John"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"},"data":{"type":"object","properties":{"list":{"type":"array","description":"An array of objects, with each object representing one `asset`.","items":{"type":"object","properties":{"id":{"description":"ID of the `asset`. This is the same ID that was generated/provided at the time of creating the `asset`.","type":"string"},"device_id":{"description":"ID of the `device` that is linked to this asset. Please note that there can be multiple `device_id` linked to a single `asset`. An empty response is returned if no devices are linked to the `asset`.\n\nUser can link a device to an `asset` using the *Bind Asset to Device* method.","type":"string"},"name":{"description":"Name of the `asset`. The value would be the same as that provided for the `name` parameter at the time of creating or updating the `asset`.","type":"string"},"description":{"description":"Description of the `asset`. The value would be the same as that provided for the `description` parameter at the time of creating or updating the `asset`.","type":"string"},"tags":{"type":"array","description":"**This parameter will be deprecated soon! Please move existing `tags` to `attributes` parameter.**\n\nTags of the asset. These were associated with the `asset` when it was created or updated. `tags` can be used for filtering assets in operations like *Get Asset List* and asset **Search** methods. They can also be used for monitoring of assets using **Monitor** methods after linking `tags` and `asset`.","items":{"type":"string"}},"created_at":{"type":"integer","description":"A UNIX epoch timestamp in seconds representing the time at which the `asset` was created.","examples":["\"created_at\":1672124157"]},"updated_at":{"type":"integer","description":"A UNIX epoch timestamp in seconds representing the time at which the `asset` was last updated.","examples":["\"updated_at\":1672124157"]},"attributes":{"type":"object","properties":{},"description":"A string dictionary object containing `attributes` of the `asset`. These `attributes` were associated with the `asset` at the time of creating or updating it.\n\n`attributes` can be added to an `asset` using the *Update Asset Attributes* method.","examples":["{\n \"asset_type\": \"delivery\",\n \"area\": \"Los Angeles downtown\"\n}"]},"latest_location":{"type":"object","properties":{"location":{"type":"object","properties":{"lat":{"type":"number","description":"Latitude of the tracked location of the `asset`."},"lon":{"type":"number","description":"Longitude of the tracked location of the `asset`."}},"description":"An object with the coordinates of the last tracked location."},"timestamp":{"type":"integer","description":"A UNIX epoch timestamp in milliseconds, representing the time at which the location was tracked."},"accuracy":{"type":"number","description":"If available, this property returns the accuracy of the GPS information received at the last tracked location. It is represented as an estimated horizontal accuracy radius, in meters, at the 68th percentile confidence level."},"speed":{"type":"number","description":"If available in the GPS information, this property returns the speed of the `asset`, in meters per second, at the last tracked location."},"bearing":{"type":"number","description":"If available in the GPS information, this property returns the heading of the `asset` calculated from true north in clockwise direction at the last tracked location. Please note that the bearing is not affected by the device orientation.\n\nThe bearing will always be in the range of [0, 360)."},"altitude":{"type":"number","description":"If available in the GPS information, this property returns the altitude of the `asset` at the last tracked location. It is represented as height, in meters, above the WGS84 reference ellipsoid."}},"description":"An object with details of the last tracked location of the asset."}},"description":"An object with details of the `asset` properties."}},"page":{"type":"object","properties":{"total":{"type":"integer","description":"An integer value indicating the total number of items available in the data set. This parameter can be used to calculate the total number of pages available."},"offset":{"type":"integer","description":"An integer value indicating the number of items that need to be skipped while displaying the results of the current page."},"page":{"type":"integer","description":"An integer value indicating the current page number (starting at 0)."},"size":{"type":"integer","description":"An integer value indicating the maximum number of items retrieved per `page`."},"hasmore":{"type":"boolean","description":"A boolean value indicating whether there are more items available beyond the current page."}},"description":"An object with pagination details of the search results. Use this object to implement pagination in your application."}},"description":"A data object containing the list of assets."},"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}}},"tags":["Skynet Asset and Track"]}},"/skynet/search/polygon":{"get":{"summary":"Polygon Search","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}},{"in":"query","name":"polygon","description":"Define a custom polygon enclosing the area to be searched. It should be a pipe (`|`) delimited list of location coordinates.\n\nPlease ensure that the `polygon` provided is enclosed. This can be achieved by making the last location coordinate in the list equal to the first location coordinate of the list.\n\nPlease note that the maximum area of the search polygon allowed is 3000 km2.","required":true,"explode":true,"schema":{"type":"string","format":"latitude_1,longitude_1|latitude_2,longitude_2|...","examples":["polygon=17.4239,78.4590|17.4575,78.4624|17.4547,78.5483|17.4076,78.5527|17.4239,78.4590"]}},{"in":"query","name":"filter","description":"**`tags` parameter will be deprecated soon! Please use the `include_any_of_attributes` or `include_all_of_attributes` parameters to match assets based on their labels or markers.**\n\nUse this parameter to filter the assets found inside the specified area by their `tags`. Multiple `tags` can be separated using commas (`,`).\n\nPlease note the tags are case sensitive.","schema":{"type":"string","format":"filter=tag:value_1,value_2...","examples":["filter=tag:delivery,truck"]}},{"in":"query","name":"pn","description":"Denotes page number. Use this along with the `ps` parameter to implement pagination for your searched results. This parameter does not have a maximum limit but would return an empty response in case a higher value is provided when the result-set itself is smaller.","schema":{"type":"integer","examples":["pn=5"],"default":1}},{"in":"query","name":"ps","description":"Denotes number of search results per page. Use this along with the `pn` parameter to implement pagination for your searched results.","schema":{"type":"integer","maximum":100,"examples":["ps=25"],"default":20}},{"in":"query","name":"include_any_of_attributes","description":"Use this parameter to filter the assets found inside the specified area by their `attributes`. Assets having at least one of the `attributes` added to this parameter, will be returned in the search results. Multiple `attributes` can be separated using pipes (`|`).\n\nPlease note the attributes are case sensitive. Also, this parameter can not be used in conjunction with `include_all_of_attributes` parameter.","schema":{"type":"string","format":"key1:value1|key2:value2|...","examples":["include_any_of_attributes=vehicle_type:pickup_truck|driver_name:John"]}},{"in":"query","name":"include_all_of_attributes","description":"Use this parameter to filter the assets found inside the specified area by their `attributes`. Only the assets having all the `attributes` that are added to this parameter, will be returned in the search results. Multiple `attributes` can be separated using pipes (`|`).\n\nPlease note the attributes are case sensitive. Also, this parameter can not be used in conjunction with `include_any_of_attributes` parameter.","schema":{"type":"string","format":"key_1:value_1|key_2:value_2","examples":["include_all_of_attributes=vehicle_type:pickup_truck|driver_name:John"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"},"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"data":{"type":"object","properties":{"assets":{"type":"array","description":"An array of objects with details of the asset(s) returned in the search result. Each object represents one `asset`","items":{"type":"object","properties":{"id":{"description":"ID of `asset` which was last located inside the specified area in the input request. This is the same ID that was generated/provided at the time of creating the `asset`.","type":"string"},"name":{"description":"Name of `asset`. The value would be the same as that provided for the `name` parameter at the time of creating or updating the `asset`.","type":"string"},"description":{"description":"Description of the `asset`. The value would be the same as that provided for the `description` parameter at the time of creating or updating the `asset`.","type":"string"},"latest_location":{"type":"object","properties":{"accuracy":{"type":"number","description":"If available, this property returns the accuracy of the GPS information received at the tracked location. It is represented as an estimated horizontal accuracy radius, in meters, at the 68th percentile confidence level."},"altitude":{"type":"number","description":"If available in the GPS information, this property returns the altitude of the `asset` at the tracked location. It is represented as height, in meters, above the WGS84 reference ellipsoid."},"bearing":{"type":"number","description":"If available in the GPS information, this property returns the heading of the `asset` calculated from true north in clockwise direction at the tracked location. Please note that the bearing is not affected by the device orientation.\n\nThe bearing will always be in the range of [0, 360)."},"location":{"type":"object","properties":{"lat":{"type":"number","description":"Latitude of the tracked location of the `asset`."},"lon":{"type":"number","description":"Longitude of the tracked location of the `asset`."}},"description":"An object with the coordinates of the last tracked location."},"meta_data":{"type":"object","properties":{},"description":"Specifies the custom data about the location that was added when the location was uploaded.","examples":["{\n \"sample_meta_data\": \"test\"\n}"]},"speed":{"type":"number","description":"If available in the GPS information, this property returns the speed of the `asset`, in meters per second, at the tracked location."},"timestamp":{"type":"integer","description":"A UNIX epoch timestamp in milliseconds, representing the time at which the location was tracked.","examples":["\"timestamp\":1672124157543"]},"battery_level":{"type":"integer","description":"Returns the battery level of the GPS device, as a percentage, when the location was tracked. It has a minimum value of 0 and a maximum value of 100."}},"description":"An object with details of the last tracked location."},"tags":{"type":"array","description":"**This parameter will be deprecated soon! Please move existing `tags` to `attributes` parameter.**\n\nTags associated with the `asset`.","items":{"description":"Tag string.","type":"string"}},"created_at":{"type":"integer","description":"A UNIX timestamp in seconds representing the time at which the `asset` was created.","examples":["\"created_at\":1672124157"]},"updated_at":{"type":"integer","description":"A UNIX timestamp in seconds representing the time at which the `asset` was last updated.","examples":["\"updated_at\":1672124157"]}}}},"page":{"type":"object","properties":{"total":{"type":"integer","description":"An integer value indicating the total number of items available in the data set. This parameter can be used to calculate the total number of pages available."},"offset":{"type":"integer","description":"An integer value indicating the number of items that need to be skipped while displaying the results of the current page."},"page":{"type":"integer","description":"An integer value indicating the current page number (starting at 0)."},"size":{"type":"integer","description":"An integer value indicating the maximum number of items retrieved per `page`."},"hasmore":{"type":"boolean","description":"A boolean value indicating whether there are more items available beyond the current page."}},"description":"An object with pagination details of the search results. Use this object to implement pagination in your application."}},"description":"A data object containing the search result."}}}}}}},"tags":["Skynet Asset and Track"]},"post":{"summary":"Polygon Search","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"polygon":{"type":"object","properties":{"type":{"description":"Type of the geoJSON geometry. Should always be `polygon`.","type":"string"},"coordinates":{"type":"array","description":"An array of coordinates in the [longitude, latitude] format, representing the polygon boundary.","items":{"type":"number"}}},"description":"An object to collect geoJSON details of a custom polygon. Please ensure that:\n\n- the `polygon` provided is enclosed. This can be achieved by making the last location coordinate in the list equal to the first location coordinate of the list.\n\n- the 'polygon' provided does not contain multiple rings.\n\nThe contents of this object follow the [geoJSON standard](https://datatracker.ietf.org/doc/html/rfc7946).\n\nPlease note that the maximum area of the search polygon allowed is 3000 km2.","required":["type","coordinates"]},"filter":{"description":"**`tags` parameter will be deprecated soon! Please use the `include_any_of_attributes` or `include_all_of_attributes` parameters to match assets based on their labels or markers.**\n\nUse this parameter to filter the assets found inside the specified area by their `tag`. Multiple `tag` can be separated using comma (`,`).\n\nPlease note the tags are case sensitive.","type":"string","examples":["\"tag:delivery,truck\""]},"match_filter":{"type":"object","properties":{"include_all_of_attributes":{"description":"Use this parameter to filter the assets found inside the specified area by their `attributes`. Only the assets having all the `attributes` that are added to this parameter, will be returned in the search results. Multiple `attributes` can be separated using commas (`,`).\n\nPlease note the attributes are case sensitive. Also, this parameter can not be used in conjunction with `include_any_of_attributes` parameter.","type":"string","examples":["\"shift_timing\": \"0800-1700\",\"driver_name\": \"John\""]},"include_any_of_attributes":{"description":"Use this parameter to filter the assets found inside the specified area by their `attributes`. Assets having at least one of the `attributes` added to this parameter, will be returned in the search results. Multiple `attributes` can be separated using commas (`,`).\n\nPlease note the attributes are case sensitive. Also, this parameter can not be used in conjunction with `include_all_of_attributes` parameter.","type":"string"}},"description":"An object to define the `attributes` which will be used to filter the assets found within the `polygon`."},"pn":{"type":"integer","description":"Denotes page number. Use this along with the `ps` parameter to implement pagination for your searched results. This parameter does not have a maximum limit but would return an empty response in case a higher value is provided when the result-set itself is smaller.","examples":["\"pn\":3"],"default":1},"ps":{"type":"integer","description":"Denotes number of search results per page. Use this along with the `pn` parameter to implement pagination for your searched results. Please note that `ps` has a default value of 20 and accepts integers only in the range of [1, 100].","examples":["\"ps\":3"],"default":20},"max_search_limit":{"type":"boolean","description":"if ture, can get 16x bigger limitation in search."}},"required":["polygon"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"},"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"data":{"type":"object","properties":{"assets":{"type":"array","description":"An array of objects with details of the asset(s) returned in the search result. Each object represents one `asset`","items":{"type":"object","properties":{"id":{"description":"ID of `asset` which was last located inside the specified area in the input request. This is the same ID that was generated/provided at the time of creating the `asset`.","type":"string"},"name":{"description":"Name of `asset`. The value would be the same as that provided for the `name` parameter at the time of creating or updating the `asset`.","type":"string"},"description":{"description":"Description of the `asset`. The value would be the same as that provided for the `description` parameter at the time of creating or updating the `asset`.","type":"string"},"latest_location":{"type":"object","properties":{"accuracy":{"type":"number","description":"If available, this property returns the accuracy of the GPS information received at the tracked location. It is represented as an estimated horizontal accuracy radius, in meters, at the 68th percentile confidence level."},"altitude":{"type":"number","description":"If available in the GPS information, this property returns the altitude of the `asset` at the tracked location. It is represented as height, in meters, above the WGS84 reference ellipsoid."},"bearing":{"type":"number","description":"If available in the GPS information, this property returns the heading of the `asset` calculated from true north in clockwise direction at the tracked location. Please note that the bearing is not affected by the device orientation.\n\nThe bearing will always be in the range of [0, 360)."},"location":{"type":"object","properties":{"lat":{"type":"number","description":"Latitude of the tracked location of the `asset`."},"lon":{"type":"number","description":"Longitude of the tracked location of the `asset`."}},"description":"An object with the coordinates of the last tracked location."},"meta_data":{"type":"object","properties":{},"description":"Specifies the custom data about the location that was added when the location was uploaded.","examples":["{\n \"sample_meta_data\": \"test\"\n}"]},"speed":{"type":"number","description":"If available in the GPS information, this property returns the speed of the `asset`, in meters per second, at the tracked location."},"timestamp":{"type":"integer","description":"A UNIX epoch timestamp in milliseconds, representing the time at which the location was tracked.","examples":["\"timestamp\":1672124157543"]},"battery_level":{"type":"integer","description":"Returns the battery level of the GPS device, as a percentage, when the location was tracked. It has a minimum value of 0 and a maximum value of 100."}},"description":"An object with details of the last tracked location."},"tags":{"type":"array","description":"**This parameter will be deprecated soon! Please move existing `tags` to `attributes` parameter.**\n\nTags associated with the `asset`.","items":{"description":"Tag string.","type":"string"}},"created_at":{"type":"integer","description":"A UNIX timestamp in seconds representing the time at which the `asset` was created.","examples":["\"created_at\":1672124157"]},"updated_at":{"type":"integer","description":"A UNIX timestamp in seconds representing the time at which the `asset` was last updated.","examples":["\"updated_at\":1672124157"]}}}},"page":{"type":"object","properties":{"total":{"type":"integer","description":"An integer value indicating the total number of items available in the data set. This parameter can be used to calculate the total number of pages available."},"offset":{"type":"integer","description":"An integer value indicating the number of items that need to be skipped while displaying the results of the current page."},"page":{"type":"integer","description":"An integer value indicating the current page number (starting at 0)."},"size":{"type":"integer","description":"An integer value indicating the maximum number of items retrieved per `page`."},"hasmore":{"type":"boolean","description":"A boolean value indicating whether there are more items available beyond the current page."}},"description":"An object with pagination details of the search results. Use this object to implement pagination in your application."}},"description":"A data object containing the search result."}}}}}}},"tags":["Skynet Asset and Track"]}},"/skynet/asset/{id}/location/list":{"parameters":[],"get":{"summary":"Track locations of an asset","parameters":[{"in":"path","name":"id","description":"ID of the `asset` for which the location track information needs to be retrieved. This is the same ID that was generated/provided at the time of creating the `asset`.","required":true,"schema":{"type":"string"}},{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}},{"in":"query","name":"start_time","description":"Time after which the tracked locations of the `asset` need to be retrieved.","schema":{"type":"integer","examples":["start_time=1672124157543"]}},{"in":"query","name":"end_time","description":"Time until which the tracked locations of the `asset` need to be retrieved.","schema":{"type":"integer","examples":["end_time= 1672124157765"]}},{"in":"query","name":"geometry_type","description":"Set the geometry format to encode the path linking the tracked locations of the `asset`.\n\nPlease note that `geometry_type` is effective only when `mapmatch` property of `correction` parameter is set to 1.","schema":{"description":"geometry format to encode the path linking the tracked locations of the asset.","type":"string","default":"polyline6","examples":[],"enum":["`polyline`","`polyline6`","`geojson`"],"x-enum-options":[{"value":"`polyline`"},{"value":"`polyline6`"},{"value":"`geojson`"}]}},{"in":"query","name":"correction","description":"Describe the geometry characteristics through a `,` separated list of properties.\n\nSetting `mapmatch` to 1 returns the geometry of the tracked points, snapped to the nearest road.\n\nSetting `interpolate` to 1 smoothens the snapped geometry by adding more points, as needed. Please note, `mapmatch` should be set to 1 for `interpolate` to be effective.\n\n`mode` is used to set the transport mode for which the snapped route will be determined. Allowed values for `mode` are `car` and `truck`.","explode":true,"schema":{"type":"string","format":"mapmatch=boolean,interpolate=boolean,mode=string","default":"mapmatch=0,interpolate=0,mode=`car`","examples":["correction=mapmatch=1,interpolate=0,mode=`car`"]}},{"in":"query","name":"pn","description":"Denotes page number. Use this along with the `ps` parameter to implement pagination for your searched results. This parameter does not have a maximum limit but would return an empty response in case a higher value is provided when the result-set itself is smaller.","schema":{"type":"integer","examples":["pn=5"],"default":1}},{"in":"query","name":"ps","description":"Denotes number of search results per page. Use this along with the `pn` parameter to implement pagination for your searched results.","schema":{"type":"integer","maximum":500,"examples":["ps=200"],"default":20}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"},"data":{"type":"object","properties":{"list":{"type":"array","description":"An array of objects with details of the tracked locations of the `asset`. Each object represents one tracked location.","items":{"type":"object","properties":{"accuracy":{"type":"number","description":"If available, this property returns the accuracy of the GPS information received at the tracked location. It is represented as an estimated horizontal accuracy radius, in meters, at the 68th percentile confidence level."},"altitude":{"type":"number","description":"If available in the GPS information, this property returns the altitude of the `asset` at the tracked location. It is represented as height, in meters, above the WGS84 reference ellipsoid."},"bearing":{"type":"number","description":"If available in the GPS information, this property returns the heading of the `asset` calculated from true north in clockwise direction at the tracked location. Please note that the bearing is not affected by the device orientation.\n\nThe bearing will always be in the range of [0, 360)."},"location":{"type":"object","properties":{"lat":{"type":"number","description":"Latitude of the tracked location of the `asset`."},"lon":{"type":"number","description":"Longitude of the tracked location of the `asset`."}},"description":"An object with the coordinates of the last tracked location."},"meta_data":{"type":"object","properties":{},"description":"Specifies the custom data about the location that was added when the location was uploaded.","examples":["{\n \"sample_meta_data\": \"test\"\n}"]},"speed":{"type":"number","description":"If available in the GPS information, this property returns the speed of the `asset`, in meters per second, at the tracked location."},"timestamp":{"type":"integer","description":"A UNIX epoch timestamp in milliseconds, representing the time at which the location was tracked.","examples":["\"timestamp\":1672124157543"]},"battery_level":{"type":"integer","description":"Returns the battery level of the GPS device, as a percentage, when the location was tracked. It has a minimum value of 0 and a maximum value of 100."}},"description":"An object with details of the last tracked location."}},"page":{"type":"object","properties":{"total":{"type":"integer","description":"An integer value indicating the total number of items available in the data set. This parameter can be used to calculate the total number of pages available."},"offset":{"type":"integer","description":"An integer value indicating the number of items that need to be skipped while displaying the results of the current page."},"page":{"type":"integer","description":"An integer value indicating the current page number (starting at 0)."},"size":{"type":"integer","description":"An integer value indicating the maximum number of items retrieved per `page`."},"hasmore":{"type":"boolean","description":"A boolean value indicating whether there are more items available beyond the current page."}},"description":"An object with pagination details of the search results. Use this object to implement pagination in your application."},"distance":{"type":"number","description":"Distance of the path, in meters, formed by connecting all tracked locations returned.\n\nPlease note that `distance` is returned only when the `mapmatch` property of `correction` parameter is set to 1."},"snapped_points":{"type":"array","description":"An array of objects with details about the snapped points for each of the tracked locations returned for the `asset`.\n\nPlease note that this property is returned only when the `mapmatch` property of `correction` parameter is set to 1.","items":{"type":"object","properties":{"bearing":{"description":"The bearing angle of the snapped point from the original tracked location, in radians. It indicates the direction of the snapped point.","type":"string"},"distance":{"type":"number","description":"The distance of the snapped point from the original tracked location, in meters."},"name":{"description":"The name of the street or road of the snapped point.","type":"string"},"originalIndex":{"description":"The index of the tracked location to which this snapped point corresponds to.","type":"string"},"location":{"type":"object","properties":{"lat":{"type":"number","description":"Latitude of the snapped point."},"lon":{"type":"number","description":"Longitude of the snapped point."}},"description":"The latitude and longitude coordinates of the snapped point."}}}},"geojson":{"type":"object","properties":{"type":{"description":"Type of the geoJSON object.","type":"string"},"geometry":{"type":"object","properties":{"type":{"description":"Type of the geoJSON geometry.","type":"string"},"coordinates":{"type":"array","description":"An array of coordinates in the [longitude, latitude] format, representing the route geometry.","items":{"type":"number"}}},"description":"An object with details of the geoJSON geometry of the route."}},"description":"An object with geoJSON details of the route. It is returned only when the `mapmatch` property of the `correction` parameter is set to 1 and `geometry_type` is `geojson, otherwise it is not present in the response. The contents of this object follow the [geoJSON standard](https://datatracker.ietf.org/doc/html/rfc7946)."},"geometry":{"type":"array","description":"Geometry of tracked locations in the requested format. It is returned only if the `mapmatch` property of the ‘correction’ parameter is set to 1.","items":{"type":"string"}}}},"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}}},"tags":["Skynet Asset and Track"]}},"/skynet/search/around":{"get":{"summary":"Around Search","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}},{"in":"query","name":"radius","description":"Radius, in meters, of the circular area to be searched.","required":true,"schema":{"type":"number","maximum":5000}},{"in":"query","name":"center","description":"Location coordinates of the point which would act as the center of the circular area to be searched.","required":true,"schema":{"type":"string","format":"latitude,longitude","examples":["56.597801,43.967836"]}},{"in":"query","name":"filter","description":"**`tags` parameter will be deprecated soon! Please use the `include_any_of_attributes` or `include_all_of_attributes` parameters to match assets based on their labels or markers.**\n\nUse this parameter to filter the assets found inside the specified area by their `tags`. Multiple `tags` can be separated using commas (`,`).\n\nPlease note the tags are case sensitive.","schema":{"type":"string","format":"filter=tag:value_1,value_2...","examples":["filter=tag:delivery,truck"]}},{"in":"query","name":"ps","description":"Denotes number of search results per page. Use this along with the `pn` parameter to implement pagination for your searched results.","schema":{"type":"integer","maximum":100,"examples":["ps=25"],"default":20}},{"in":"query","name":"pn","description":"Denotes page number. Use this along with the `ps` parameter to implement pagination for your searched results. This parameter does not have a maximum limit but would return an empty response in case a higher value is provided when the result-set itself is smaller.","schema":{"type":"integer","examples":["pn=5"],"default":1}},{"in":"query","name":"include_any_of_attributes","description":"Use this parameter to filter the assets found inside the specified area by their `attributes`. Assets having at least one of the `attributes` added to this parameter, will be returned in the search results. Multiple `attributes` can be separated using pipes (`|`).\n\nPlease note the attributes are case sensitive. Also, this parameter can not be used in conjunction with `include_all_of_attributes` parameter.","schema":{"type":"string","format":"key1:value1|key2:value2|...","examples":["include_any_of_attributes=vehicle_type:pickup_truck|driver_name:John"]}},{"in":"query","name":"include_all_of_attributes","description":"Use this parameter to filter the assets found inside the specified area by their `attributes`. Only the assets having all the `attributes` that are added to this parameter, will be returned in the search results. Multiple `attributes` can be separated using pipes (`|`).\n\nPlease note the attributes are case sensitive. Also, this parameter can not be used in conjunction with `include_any_of_attributes` parameter.","schema":{"type":"string","format":"key_1:value_1|key_2:value_2","examples":["include_all_of_attributes=vehicle_type:pickup_truck|driver_name:John"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"},"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"data":{"type":"object","properties":{"assets":{"type":"array","description":"An array of objects with details of the asset(s) returned in the search result. Each object represents one `asset`","items":{"type":"object","properties":{"id":{"description":"ID of `asset` which was last located inside the specified area in the input request. This is the same ID that was generated/provided at the time of creating the `asset`.","type":"string"},"name":{"description":"Name of `asset`. The value would be the same as that provided for the `name` parameter at the time of creating or updating the `asset`.","type":"string"},"description":{"description":"Description of the `asset`. The value would be the same as that provided for the `description` parameter at the time of creating or updating the `asset`.","type":"string"},"latest_location":{"type":"object","properties":{"accuracy":{"type":"number","description":"If available, this property returns the accuracy of the GPS information received at the tracked location. It is represented as an estimated horizontal accuracy radius, in meters, at the 68th percentile confidence level."},"altitude":{"type":"number","description":"If available in the GPS information, this property returns the altitude of the `asset` at the tracked location. It is represented as height, in meters, above the WGS84 reference ellipsoid."},"bearing":{"type":"number","description":"If available in the GPS information, this property returns the heading of the `asset` calculated from true north in clockwise direction at the tracked location. Please note that the bearing is not affected by the device orientation.\n\nThe bearing will always be in the range of [0, 360)."},"location":{"type":"object","properties":{"lat":{"type":"number","description":"Latitude of the tracked location of the `asset`."},"lon":{"type":"number","description":"Longitude of the tracked location of the `asset`."}},"description":"An object with the coordinates of the last tracked location."},"meta_data":{"type":"object","properties":{},"description":"Specifies the custom data about the location that was added when the location was uploaded.","examples":["{\n \"sample_meta_data\": \"test\"\n}"]},"speed":{"type":"number","description":"If available in the GPS information, this property returns the speed of the `asset`, in meters per second, at the tracked location."},"timestamp":{"type":"integer","description":"A UNIX epoch timestamp in milliseconds, representing the time at which the location was tracked.","examples":["\"timestamp\":1672124157543"]},"battery_level":{"type":"integer","description":"Returns the battery level of the GPS device, as a percentage, when the location was tracked. It has a minimum value of 0 and a maximum value of 100."}},"description":"An object with details of the last tracked location."},"tags":{"type":"array","description":"**This parameter will be deprecated soon! Please move existing `tags` to `attributes` parameter.**\n\nTags associated with the `asset`.","items":{"description":"Tag string.","type":"string"}},"created_at":{"type":"integer","description":"A UNIX timestamp in seconds representing the time at which the `asset` was created.","examples":["\"created_at\":1672124157"]},"updated_at":{"type":"integer","description":"A UNIX timestamp in seconds representing the time at which the `asset` was last updated.","examples":["\"updated_at\":1672124157"]}}}},"page":{"type":"object","properties":{"total":{"type":"integer","description":"An integer value indicating the total number of items available in the data set. This parameter can be used to calculate the total number of pages available."},"offset":{"type":"integer","description":"An integer value indicating the number of items that need to be skipped while displaying the results of the current page."},"page":{"type":"integer","description":"An integer value indicating the current page number (starting at 0)."},"size":{"type":"integer","description":"An integer value indicating the maximum number of items retrieved per `page`."},"hasmore":{"type":"boolean","description":"A boolean value indicating whether there are more items available beyond the current page."}},"description":"An object with pagination details of the search results. Use this object to implement pagination in your application."}},"description":"A data object containing the search result."}}}}}}},"tags":["Skynet Asset and Track"]}},"/skynet/asset/{id}":{"parameters":[],"get":{"summary":"Get an Asset","parameters":[{"in":"path","name":"id","description":"ID of the `asset` to be fetched. This is the same ID that was generated/provided at the time of creating the `asset`.","required":true,"schema":{"type":"string"}},{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"},"data":{"type":"object","properties":{"asset":{"type":"object","properties":{"id":{"description":"ID of the `asset`. This is the same ID that was generated/provided at the time of creating the `asset`.","type":"string"},"device_id":{"description":"ID of the `device` that is linked to this asset. Please note that there can be multiple `device_id` linked to a single `asset`. An empty response is returned if no devices are linked to the `asset`.\n\nUser can link a device to an `asset` using the *Bind Asset to Device* method.","type":"string"},"name":{"description":"Name of the `asset`. The value would be the same as that provided for the `name` parameter at the time of creating or updating the `asset`.","type":"string"},"description":{"description":"Description of the `asset`. The value would be the same as that provided for the `description` parameter at the time of creating or updating the `asset`.","type":"string"},"tags":{"type":"array","description":"**This parameter will be deprecated soon! Please move existing `tags` to `attributes` parameter.**\n\nTags of the asset. These were associated with the `asset` when it was created or updated. `tags` can be used for filtering assets in operations like *Get Asset List* and asset **Search** methods. They can also be used for monitoring of assets using **Monitor** methods after linking `tags` and `asset`.","items":{"type":"string"}},"created_at":{"type":"integer","description":"A UNIX epoch timestamp in seconds representing the time at which the `asset` was created.","examples":["\"created_at\":1672124157"]},"updated_at":{"type":"integer","description":"A UNIX epoch timestamp in seconds representing the time at which the `asset` was last updated.","examples":["\"updated_at\":1672124157"]},"attributes":{"type":"object","properties":{},"description":"A string dictionary object containing `attributes` of the `asset`. These `attributes` were associated with the `asset` at the time of creating or updating it.\n\n`attributes` can be added to an `asset` using the *Update Asset Attributes* method.","examples":["{\n \"asset_type\": \"delivery\",\n \"area\": \"Los Angeles downtown\"\n}"]},"latest_location":{"type":"object","properties":{"location":{"type":"object","properties":{"lat":{"type":"number","description":"Latitude of the tracked location of the `asset`."},"lon":{"type":"number","description":"Longitude of the tracked location of the `asset`."}},"description":"An object with the coordinates of the last tracked location."},"timestamp":{"type":"integer","description":"A UNIX epoch timestamp in milliseconds, representing the time at which the location was tracked."},"accuracy":{"type":"number","description":"If available, this property returns the accuracy of the GPS information received at the last tracked location. It is represented as an estimated horizontal accuracy radius, in meters, at the 68th percentile confidence level."},"speed":{"type":"number","description":"If available in the GPS information, this property returns the speed of the `asset`, in meters per second, at the last tracked location."},"bearing":{"type":"number","description":"If available in the GPS information, this property returns the heading of the `asset` calculated from true north in clockwise direction at the last tracked location. Please note that the bearing is not affected by the device orientation.\n\nThe bearing will always be in the range of [0, 360)."},"altitude":{"type":"number","description":"If available in the GPS information, this property returns the altitude of the `asset` at the last tracked location. It is represented as height, in meters, above the WGS84 reference ellipsoid."}},"description":"An object with details of the last tracked location of the asset."}},"description":"An object with details of the `asset` properties."}},"description":"An object containing the information about the `asset` returned."},"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}}},"tags":["Skynet Asset and Track"]},"delete":{"summary":"Delete an Asset","parameters":[{"in":"path","name":"id","description":"ID of the `asset` to be deleted. This is the same ID that was generated/provided at the time of creating the `asset`.","required":true,"schema":{"type":"string"}},{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}}},"tags":["Skynet Asset and Track"]},"put":{"summary":"Update an Asset","parameters":[{"in":"path","name":"id","description":"ID of the `asset` to be updated. This is the same ID that was generated/provided at the time of creating the `asset`.","required":true,"schema":{"type":"string"}},{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}}],"requestBody":{"required":true,"description":"Update Asset Body input","content":{"application/json":{"schema":{"type":"object","properties":{"description":{"description":"Use this param to update the `description` of an `asset`.","type":"string"},"name":{"description":"Use this param to update the `name` of an `asset`. Users can assign meaningful custom names to their assets.","type":"string"},"tags":{"type":"array","description":"**This parameter will be deprecated soon! Please use the `attributes` parameter to add labels or markers for the asset.**\n\nUse this param to update the `tags` of an `asset`. `tags` can be used to filter `asset` in *Get Asset List*, **Search** and **Monitor** queries.","examples":["[\n \"area_Los Angeles\",\n \"shift_1\"\n]"],"items":{"type":"string"}},"attributes":{"type":"object","properties":{},"description":"Use this param to update the `attributes` of an asset in `key`:`value` format. Users can maintain any useful information or context about the assets by utilising this parameter.\n\nPlease be careful when using this parameter while updating an `asset` as the new `attributes` object provided will completely overwrite the old `attributes` object. Use the *Update Asset Attributes* method to add new or modify existing attributes.\n\nAnother point to note is that the overall size of the `attributes` object cannot exceed 65kb and the maximum number of `key`:`value` pairs that can be added to this object is 100.","examples":["{\n \"shift_timing\": \"0800-1700\",\n \"driver_name\": \"John\"\n}"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}}},"tags":["Skynet Asset and Track"]}},"/skynet/analysis/track":{},"/skynet/asset/{id}/attributes":{"parameters":[{"in":"path","name":"id","description":"ID of the `asset` whose attributes need to be updated. This is the same ID that was generated/provided at the time of creating the `asset`.","required":true,"schema":{"type":"string"}}],"put":{"summary":"Update asset attributes. (add)","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"attributes":{"type":"object","properties":{},"description":"`attributes` can be used to add any useful information or context to your assets like the vehicle type, shift timing etc. These attributes can also be used to filter assets in **Search**, **Monitor**, and *Get Asset List* queries.\n\nProvide the attributes to be added or updated, in `key`:`value` format. If an existing `key` is provided in the input, then the `value` will be modified as per the input value. If a new `key` is provided in the input, then the `key` would be added to the existing set. The contents of any `value` field are neither altered nor removed unless specifically referred to by its `key` in the input request.\n\nPlease note that the maximum number of `key`:`value` pairs that can be added to an `attributes` object is 100. Also, the overall size of `attributes` object should not exceed 65kb.","examples":["{\n \"shift_timing\": \"0800-1700\",\n \"driver_name\": \"John\"\n}"]}},"required":["attributes"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.","type":"string"},"status":{"description":"A string indicating the state of the response. On successful responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.","type":"string"}}}}}}},"tags":["Skynet Asset and Track"]}},"/flexi/isochrone/json":{"get":{"description":"The NextBillion.ai Isochrone API computes areas that are reachable within a specified amount of time from a location, and returns the reachable regions as contours of polygons or lines that you can display on a map.","summary":"Isochrone API","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}},{"in":"query","name":"coordinates","description":"The coordinates of the location which acts as the starting point for which the isochrone lines need to be determined.","required":true,"schema":{"type":"string","format":"latitude,longitude","examples":["coordinates=1.29363713,103.8383112"]}},{"in":"query","name":"contours_minutes","description":"The time, in minutes, for which an isochrone contour needs to be determined. You can request up to 4 time based contours in a single request using a `,` as a separator.\n\nPlease note that, when requesting multiple isochrones, the times must be provided in an increasing order.\n\nThe maximum time that can be specified is 40 minutes.\n\nThis parameter is mandatory when `contours_meters` is not provided in the request.","explode":true,"schema":{"type":"string","format":"value_1,value_2,value_3,value_4","examples":["contours_minutes=15,25"]}},{"in":"query","name":"contours_meters","description":"The distance, in meters, for which an isochrone contour needs to be determined. You can request up to 4 distance based contours in a single request using a `,` as a separator.\n\nPlease note that, when requesting multiple isochrones, the distances must be provided in an increasing order.\n\nThe maximum distance that can be specified is 60000 meters (60km).\n\nThis parameter is mandatory when `contours_minutes` is not provided in the request.","explode":true,"schema":{"type":"string","format":"value_1,value2,...","examples":["contours_meters=2500,3000"]}},{"in":"query","name":"mode","description":"Set which driving mode the service should use to determine the contour.\n\nFor example, if you use `car`, the API will return an isochrone contour that a car can reach within the specified time or after driving the specified distance. Using `truck` will return a contour that a truck can reach after taking into account appropriate truck routing restrictions.\n\n[**Note:** Only the `car` profile is enabled by default. Please note that customized profiles (including `truck`) might not be available for all regions. Please contact your [NextBillion.ai](https://nextbillion.ai) account manager, sales representative or reach out at [support@nextbillion.ai](mailto:support@nextbillion.ai) in case you need additional profiles.]","schema":{"type":"string","default":"`car`","examples":["mode=car"],"enum":["`car","`truck`"],"x-enum-options":[{"value":"`car"},{"value":"`truck`"}]}},{"in":"query","name":"contours_colors","description":"The hex code of the color to fill isochrone contour. When requesting multiple contours, it is recommended to provide color codes for each of the requested contours, separated by a `,`. If no colors are specified, the Isochrone API will assign a random color scheme to the output.","explode":true,"schema":{"type":"string","format":"value_1,value_2,...","examples":["contours_colors=ff0000,bf4040"]}},{"in":"query","name":"polygons","description":"When `true` the contour is returned as a GeoJSON polygon. The contour is returned as a linestring when this parameter is`false`.","schema":{"type":"boolean"}},{"in":"query","name":"denoise","description":"A floating point value from 0.0 to 1.0 that can be used to remove smaller contours. A value of 1.0 will only return the largest contour for a given value. A value of 0.5 drops any contours that are less than half the area of the largest contour in the set of contours for that same value.","schema":{"type":"number","maximum":1,"default":1,"examples":["denoise=0.5"]}},{"in":"query","name":"generalize","description":"A positive floating point value, in meters, used as the tolerance for [Douglas-Peucker generalization](https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm). There is no upper bound. As the generalization value goes higher, more and more straight lines form the resulting contour because of higher approximation of actual contour boundary.\n\nIf no value is specified in the request, the Isochrone API will choose the most optimized generalization to use for the request.\n\nPlease note that the generalization of contours can lead to self-intersections, as well as intersections of adjacent contours.","schema":{"type":"number","examples":["generalize=110.3"]}},{"in":"query","name":"departure_time","description":"Use this parameter to set a departure time, expressed as UNIX epoch timestamp in seconds, for calculating the isochrone contour. The response will consider the typical traffic conditions at the given time and return a contour which can be reached under those traffic conditions.\n\nPlease note that if no input is provided for this parameter then the traffic conditions at the time of making the request are considered.","schema":{"type":"integer","examples":["departure_time=1563254734"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"features":{"type":"array","description":"A [GeoJSON FeatureCollection](https://datatracker.ietf.org/doc/html/rfc7946#section-3.3) object with details of the isochrone contours. Each `feature` object in this collection represents an isochrone.","items":{"type":"object","properties":{"properties":{"type":"object","properties":{"fill":{"description":"The hex code for the fill color of the isochrone contour line.","type":"string"},"fillOpacity":{"type":"number","description":"The fill opacity for the isochrone contour line. It is a float value starting from 0.0 with a max value of 1.0. Higher number indicates a higher fill opacity."},"fillColor":{"description":"The hex code for the fill color of the isochrone contour line","type":"string"},"color":{"description":"The hex code of the color of the isochrone contour line","type":"string"},"contour":{"type":"number","description":"The value of the metric used in this contour. See the `metric` property to determine whether this is a `time` or `distance` contour. When the `metric` is `time` this value denotes the travel time in minutes and when the `metric` is `distance` this value denotes the travel distance in kilometers."},"opacity":{"type":"number","description":"The opacity of the isochrone contour line. It is a float value starting from 0.0 with a max value of 1.0. Higher number indicates a higher line opacity"},"metric":{"description":"The metric that the contour represents - either `distance` or `time`","type":"string"}},"description":"An object with details of how the isochrone contour can be drawn on a map."},"geometry":{"type":"object","properties":{"coordinates":{"type":"array","description":"An array of coordinate points, in [longitude,latitude] format representing the isochrone contour line.","items":{"type":"number"}},"type":{"description":"Type of the geoJSON geometry.","type":"string"}},"description":"A [GeoJSON geometry](https://datatracker.ietf.org/doc/html/rfc7946#page-7) object with details of the contour line."},"type":{"description":"Type of the GeoJSON object. Its value is `Feature` as per the [GeoJSON standard](https://datatracker.ietf.org/doc/html/rfc7946#section-1.4) object.","type":"string"}}}},"type":{"description":"Type of the GeoJSON object. As prescribed in [GeoJSON standard](https://datatracker.ietf.org/doc/html/rfc7946#section-1.4), its value is `FeatureCollection` as the `feature` property contains a list of geoJSON feature objects.","type":"string"}}}}}}},"tags":["Flexi"]}},"/flexi/navigation/json":{"get":{"description":"Nextbillion.ai’s Navigation API is a service that computes a route between 2 places, and also returns detailed turn by turn instructions for the route.\n\nThe Navigation API can be used as an input into your Navigation app. Alternatively, you can directly use Nextbillion.ai’s Navigation SDK for a complete turn by turn navigation experience.","summary":"Navigation Flexible API","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}},{"in":"query","name":"origin","description":"origin
is the starting point of your route. Ensure that the origin
is a routable land location.
Please note that this parameter is mandatory if the original_shape
parameter is not given.
destination
is the ending coordinates of your route. Ensure that the destination
is a routable land location.
Please note that this parameter is mandatory if the original_shape
parameter is not given.
Set which driving mode the service should use to determine a route.
For example, if you use car
, the API will return a route that a car can take. Using truck
will return a route a truck can use, taking into account appropriate truck routing restrictions.
Please note that when using truck
mode the API will assume the following as default truck dimensions:
height: 214 cms
width: 183 cms
length: 519 cms
weight: 5000 kgs
If you want to specify custom truck dimensions, please use truck_weight
and truck_size
parameters.
[Note: Only the car
profile is enabled by default. Please note that customized profiles (including truck
) might not be available for all regions. Please contact your NextBillion.ai account manager, sales representative or reach out at support@nextbillion.ai in case you need additional profiles]
Setting this will ensure the route avoids the object(s) specified as input. Multiple values should be separated by a pipe (|). If none
is provided along with other values, an error is returned as a valid route is not feasible.
This parameter is effective only when route_type=fastest
.
Please note that when this parameter is not provided in the input, ferries are set to be avoided by default. When this parameter is provided, only the mentioned objects are avoided.
","schema":{"type":"string","format":"value_1|value_2|...","default":"`ferry`","examples":["avoid=toll|highway"],"enum":["`toll`","`highway`","`ferry`","`sharp_turn`","`uturn`","`service_road`","`none`"],"x-enum-options":[{"value":"`toll`"},{"value":"`highway`"},{"value":"`ferry`"},{"value":"`sharp_turn`"},{"value":"`uturn`"},{"value":"`service_road`"},{"value":"`none`"}]}},{"in":"query","name":"option","description":"Use this option to switch to truck-specific routing or time based routing or if you want to choose between the fastest and shortest route types.","required":true,"schema":{"type":"string","examples":["option=flexible"],"enum":["`flexible`"],"x-enum-options":[{"value":"`flexible`"}]}},{"in":"query","name":"departure_time","description":"Use this parameter to set a departure time for your trip. The response will return a route based on typical traffic conditions at the given start time. If no input is provided for this parameter then the traffic conditions at the time of making the request are considered\n\nPlease note that when `route_type` is set to `shortest` then the `departure_time` will be ineffective as the service will return the shortest path possible irrespective of the traffic conditions.","schema":{"type":"integer","examples":["departure_time=1563254734"]}},{"in":"query","name":"route_type","description":"Set the route type that needs to be returned.","schema":{"type":"string","default":"`fastest`","examples":["route_type=fastest"],"enum":["`fastest`","`shortest`"],"x-enum-options":[{"value":"`fastest`"},{"value":"`shortest`"}]}},{"in":"query","name":"truck_size","description":"This defines the dimensions of a truck in centimeters (cm). This parameter is effective only when the `mode`=`truck`. Maximum dimensions are as follows: \nHeight = 1000 cm \nWidth = 5000 cm \nLength = 5000 cm","schema":{"type":"string","format":"height,width,length","examples":["truck_size=200,210,600"]}},{"in":"query","name":"truck_weight","description":"This parameter defines the weight of the truck including trailers and shipped goods in kilograms (kg). This parameter is effective only when `mode`=`truck`.","schema":{"type":"integer","minimum":1,"maximum":100000,"examples":["truck_weight=11770"]}},{"in":"query","name":"road_info","description":"Use this parameter to receive segment-wise maximum speed information of the route in the response. `max_speed` is the only allowed value.","schema":{"type":"string","examples":["road_info=max_speed"],"enum":["`max_speed`"],"x-enum-options":[{"value":"`max_speed`"}]}},{"in":"query","name":"original_shape","description":"Takes a route geometry as input and returns the navigation information for that route. Accepts `polyline` and `polyline6` encoded geometry as input. `original_shape_type` becomes mandatory when `original_shape` is used.\n\nIf this parameter is provided, the only other parameters which will be considered are `original_shape_type`, `lang`, `geometry`. The rest of the parameters in the input request will be ignored.\n\nPlease note overview verbosity will always be `full` when using this parameter.","schema":{"type":"string","examples":["original_shape=sbp}_Almgp`FnLuToKmKviB{eDlcGhpFvj@qbAwoA_mA"]}},{"in":"query","name":"original_shape_type","description":"Specify the encoding type of route geometry provided in `original_shape` input. Please note that an error is returned when this parameter is not specified while an input is added to `original_shape` parameter.","schema":{"type":"string","examples":["original_shape_type=polyline"],"enum":["`polyline`","`polyline6`"],"x-enum-options":[{"value":"`polyline`"},{"value":"`polyline6`"}]}},{"in":"query","name":"bearings","description":"Limits the search to segments with given bearing, in degrees, towards true north in clockwise direction.\n\nPlease note that the number of `bearings` should be two more than the number of `waypoints`. This is to account for the bearing of `origin` and `destination`.\n\nEach bearings should be in the format of `degree,range`, where the `degree` should be a value between [0, 360] and `range `should be a value between [0, 180].","schema":{"type":"string","format":"degree0,range0;degree1,range1;...","default":"none","examples":["bearings=0,180;0,180"]}},{"in":"query","name":"hazmat_type","description":"Specify the type of hazardous material being carried and the service will avoid roads which are not suitable for the type of goods specified. Multiple values can be separated using a pipe operator |
.
Please note that this parameter is effective only when mode=truck
.
Specify if crossing an international border is expected. When set to false, the API will place a penalty for crossing an international border through a checkpoint. Consequently, alternative routes will be preferred if they are feasible for the given set of destination
or waypoints
. A higher penalty is placed on a route crossing international border without a checkpoint, hence such routes will be preferred the least.
When set to true, there will be no penalty for crossing an international border.
This feature is available in North America and Singapore region only. Please get in touch with support@nextbillion.ai to enquire/enable other areas.
","schema":{"type":"boolean"}},{"in":"query","name":"truck_axle_load","description":"Specify the total load per axle (including the weight of trailers and shipped goods) of the truck, in tonnes. When used, the service will return routes which are legally allowed to carry the load specified per axle.
Please note this parameter is effective only when `mode=truck`.
","schema":{"type":"number","examples":["5.6"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"description":"A string indicating the state of the response. On normal responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [API Errors Codes](#api-error-codes) section below for more information.","type":"string"},"error_msg":{"description":"An optional error message that may be returned if there was an error while processing the request.","type":"string"},"warning":{"type":"array","description":"warning when facing unexpected behaviour","items":{"type":"string"}},"routes":{"type":"array","description":"An array of objects describing different possible routes from the starting location to the destination. Each object represents one route.","items":{"type":"object","properties":{"geometry":{"description":"Encoded geometry of the returned route in the selected format in `geometry`.","type":"string"},"distance":{"type":"number","description":"The distance, in meters, of the complete trip."},"duration":{"type":"number","description":"The duration, in seconds, of the complete trip."},"start_location":{"type":"object","properties":{"latitude":{"type":"number","description":"Latitude of the`start_location`."},"longitude":{"type":"number","description":"Longitude of the`start_location`."}},"description":"Location coordinates of the point where the route starts."},"end_location":{"type":"object","properties":{"latitude":{"type":"number","description":"Latitude of the `end_location`."},"longitude":{"type":"number","description":"Longitude of the `end_location`."}},"description":"Location coordinates of the point where the route ends."},"legs":{"type":"array","description":"An array of objects returning the details about each `leg` of the route. `waypoints` split the route into legs.","items":{"type":"object","properties":{"distance":{"type":"object","properties":{"value":{"type":"integer"}},"description":"An object containing leg distance value, in meters."},"duration":{"type":"object","properties":{"value":{"type":"integer"}},"description":"An object containing leg duration value, in seocnds."},"start_location":{"type":"object","properties":{"latitude":{"type":"number","description":"Latitude of `start_location` of the `leg`."},"longitude":{"type":"number","description":"Longitude of `start_location` of the `leg`."}},"description":"Location coordinates of the point where the leg starts."},"end_location":{"type":"object","properties":{"latitude":{"type":"number","description":"Latitude of `end_location` of the `leg`."},"longitude":{"type":"number","description":"Longitude of `end_location` of the `leg`."}},"description":"Location coordinates of the point where the leg ends."},"steps":{"type":"array","description":"An array of step objects containing turn-by-turn guidance for easy navigation.","items":{"type":"object","properties":{"geometry":{"description":"Encoded geometry of the `step` in the selected format.","type":"string"},"start_location":{"type":"object","properties":{"latitude":{"type":"number","description":"Latitude of `start_location` of the `step`."},"longitude":{"type":"number","description":"Longitude of `start_location` of the `step`."}},"description":"Location coordinates of the point where the `step` starts."},"end_location":{"type":"object","properties":{"latitude":{"type":"number","description":"Latitude of the `end_location` of the `step`."},"longitude":{"type":"number","description":"Longitude of the `end_location` of the `step`."}},"description":"Location coordinates of the point where the `step` ends."},"distance":{"type":"object","properties":{"value":{"type":"integer"}},"description":"An object containing step distance value, in meters."},"duration":{"type":"object","properties":{"value":{"type":"integer"}},"description":"An object containing step duration value, in seconds."},"maneuver":{"type":"object","properties":{"instruction":{"description":"A text instruction describing the maneuver to be performed. It provides guidance on the action to take at the maneuver location, such as \"Turn left,\" \"Go straight,\" \"Exit the roundabout,\" etc.","type":"string"},"voice_instruction":{"type":"array","description":"An array of voice instruction objects associated with the `maneuver`. Each object provides additional details about the voice instruction, including the distance along the geometry where the instruction applies, the instruction text, and the unit of measurement.","items":{"type":"object","properties":{"distance_along_geometry":{"type":"integer","description":"The distance value at which the `instruction` would be triggered when trip is in-progress."},"instruction":{"description":"The guidance instructions for the upcoming `maneuver`","type":"string"},"unit":{"description":"Unit of the `distance_along_geometry` metric","type":"string"}}}},"bearing_before":{"type":"number","description":"The clockwise angle from true north to the direction of travel immediately before the `maneuver`. Range of values is between 0-359."},"bearing_after":{"type":"number","description":"The clockwise angle from true north to the direction of travel immediately after the `maneuver`. Range of values is between 0-359."},"coordinate":{"type":"object","properties":{"latitude":{"type":"number","description":"The latitude coordinate of the `maneuver`."},"longitude":{"type":"number","description":"The longitude coordinate of the `maneuver`."},"name":{"description":"The name or description of the maneuver location.","type":"string"}},"description":"A coordinate pair describing the location of the `maneuver`."},"maneuver_type":{"description":"A string indicating the type of `maneuver`.","type":"string","examples":["`turn`","`depart`","`continue`"]}},"description":"An object with maneuver details for the `step`."},"name":{"description":"The name of the `step`.","type":"string"},"intersections":{"type":"array","description":"An array of objects representing intersections (or cross-way) that the route passes by along the `step`. For every `step`, the very first `intersection` corresponds to the location of the `maneuver`. All intersections until the next `maneuver` are listed in this object.","items":{"type":"object","properties":{"location":{"type":"object","properties":{"latitude":{"type":"number","description":"The latitude coordinate of the `intersection`."},"longitude":{"type":"number","description":"The longitude coordinate of the `intersection`."},"name":{"description":"The name or description of the `intersection`.","type":"string"}},"description":"A [longitude, latitude] pair describing the location of the intersection."},"bearings":{"type":"array","description":"A list of bearing values (e.g. [0,90,180,270]) that are available at the intersection. The `bearings` describe all available roads at the intersection.","items":{"type":"integer"}},"classes":{"type":"array","description":"An array of strings representing the classes or types of roads or paths at the intersection. The classes can indicate the road hierarchy, such as a motorway, primary road, secondary road, etc.","items":{"type":"string"}},"entry":{"type":"array","description":"A value of `true` indicates that the respective road could be entered on a valid route. `false` indicates that the turn onto the respective road would violate a restriction. Each entry value corresponds to the bearing angle at the same index.","items":{"type":"boolean"}},"intersection_in":{"type":"integer","description":"The number of incoming roads or paths at the `intersection`."},"intesection_out":{"type":"integer","description":"The number of outgoing roads or paths from the `intersection`."},"lanes":{"type":"array","description":"An array of lane objects representing the lanes available at the intersection. If no lane information is available for an `intersection`, the `lanes` property will not be present.","items":{"type":"object","properties":{"indications":{"type":"array","description":"It represents actions associated with the lane. These indications describe the permitted maneuvers or directions that can be taken from the lane. Common indications include \"turn left,\" \"turn right,\" \"go straight,\" \"merge,\" \"exit,\" etc.","items":{"type":"string"}},"valid":{"type":"boolean","description":"This indicates the validity of the lane. It specifies whether the lane is considered valid for making the indicated maneuver or if there are any restrictions or limitations associated with it."}}}}}}},"reference":{"description":"A reference for the `step`.","type":"string"},"road_shield_type":{"type":"object","properties":{"label":{"description":"A label identifying the inscription on the road shield, such as containing the road number.","type":"string"},"image_url":{"description":"The URL to fetch the road shield image.","type":"string"}},"description":"An object containing road shield information."}}}}}}},"road_info":{"type":"object","properties":{"max_speed":{"type":"array","description":"An array of objects containing maximum speed, in kilometres per hour, for each segment of the route. Each object represents one road segment.","items":{"type":"object","properties":{"offset":{"type":"integer","description":"`offset` is the index value of the vertex of route geometry, which is the starting point of the segment."},"length":{"type":"integer","description":"`length` refers to a sequence of 'n' consecutive vertices in the route geometry starting from the `offset`, forming a continuous section of route where the maximum speed is same and is indicated in `value`."},"value":{"type":"number","description":"`value` denotes the maximum speed of this segment, in kilometers per hour. \n- A value of \"-1\" indicates that the speed is unlimited for this road segment.\n- A value of \"0\" indicates that there is no information about the maximum speed for this road segment."}}}}},"description":"An object containing the maximum speed information for each road segment present in the route."}}}},"country_code":{"description":"Country code of the region where the route is generated. ISO alpha-2 codes, as described in the ISO 3166 international standard, are used for denoting a country.","type":"string"}}}}}}},"tags":["Flexi"]}},"/flexi/route_report":{"post":{"summary":"Route Report","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}},{"in":"query","name":"option","description":"Set this option to flexible to enable route report service.
","required":true,"schema":{"type":"string","examples":["option=flexible"],"enum":["`flexible`"],"x-enum-options":[{"value":"`flexible`"}]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"original_shape":{"description":"Takes a route geometry as input and returns the route details. Accepts `polyline` and `polyline6` encoded geometry as input.","type":"string","examples":["original_shape=sbp}_Almgp`FnLuToKmKviB{eDlcGhpFvj@qbAwoA_mA"]},"original_shape_type":{"description":"Specify the encoding type of route geometry provided in `original_shape` input. Please note that an error is returned when this parameter is not specified while an input is added to `original_shape` parameter.","type":"string","examples":["\"original_shape_type\": \"polyline\""],"enum":["`polyline`","`polyline6`"],"x-enum-options":[{"value":"`polyline`"},{"value":"`polyline6`"}]}},"required":["original_shape","original_shape_type"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"description":"A string indicating the state of the response. On normal responses, the value will be `Ok`. Indicative error messages are returned for different errors. See the [**API Errors Codes**](https://app.reapi.com/ws/hmx8aL45B5jjrJa8/p/vNNilNksLVz675pI/s/ealJmVGjTQv4x5Wi/edit/path/VYzo7gOlRsQQZo0U#api-error-codes) section below for more information.","type":"string"},"geometry":{"description":"Encoded geometry of the route. This value is as per the geometry provided in the input request.","type":"string"},"mileage":{"type":"object","properties":{"summary":{"type":"object","properties":{"state":{"type":"object","properties":{},"description":"A break up of state-wise distances that the route covers specified in `key:value` pair format."},"country":{"type":"object","properties":{},"description":"A break up of country-wise distances that the route covers in `key:value` pair format."}},"description":"Returns a summary of distances that the route covers in different states and countries."},"segment":{"type":"object","properties":{"state":{"type":"array","description":"An array of objects containing state-wise break up of the route segments. Each object returns the segment details of a different state.","items":{"type":"object","properties":{"offset":{"type":"integer","description":"Represents the index value of the vertex of current segment's starting point in route geometry. First vertex in the route geometry has an offset of 0."},"length":{"type":"integer","description":"Represents a sequence of ‘n’ consecutive vertices in the route geometry starting from the `offset`, forming a continuous section of route with a distance indicated in `distance`field."},"distance":{"type":"number","description":"Represents the real distance of this segment, in meters."},"value":{"description":"Returns the name of the state in which the segment lies.","type":"string"}}}},"country":{"type":"array","description":"An array of objects containing country-wise break up of the route segments. Each object returns the segment details of a different country.","items":{"type":"object","properties":{"offset":{"type":"integer","description":"Represents the index value of the vertex of current segment's starting point in route geometry. First vertex in the route geometry has an offset of 0."},"length":{"type":"integer","description":"Represents a sequence of ‘n’ consecutive vertices in the route geometry starting from the `offset`, forming a continuous section of route with a distance indicated in `distance`field."},"distance":{"type":"number","description":"Represents the total distance of this segment, in meters."},"value":{"description":"Returns the name of the country in which the segment lies.","type":"string"}}}}},"description":"Returns the details of road segments that the route covers in different states and countries."}},"description":"Returns the details of route segments in each state or country that the route passes through."},"road_summary":{"type":"object","properties":{"summary":{"type":"object","properties":{"has_toll":{"description":"A boolean value indicating if there are any tolls in the given route.","type":"string"},"has_bridge":{"description":"A boolean value indicating if there are any bridges in the given route.","type":"string"},"has_roundabout":{"description":"A boolean value indicating if there are any roundabouts in the given route.","type":"string"},"has_tunnel":{"description":"A boolean value indicating if there are any tunnels in the given route.","type":"string"},"duration":{"type":"number","description":"Returns the total duration of the route, in seconds."},"distance":{"type":"number","description":"Returns the total distance of the route , in meters."},"road_class":{"type":"object","properties":{},"description":"An object with details about the different types of road classes that the route goes through. Distance traversed on a given road class is also returned. The contents of this object follow the `key:value` pair format."}},"description":"Returns an overview of the route with information about trip distance, duration and road class details among others."},"segment":{"type":"object","properties":{"road_class":{"type":"array","description":"Returns the details of road segments belonging to different road classes that the route goes through. Each object refers to a unique road class.","items":{"type":"object","properties":{"offset":{"type":"integer","description":"Represents the index value of the vertex of current segment's starting point in route geometry. First vertex in the route geometry has an offset of 0."},"length":{"type":"integer","description":"Represents a sequence of ‘n’ consecutive vertices in the route geometry starting from the `offset`, forming a continuous section of route with a distance indicated in `distance`field."},"distance":{"type":"number","description":"Returns the total distance of this segment, in meters."},"value":{"description":"Returns the road class name to which the segment belongs.","type":"string"}}}},"max_speed":{"type":"object","properties":{"offset":{"type":"integer","description":"Represents the index value of the vertex of current segment's starting point in route geometry. First vertex in the route geometry has an offset of 0."},"length":{"type":"integer","description":"Represents a sequence of ‘n’ consecutive vertices in the route geometry starting from the `offset`, forming a continuous section of route where the maximum speed is same and is indicated in `value`."},"distance":{"type":"number","description":"Returns the total distance of this segment, in meters."},"value":{"type":"number","description":"Denotes the maximum speed of this segment, in kilometers per hour. - A value of “-1” indicates that the speed is unlimited for this road segment. - A value of “0” indicates that there is no information about the maximum speed for this road segment."}},"description":"Returns the maximum speed of different segments that the route goes through."}},"description":"Returns the segment-wise road class and max speed information of the route."}},"description":"Returns a summary of the route with information about tolls, bridges, tunnels, segments, maximum speeds and more."}}}}}}},"tags":["Flexi"]}},"/flexi/directions/json":{"get":{"description":"The default maximum limit is 50 for GET requests.","summary":"Directions Flexible API","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}},{"in":"query","name":"origin","description":"`origin` is the starting point of your route. Ensure that the `origin` is a routable land location.","required":true,"schema":{"type":"string","format":"latitude,longitude","examples":["origin=41.349302,2.136480"]}},{"in":"query","name":"destination","description":"`destination` is the ending coordinates of your route. Ensure that the `destination` is a routable land location.","required":true,"schema":{"type":"string","format":"latitude,longitude","examples":["destination=41.349302,2.136480"]}},{"in":"query","name":"waypoints","description":"waypoints
are coordinates along the route between the origin
and destination
. It is a pipe-separated list of coordinate pairs. Please note that the route returned will arrive at the waypoints
in the sequence they are provided in the input request.
The maximum number of `waypoints` that can be added in a single request is 50.
","explode":true,"schema":{"type":"string","format":"latitude_1,longitude_1|latitude_2,longitude_2|...","examples":["waypoints=41.349302,2.136480|41.349303,2.136481|41.349304,2.136482"]}},{"in":"query","name":"mode","description":"Set which driving mode the service should use to determine a route.
For example, if you use car
, the API will return a route that a car can take. Using truck
will return a route a truck can use, taking into account appropriate truck routing restrictions.
Please note that when using truck
mode the API will assume the following as default truck dimensions:
height: 214 cms
width: 183 cms
length: 519 cms
weight: 5000 kgs
If you want to specify custom truck dimensions, please use truck_weight
and truck_size
parameters.
[Note: Only the car
profile is enabled by default. Please note that customized profiles (including truck
) might not be available for all regions. Please contact your NextBillion.ai account manager, sales representative or reach out at support@nextbillion.ai in case you need additional profiles]
Setting this will ensure the route avoids the object(s) specified as input. Multiple values should be separated by a pipe (|). If none
is provided along with other values, an error is returned as a valid route is not feasible.
This parameter is effective only when route_type=fastest
.
Please note that when this parameter is not provided in the input, ferries are set to be avoided by default. When this parameter is provided, only the mentioned objects are avoided.
","schema":{"type":"string","format":"value_1|value_2|...","default":"`ferry`","examples":["avoid=toll|highway"],"enum":["`toll`","`highway`","`ferry`","`sharp_turn`","`uturn`","`service_road`","`none`"],"x-enum-options":[{"value":"`toll`"},{"value":"`highway`"},{"value":"`ferry`"},{"value":"`sharp_turn`"},{"value":"`uturn`"},{"value":"`service_road`"},{"value":"`none`"}]}},{"in":"query","name":"approaches","description":"A semicolon-separated list indicating the side of the road from which to approach `waypoints` in a requested route. \n\nWhen set to `unrestricted` a route can arrive at the waypoint from either side of the road and when set to `curb` the route will arrive at the waypoint on the driving side of the region.\n\nPlease note the number of values provided must be one more than the number of `waypoints`. The last value of `approaches` will determine the approach for the `destination`. However, you can skip a coordinate and show its position in the list with the `;` separator.","schema":{"type":"string","format":"approaches_1;approaches_2;approaches_3;...","default":"`unrestricted`","examples":["approaches=unrestricted;curb;;unrestricted"],"enum":["`unrestricted`","`curb`"],"x-enum-options":[{"value":"`unrestricted`"},{"value":"`curb`"}]}},{"in":"query","name":"option","description":"Use this option to switch to truck-specific routing or time based routing or if you want to choose between the fastest and shortest route types.","required":true,"schema":{"type":"string","examples":["option=flexible"],"enum":["`flexible`"],"x-enum-options":[{"value":"`flexible`"}]}},{"in":"query","name":"departure_time","description":"Use this parameter to set a departure time, expressed as UNIX epoch timestamp in seconds, for calculating the isochrone contour. The response will consider the typical traffic conditions at the given time and return a contour which can be reached under those traffic conditions.\n\nPlease note that if no input is provided for this parameter then the traffic conditions at the time of making the request are considered.","schema":{"type":"integer","examples":["departure_time=1563254734"]}},{"in":"query","name":"truck_size","description":"This defines the dimensions of a truck in centimeters (cm). This parameter is effective only when the `mode`=`truck`. Maximum dimensions are as follows: \nHeight = 1000 cm \nWidth = 5000 cm \nLength = 5000 cm","schema":{"type":"string","format":"height,width,length","examples":["truck_size=200,210,600"]}},{"in":"query","name":"truck_weight","description":"This parameter defines the weight of the truck including trailers and shipped goods in kilograms (kg). This parameter is effective only when `mode`=`truck`.","schema":{"type":"integer","minimum":1,"maximum":100000,"examples":["truck_weight=11770"]}},{"in":"query","name":"route_type","description":"Set the route type that needs to be returned.","schema":{"type":"string","default":"`fastest`","examples":["route_type=fastest"],"enum":["`fastest`","`shortest`"],"x-enum-options":[{"value":"`fastest`"},{"value":"`shortest`"}]}},{"in":"query","name":"altcount","description":"Sets the number of alternative routes to return.\nIt is effective only when `alternatives` is `true`.\n\nPlease note that adding alternative route count does not guarantee matching number of routes to be returned if potential alternative routes do not exist.","schema":{"type":"integer","minimum":1,"maximum":3,"examples":["altcount=3"],"default":3}},{"in":"query","name":"alternatives","description":"When `true` the API will return alternate routes.\n\nThe `alternatives` is effective only when there are no `waypoints` included in the request and the `route_type` is set to `shortest`.\n\nYou can set the number of alternate routes to be returned in the `altcount` property.","schema":{"type":"boolean"}},{"in":"query","name":"road_info","description":"Use this parameter to receive segment-wise maximum speed information of the route in the response. `max_speed` is the only allowed value.","schema":{"type":"string","examples":["road_info=max_speed"],"enum":["`max_speed`"],"x-enum-options":[{"value":"`max_speed`"}]}},{"in":"query","name":"cross_border","description":"Specify if crossing an international border is expected. When set to false, the API will place a penalty for crossing an international border through a checkpoint. Consequently, alternative routes will be preferred if they are feasible for the given set of destination
or waypoints
. A higher penalty is placed on a route crossing international border without a checkpoint, hence such routes will be preferred the least.
When set to true, there will be no penalty for crossing an international border.
This feature is available in North America and Singapore region only. Please get in touch with support@nextbillion.ai to enquire/enable other areas.
","schema":{"type":"boolean"}},{"in":"query","name":"truck_axle_load","description":"Specify the total load per axle (including the weight of trailers and shipped goods) of the truck, in tonnes. When used, the service will return routes which are legally allowed to carry the load specified per axle.
Please note this parameter is effective only when `mode=truck`.
","schema":{"type":"number","examples":["5.6"]}},{"in":"query","name":"hazmat_type","description":"Specify the type of hazardous material being carried and the service will avoid roads which are not suitable for the type of goods specified. Multiple values can be separated using a pipe operator |
.
Please note that this parameter is effective only when mode=truck
.
Setting this will ensure the route avoids ferries, tolls, highways or nothing. Multiple values should be separated by a pipe (|). If none
is provided along with other values, an error is returned as a valid route is not feasible.
This parameter is effective only when route_type=fastest
.
Please note that when this parameter is not provided in the input, ferries are set to be avoided by default. When this parameter is provided, only the mentioned objects are avoided.
","schema":{"type":"string","format":"value_1|value_2|...","default":"`ferry`","examples":["avoid=toll|highway"],"enum":["`toll`","`ferry`","`highway`","`service_road`","`none`"],"x-enum-options":[{"value":"`toll`"},{"value":"`ferry`"},{"value":"`highway`"},{"value":"`service_road`"},{"value":"`none`"}]}},{"in":"query","name":"approaches","description":"A semicolon-separated list indicating the side of the road from which the route will approach `destinations`. \n\nWhen set to `unrestricted` a route can arrive at a destination from either side of the road.\nWhen set to `curb` the route will arrive at a destination on the driving side of the region.\n\nPlease note the number of values provided must be equal to the number of `destinations`. However, you can skip a coordinate and show its position in the list with the `;` separator.\n\nThe values provided for the `approaches` parameter are effective for the `destinations` value at the same index. Example: `curb`;;`curb` will apply curbside restriction on the `destinations` points provided at the first and third index.","explode":true,"schema":{"type":"string","format":"approaches_1;approaches_2;approaches_3;...","default":"`unrestricted`","examples":["approaches=unrestricted;curb;;unrestricted"],"enum":["`unrestricted`","`curb`"],"x-enum-options":[{"value":"`unrestricted`"},{"value":"`curb`"}]}},{"in":"query","name":"option","description":"Use this option to switch to truck-specific routing or time based routing or if you want to choose between the fastest and shortest route types.","required":true,"schema":{"type":"string","examples":["option=flexible"],"enum":["`flexible`"],"x-enum-options":[{"value":"`flexible`"}]}},{"in":"query","name":"departure_time","description":"Use this parameter to set a departure time for your trip. The response will return a route based on typical traffic conditions at the given start time. If no input is provided for this parameter then the traffic conditions at the time of making the request are considered\n\nPlease note that when `route_type` is set to `shortest` then the `departure_time` will be ineffective as the service will return the shortest path possible irrespective of the traffic conditions.","schema":{"type":"integer","examples":["departure_time=1563254734"]}},{"in":"query","name":"truck_size","description":"This defines the dimensions of a truck in centimeters (cm). This parameter is effective only when the `mode`=`truck`. Maximum dimensions are as follows: \nHeight = 1000 cm \nWidth = 5000 cm \nLength = 5000 cm","schema":{"type":"string","format":"height,width,length","examples":["truck_size=200,210,600"]}},{"in":"query","name":"truck_weight","description":"This parameter defines the weight of the truck including trailers and shipped goods in kilograms (kg). This parameter is effective only when `mode`=`truck`.","schema":{"type":"integer","minimum":1,"maximum":100000,"examples":["truck_weight=11770"]}},{"in":"query","name":"route_type","description":"Set the route type that needs to be returned.","schema":{"type":"string","default":"`fastest`","examples":["route_type=fastest"],"enum":["`fastest`","`shortest`"],"x-enum-options":[{"value":"`fastest`"},{"value":"`shortest`"}]}},{"in":"query","name":"cross_border","description":"Specify if crossing an international border is expected. When set to false, the API will place a penalty for crossing an international border through a checkpoint. Consequently, alternative routes will be preferred if they are feasible for the given set of destination
or waypoints
. A higher penalty is placed on a route crossing international border without a checkpoint, hence such routes will be preferred the least.
When set to true, there will be no penalty for crossing an international border.
This feature is available in North America and Singapore region only. Please get in touch with support@nextbillion.ai to enquire/enable other areas.
","schema":{"type":"boolean"}},{"in":"query","name":"truck_axle_load","description":"Specify the total load per axle (including the weight of trailers and shipped goods) of the truck, in tonnes. When used, the service will return routes which are legally allowed to carry the load specified per axle.
Please note this parameter is effective only when `mode=truck`.
","schema":{"type":"number","examples":["5.6"]}},{"in":"query","name":"hazmat_type","description":"Specify the type of hazardous material being carried and the service will avoid roads which are not suitable for the type of goods specified. Multiple values can be separated using a pipe operator |
.
Please note that this parameter is effective only when mode=truck
.
A key is a unique identifier that is required to authenticate a request to the API.
","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}},{"in":"query","name":"at","description":"Specify the center of the search context expressed as coordinates.
Please note that one of \"at\", \"in=circle\" or \"in=bbox\" should be provided for relevant results.
","schema":{"type":"string","format":"latitude,longitude","examples":["at=52.5308,13.3856"]}},{"in":"query","name":"categories","description":"This is a category filter consisting of a comma-separated list of categories. Places with any assigned categories that match any of the requested categories are included in the response.
","schema":{"type":"string","examples":["categories: schools"]}},{"in":"query","name":"in","description":"Search within a geographic area. This is a hard filter. Results will be returned if they are located within the specified area.
A geographic area can be
a country (or multiple countries), provided as comma-separated ISO 3166-1 alpha-3 country codes
The country codes are to be provided in all uppercase.
Format: countryCode:{countryCode}[,{countryCode}]
a circular area, provided as latitude, longitude, and radius (an integer with meters as unit)
Format: circle:{latitude},{longitude};r={radius}
a bounding box, provided as west longitude, south latitude, east longitude, north latitude
Format: bbox:{west longitude},{south latitude},{east longitude},{north latitude}
Please provide one of 'at', 'in=circle' or 'in=bbox' input for a relevant result.
","schema":{"type":"string","examples":["in=countryCode:CAN,MEX,USA","in=circle:52.53,13.38;r=10000","in=bbox:13.08836,52.33812,13.761,52.6755"]}},{"in":"query","name":"limit","description":"Maximum number of results to be returned.
","schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"in":"query","name":"lang","description":"Select the language to be used for result rendering from a list of BCP 47 compliant language codes.
","schema":{"type":"string","examples":["lang=en"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","description":"The results are presented as a JSON list of candidates in ranked order (most-likely to least-likely) based on the matched location criteria.","items":{"type":"object","properties":{"title":{"description":"The localized display name of this result item.","type":"string"},"id":{"description":"The unique identifier for the result item.","type":"string"},"address":{"type":"object","properties":{"label":{"description":"Assembled address value built out of the address components according to the regional postal rules. These are the same rules for all endpoints. It may not include all the input terms.","type":"string"},"countryCode":{"description":"A three-letter country code.","type":"string"},"countryName":{"description":"The localised country name.","type":"string"},"stateCode":{"description":"A country specific state code or state name abbreviation. For example, in the United States it is the two letter state abbreviation: \"CA\" for California.","type":"string"},"state":{"description":"The state division of a country.","type":"string"},"county":{"description":"A division of a state; typically, a secondary-level administrative division of a country or equivalent.","type":"string"},"city":{"description":"The name of the primary locality of the place.","type":"string"},"district":{"description":"A division of city; typically an administrative unit within a larger city or a customary name of a city's neighborhood.","type":"string"},"street":{"description":"Name of street of the returned place, if available.","type":"string"},"postalCode":{"description":"An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code.","type":"string"},"houseNumber":{"description":"House number of the returned place, if available.","type":"string"}},"description":"Postal address of the result item."},"scoring":{"type":"object","properties":{"queryScore":{"type":"number","description":"A score, out of 1, indicating how closely the result matches with the provided query `q` ."},"fieldScore":{"type":"object","properties":{},"description":"A breakdown of how closely individual field of the result matched with the provided query `q`."}},"description":"Score of the result. A higher score indicates a closer match."},"position":{"type":"object","properties":{"lat":{"type":"number","description":"The latitude of the searched place."},"lng":{"type":"number","description":"The longitude of the searched place."}},"description":"Returns the location coordinates of the result."},"access":{"type":"array","description":"An array returning the location coordinates of all the access points of the search result.","items":{"type":"object","properties":{"lat":{"type":"number","description":"The latitude of the access point of the search result."},"lng":{"type":"number","description":"The longitude of the access point of the search result."}}}},"distance":{"type":"integer","description":"The distance \"as the crow flies\" from the search center to this result item in meters."},"mapView":{"type":"object","properties":{"west":{"type":"number","description":"Longitude of the western-side of the box."},"south":{"type":"number","description":"Longitude of the southern-side of the box."},"east":{"type":"number","description":"Longitude of the eastern-side of the box."},"north":{"type":"number","description":"Longitude of the northern-side of the box."}},"description":"The bounding box enclosing the geometric shape (area or line) that an individual result covers. `place` typed results have no `mapView`."},"categories":{"type":"array","description":"The list of categories assigned to this place.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category.","type":"string"},"name":{"description":"Name of the place category in the result item language.","type":"string"},"primary":{"type":"boolean","description":"Whether or not it is a primary category. This field is visible only when the value is 'true'."}}}},"contacts":{"type":"array","description":"Contact information like phone, email or website.","items":{"type":"object","properties":{"phone":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"mobile":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"tollFree":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"fax":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"www":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"email":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}}}}}}}}}}}}}},"tags":["places API"]}},"/places/discover":{"get":{"summary":"Discover matching places","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.
","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}},{"in":"query","name":"q","description":"Specify the free-text search query.
Please note that whitespace, urls, email addresses, or other out-of-scope queries will yield no results.
","required":true,"schema":{"type":"string","examples":["q=125, Berliner, berlin","q=Beacon, Boston, Hospital"]}},{"in":"query","name":"at","description":"Specify the center of the search context expressed as coordinates.
Please note that one of \"at\", \"in=circle\" or \"in=bbox\" should be provided for relevant results.
","schema":{"type":"string","format":"latitude,longitude","examples":["at=52.5308,13.3856"]}},{"in":"query","name":"in","description":"Search within a geographic area. This is a hard filter. Results will be returned if they are located within the specified area.
A geographic area can be
a country (or multiple countries), provided as comma-separated ISO 3166-1 alpha-3 country codes
The country codes are to be provided in all uppercase.
Format: countryCode:{countryCode}[,{countryCode}]
a circular area, provided as latitude, longitude, and radius (an integer with meters as unit)
Format: circle:{latitude},{longitude};r={radius}
a bounding box, provided as west longitude, south latitude, east longitude, north latitude
Format: bbox:{west longitude},{south latitude},{east longitude},{north latitude}
Please provide one of 'at', 'in=circle' or 'in=bbox' input for a relevant result.
","schema":{"type":"string","examples":["in=countryCode:CAN,MEX,USA","in=circle:52.53,13.38;r=10000","in=bbox:13.08836,52.33812,13.761,52.6755"]}},{"in":"query","name":"limit","description":"Maximum number of results to be returned.
","schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"in":"query","name":"lang","description":"Select the language to be used for result rendering from a list of BCP 47 compliant language codes.
","schema":{"type":"string","examples":["lang=en"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","description":"The results are presented as a JSON list of candidates in ranked order (most-likely to least-likely) based on the matched location criteria.","items":{"type":"object","properties":{"title":{"description":"The localized display name of this result item.","type":"string"},"id":{"description":"The unique identifier for the result item.","type":"string"},"address":{"type":"object","properties":{"label":{"description":"Assembled address value built out of the address components according to the regional postal rules. These are the same rules for all endpoints. It may not include all the input terms.","type":"string"},"countryCode":{"description":"A three-letter country code.","type":"string"},"countryName":{"description":"The localised country name.","type":"string"},"stateCode":{"description":"A country specific state code or state name abbreviation. For example, in the United States it is the two letter state abbreviation: \"CA\" for California.","type":"string"},"state":{"description":"The state division of a country.","type":"string"},"county":{"description":"A division of a state; typically, a secondary-level administrative division of a country or equivalent.","type":"string"},"city":{"description":"The name of the primary locality of the place.","type":"string"},"district":{"description":"A division of city; typically an administrative unit within a larger city or a customary name of a city's neighborhood.","type":"string"},"street":{"description":"Name of street of the returned place, if available.","type":"string"},"postalCode":{"description":"An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code.","type":"string"},"houseNumber":{"description":"House number of the returned place, if available.","type":"string"}},"description":"Postal address of the result item."},"scoring":{"type":"object","properties":{"queryScore":{"type":"number","description":"A score, out of 1, indicating how closely the result matches with the provided query `q` ."},"fieldScore":{"type":"object","properties":{},"description":"A breakdown of how closely individual field of the result matched with the provided query `q`."}},"description":"Score of the result. A higher score indicates a closer match."},"position":{"type":"object","properties":{"lat":{"type":"number","description":"The latitude of the searched place."},"lng":{"type":"number","description":"The longitude of the searched place."}},"description":"Returns the location coordinates of the result."},"access":{"type":"array","description":"An array returning the location coordinates of all the access points of the search result.","items":{"type":"object","properties":{"lat":{"type":"number","description":"The latitude of the access point of the search result."},"lng":{"type":"number","description":"The longitude of the access point of the search result."}}}},"distance":{"type":"integer","description":"The distance \"as the crow flies\" from the search center to this result item in meters."},"mapView":{"type":"object","properties":{"west":{"type":"number","description":"Longitude of the western-side of the box."},"south":{"type":"number","description":"Longitude of the southern-side of the box."},"east":{"type":"number","description":"Longitude of the eastern-side of the box."},"north":{"type":"number","description":"Longitude of the northern-side of the box."}},"description":"The bounding box enclosing the geometric shape (area or line) that an individual result covers. `place` typed results have no `mapView`."},"categories":{"type":"array","description":"The list of categories assigned to this place.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category.","type":"string"},"name":{"description":"Name of the place category in the result item language.","type":"string"},"primary":{"type":"boolean","description":"Whether or not it is a primary category. This field is visible only when the value is 'true'."}}}},"contacts":{"type":"array","description":"Contact information like phone, email or website.","items":{"type":"object","properties":{"phone":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"mobile":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"tollFree":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"fax":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"www":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"email":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}}}}}}}}}}}}}},"tags":["places API"]}},"/places/autosuggest":{"get":{"summary":"Autosuggest","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.
","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}},{"in":"query","name":"q","description":"Specify the free-text search query.
Please note that whitespace, urls, email addresses, or other out-of-scope queries will yield no results.
","required":true,"schema":{"type":"string","examples":["q=125, Berliner, berlin","q=Beacon, Boston, Hospital"]}},{"in":"query","name":"at","description":"Specify the center of the search context expressed as coordinates.
Please note that one of \"at\", \"in=circle\" or \"in=bbox\" should be provided for relevant results.
","schema":{"type":"string","format":"latitude,longitude","examples":["at=52.5308,13.3856"]}},{"in":"query","name":"in","description":"Search within a geographic area. This is a hard filter. Results will be returned if they are located within the specified area.
A geographic area can be
a country (or multiple countries), provided as comma-separated ISO 3166-1 alpha-3 country codes
The country codes are to be provided in all uppercase.
Format: countryCode:{countryCode}[,{countryCode}]
a circular area, provided as latitude, longitude, and radius (an integer with meters as unit)
Format: circle:{latitude},{longitude};r={radius}
a bounding box, provided as west longitude, south latitude, east longitude, north latitude
Format: bbox:{west longitude},{south latitude},{east longitude},{north latitude}
Please provide one of 'at', 'in=circle' or 'in=bbox' input for a relevant result.
","schema":{"type":"string","examples":["in=countryCode:CAN,MEX,USA","in=circle:52.53,13.38;r=10000","in=bbox:13.08836,52.33812,13.761,52.6755"]}},{"in":"query","name":"limit","description":"Maximum number of results to be returned.
","schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"in":"query","name":"lang","description":"Select the language to be used for result rendering from a list of BCP 47 compliant language codes.
","schema":{"type":"string","examples":["lang=en"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","description":"The results are presented as a JSON list of candidates in ranked order (most-likely to least-likely) based on the matched location criteria.","items":{"type":"object","properties":{"title":{"description":"The localized display name of this result item.","type":"string"},"id":{"description":"The unique identifier for the result item.","type":"string"},"address":{"type":"object","properties":{"label":{"description":"Assembled address value built out of the address components according to the regional postal rules. These are the same rules for all endpoints. It may not include all the input terms.","type":"string"},"countryCode":{"description":"A three-letter country code.","type":"string"},"countryName":{"description":"The localised country name.","type":"string"},"stateCode":{"description":"A country specific state code or state name abbreviation. For example, in the United States it is the two letter state abbreviation: \"CA\" for California.","type":"string"},"state":{"description":"The state division of a country.","type":"string"},"county":{"description":"A division of a state; typically, a secondary-level administrative division of a country or equivalent.","type":"string"},"city":{"description":"The name of the primary locality of the place.","type":"string"},"district":{"description":"A division of city; typically an administrative unit within a larger city or a customary name of a city's neighborhood.","type":"string"},"street":{"description":"Name of street of the returned place, if available.","type":"string"},"postalCode":{"description":"An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code.","type":"string"},"houseNumber":{"description":"House number of the returned place, if available.","type":"string"}},"description":"Postal address of the result item."},"scoring":{"type":"object","properties":{"queryScore":{"type":"number","description":"A score, out of 1, indicating how closely the result matches with the provided query `q` ."},"fieldScore":{"type":"object","properties":{},"description":"A breakdown of how closely individual field of the result matched with the provided query `q`."}},"description":"Score of the result. A higher score indicates a closer match."},"position":{"type":"object","properties":{"lat":{"type":"number","description":"The latitude of the searched place."},"lng":{"type":"number","description":"The longitude of the searched place."}},"description":"Returns the location coordinates of the result."},"access":{"type":"array","description":"An array returning the location coordinates of all the access points of the search result.","items":{"type":"object","properties":{"lat":{"type":"number","description":"The latitude of the access point of the search result."},"lng":{"type":"number","description":"The longitude of the access point of the search result."}}}},"distance":{"type":"integer","description":"The distance \"as the crow flies\" from the search center to this result item in meters."},"mapView":{"type":"object","properties":{"west":{"type":"number","description":"Longitude of the western-side of the box."},"south":{"type":"number","description":"Longitude of the southern-side of the box."},"east":{"type":"number","description":"Longitude of the eastern-side of the box."},"north":{"type":"number","description":"Longitude of the northern-side of the box."}},"description":"The bounding box enclosing the geometric shape (area or line) that an individual result covers. `place` typed results have no `mapView`."},"categories":{"type":"array","description":"The list of categories assigned to this place.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category.","type":"string"},"name":{"description":"Name of the place category in the result item language.","type":"string"},"primary":{"type":"boolean","description":"Whether or not it is a primary category. This field is visible only when the value is 'true'."}}}},"contacts":{"type":"array","description":"Contact information like phone, email or website.","items":{"type":"object","properties":{"phone":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"mobile":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"tollFree":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"fax":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"www":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"email":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}}}}}}}}}}}}}},"tags":["places API"]}},"/places/geocode":{"get":{"summary":"Geocode","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.
","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}},{"in":"query","name":"q","description":"Specify the free-text search query.
Please note that whitespace, urls, email addresses, or other out-of-scope queries will yield no results.
","required":true,"schema":{"type":"string","examples":["q=125, Berliner, berlin","q=Beacon, Boston, Hospital"]}},{"in":"query","name":"at","description":"Specify the center of the search context expressed as coordinates.
Please note that one of \"at\", \"in=circle\" or \"in=bbox\" should be provided for relevant results.
","schema":{"type":"string","format":"latitude,longitude","examples":["at=52.5308,13.3856"]}},{"in":"query","name":"in","description":"Search within a geographic area. This is a hard filter. Results will be returned if they are located within the specified area.
A geographic area can be
a country (or multiple countries), provided as comma-separated ISO 3166-1 alpha-3 country codes
The country codes are to be provided in all uppercase.
Format: countryCode:{countryCode}[,{countryCode}]
a circular area, provided as latitude, longitude, and radius (an integer with meters as unit)
Format: circle:{latitude},{longitude};r={radius}
a bounding box, provided as west longitude, south latitude, east longitude, north latitude
Format: bbox:{west longitude},{south latitude},{east longitude},{north latitude}
Please provide one of 'at', 'in=circle' or 'in=bbox' input for a relevant result.
","schema":{"type":"string","examples":["in=countryCode:CAN,MEX,USA","in=circle:52.53,13.38;r=10000","in=bbox:13.08836,52.33812,13.761,52.6755"]}},{"in":"query","name":"limit","description":"Maximum number of results to be returned.
","schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"in":"query","name":"lang","description":"Select the language to be used for result rendering from a list of BCP 47 compliant language codes.
","schema":{"type":"string","examples":["lang=en"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","description":"The results are presented as a JSON list of candidates in ranked order (most-likely to least-likely) based on the matched location criteria.","items":{"type":"object","properties":{"title":{"description":"The localized display name of this result item.","type":"string"},"id":{"description":"The unique identifier for the result item.","type":"string"},"address":{"type":"object","properties":{"label":{"description":"Assembled address value built out of the address components according to the regional postal rules. These are the same rules for all endpoints. It may not include all the input terms.","type":"string"},"countryCode":{"description":"A three-letter country code.","type":"string"},"countryName":{"description":"The localised country name.","type":"string"},"stateCode":{"description":"A country specific state code or state name abbreviation. For example, in the United States it is the two letter state abbreviation: \"CA\" for California.","type":"string"},"state":{"description":"The state division of a country.","type":"string"},"county":{"description":"A division of a state; typically, a secondary-level administrative division of a country or equivalent.","type":"string"},"city":{"description":"The name of the primary locality of the place.","type":"string"},"district":{"description":"A division of city; typically an administrative unit within a larger city or a customary name of a city's neighborhood.","type":"string"},"street":{"description":"Name of street of the returned place, if available.","type":"string"},"postalCode":{"description":"An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code.","type":"string"},"houseNumber":{"description":"House number of the returned place, if available.","type":"string"}},"description":"Postal address of the result item."},"scoring":{"type":"object","properties":{"queryScore":{"type":"number","description":"A score, out of 1, indicating how closely the result matches with the provided query `q` ."},"fieldScore":{"type":"object","properties":{},"description":"A breakdown of how closely individual field of the result matched with the provided query `q`."}},"description":"Score of the result. A higher score indicates a closer match."},"position":{"type":"object","properties":{"lat":{"type":"number","description":"The latitude of the searched place."},"lng":{"type":"number","description":"The longitude of the searched place."}},"description":"Returns the location coordinates of the result."},"access":{"type":"array","description":"An array returning the location coordinates of all the access points of the search result.","items":{"type":"object","properties":{"lat":{"type":"number","description":"The latitude of the access point of the search result."},"lng":{"type":"number","description":"The longitude of the access point of the search result."}}}},"distance":{"type":"integer","description":"The distance \"as the crow flies\" from the search center to this result item in meters."},"mapView":{"type":"object","properties":{"west":{"type":"number","description":"Longitude of the western-side of the box."},"south":{"type":"number","description":"Longitude of the southern-side of the box."},"east":{"type":"number","description":"Longitude of the eastern-side of the box."},"north":{"type":"number","description":"Longitude of the northern-side of the box."}},"description":"The bounding box enclosing the geometric shape (area or line) that an individual result covers. `place` typed results have no `mapView`."},"categories":{"type":"array","description":"The list of categories assigned to this place.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category.","type":"string"},"name":{"description":"Name of the place category in the result item language.","type":"string"},"primary":{"type":"boolean","description":"Whether or not it is a primary category. This field is visible only when the value is 'true'."}}}},"contacts":{"type":"array","description":"Contact information like phone, email or website.","items":{"type":"object","properties":{"phone":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"mobile":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"tollFree":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"fax":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"www":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"email":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}}}}}}}}}}}}}},"tags":["places API"]}},"/places/autocomplete":{"get":{"summary":"Autocomplete","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.
","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}},{"in":"query","name":"q","description":"Specify the free-text search query.
Please note that whitespace, urls, email addresses, or other out-of-scope queries will yield no results.
","required":true,"schema":{"type":"string","examples":["q=125, Berliner, berlin","q=Beacon, Boston, Hospital"]}},{"in":"query","name":"at","description":"Specify the center of the search context expressed as coordinates.
Please note that one of \"at\", \"in=circle\" or \"in=bbox\" should be provided for relevant results.
","schema":{"type":"string","format":"latitude,longitude","examples":["at=52.5308,13.3856"]}},{"in":"query","name":"in","description":"Search within a geographic area. This is a hard filter. Results will be returned if they are located within the specified area.
A geographic area can be
a country (or multiple countries), provided as comma-separated ISO 3166-1 alpha-3 country codes
The country codes are to be provided in all uppercase.
Format: countryCode:{countryCode}[,{countryCode}]
a circular area, provided as latitude, longitude, and radius (an integer with meters as unit)
Format: circle:{latitude},{longitude};r={radius}
a bounding box, provided as west longitude, south latitude, east longitude, north latitude
Format: bbox:{west longitude},{south latitude},{east longitude},{north latitude}
Please provide one of 'at', 'in=circle' or 'in=bbox' input for a relevant result.
","schema":{"type":"string","examples":["in=countryCode:CAN,MEX,USA","in=circle:52.53,13.38;r=10000","in=bbox:13.08836,52.33812,13.761,52.6755"]}},{"in":"query","name":"limit","description":"Maximum number of results to be returned.
","schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"in":"query","name":"lang","description":"Select the language to be used for result rendering from a list of BCP 47 compliant language codes.
","schema":{"type":"string","examples":["lang=en"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","description":"The results are presented as a JSON list of candidates in ranked order (most-likely to least-likely) based on the matched location criteria.","items":{"type":"object","properties":{"title":{"description":"The localized display name of this result item.","type":"string"},"id":{"description":"The unique identifier for the result item.","type":"string"},"address":{"type":"object","properties":{"label":{"description":"Assembled address value built out of the address components according to the regional postal rules. These are the same rules for all endpoints. It may not include all the input terms.","type":"string"},"countryCode":{"description":"A three-letter country code.","type":"string"},"countryName":{"description":"The localised country name.","type":"string"},"stateCode":{"description":"A country specific state code or state name abbreviation. For example, in the United States it is the two letter state abbreviation: \"CA\" for California.","type":"string"},"state":{"description":"The state division of a country.","type":"string"},"county":{"description":"A division of a state; typically, a secondary-level administrative division of a country or equivalent.","type":"string"},"city":{"description":"The name of the primary locality of the place.","type":"string"},"district":{"description":"A division of city; typically an administrative unit within a larger city or a customary name of a city's neighborhood.","type":"string"},"street":{"description":"Name of street of the returned place, if available.","type":"string"},"postalCode":{"description":"An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code.","type":"string"},"houseNumber":{"description":"House number of the returned place, if available.","type":"string"}},"description":"Postal address of the result item."},"scoring":{"type":"object","properties":{"queryScore":{"type":"number","description":"A score, out of 1, indicating how closely the result matches with the provided query `q` ."},"fieldScore":{"type":"object","properties":{},"description":"A breakdown of how closely individual field of the result matched with the provided query `q`."}},"description":"Score of the result. A higher score indicates a closer match."},"position":{"type":"object","properties":{"lat":{"type":"number","description":"The latitude of the searched place."},"lng":{"type":"number","description":"The longitude of the searched place."}},"description":"Returns the location coordinates of the result."},"access":{"type":"array","description":"An array returning the location coordinates of all the access points of the search result.","items":{"type":"object","properties":{"lat":{"type":"number","description":"The latitude of the access point of the search result."},"lng":{"type":"number","description":"The longitude of the access point of the search result."}}}},"distance":{"type":"integer","description":"The distance \"as the crow flies\" from the search center to this result item in meters."},"mapView":{"type":"object","properties":{"west":{"type":"number","description":"Longitude of the western-side of the box."},"south":{"type":"number","description":"Longitude of the southern-side of the box."},"east":{"type":"number","description":"Longitude of the eastern-side of the box."},"north":{"type":"number","description":"Longitude of the northern-side of the box."}},"description":"The bounding box enclosing the geometric shape (area or line) that an individual result covers. `place` typed results have no `mapView`."},"categories":{"type":"array","description":"The list of categories assigned to this place.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category.","type":"string"},"name":{"description":"Name of the place category in the result item language.","type":"string"},"primary":{"type":"boolean","description":"Whether or not it is a primary category. This field is visible only when the value is 'true'."}}}},"contacts":{"type":"array","description":"Contact information like phone, email or website.","items":{"type":"object","properties":{"phone":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"mobile":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"tollFree":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"fax":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"www":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"email":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}}}}}}}}}}}}}},"tags":["places API"]}},"/places/revgeocode":{"get":{"summary":"Reverse Geocode","parameters":[{"in":"query","name":"key","description":"A key is a unique identifier that is required to authenticate a request to the API.
","required":true,"schema":{"type":"string","format":"32 character alphanumeric string","examples":["key=API_KEY"]}},{"in":"query","name":"at","description":"Specify the center of the search context expressed as coordinates.
Please note that one of \"at\", \"in=circle\" or \"in=bbox\" should be provided for relevant results.
","required":true,"schema":{"type":"string","format":"latitude,longitude","examples":["at=52.5308,13.3856"]}},{"in":"query","name":"in","description":"Search within a geographic area. This is a hard filter. Results will be returned if they are located within the specified area.
A geographic area can be
a country (or multiple countries), provided as comma-separated ISO 3166-1 alpha-3 country codes
The country codes are to be provided in all uppercase.
Format: countryCode:{countryCode}[,{countryCode}]
a circular area, provided as latitude, longitude, and radius (an integer with meters as unit)
Format: circle:{latitude},{longitude};r={radius}
a bounding box, provided as west longitude, south latitude, east longitude, north latitude
Format: bbox:{west longitude},{south latitude},{east longitude},{north latitude}
Maximum number of results to be returned.
","schema":{"type":"integer","minimum":1,"maximum":100,"default":1}},{"in":"query","name":"lang","description":"Select the language to be used for result rendering from a list of BCP 47 compliant language codes.
","schema":{"type":"string","examples":["lang=en"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","description":"The results are presented as a JSON list of candidates in ranked order (most-likely to least-likely) based on the matched location criteria.","items":{"type":"object","properties":{"title":{"description":"The localized display name of this result item.","type":"string"},"id":{"description":"The unique identifier for the result item.","type":"string"},"address":{"type":"object","properties":{"label":{"description":"Assembled address value built out of the address components according to the regional postal rules. These are the same rules for all endpoints. It may not include all the input terms.","type":"string"},"countryCode":{"description":"A three-letter country code.","type":"string"},"countryName":{"description":"The localised country name.","type":"string"},"stateCode":{"description":"A country specific state code or state name abbreviation. For example, in the United States it is the two letter state abbreviation: \"CA\" for California.","type":"string"},"state":{"description":"The state division of a country.","type":"string"},"county":{"description":"A division of a state; typically, a secondary-level administrative division of a country or equivalent.","type":"string"},"city":{"description":"The name of the primary locality of the place.","type":"string"},"district":{"description":"A division of city; typically an administrative unit within a larger city or a customary name of a city's neighborhood.","type":"string"},"street":{"description":"Name of street of the returned place, if available.","type":"string"},"postalCode":{"description":"An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code.","type":"string"},"houseNumber":{"description":"House number of the returned place, if available.","type":"string"}},"description":"Postal address of the result item."},"scoring":{"type":"object","properties":{"queryScore":{"type":"number","description":"A score, out of 1, indicating how closely the result matches with the provided query `q` ."},"fieldScore":{"type":"object","properties":{},"description":"A breakdown of how closely individual field of the result matched with the provided query `q`."}},"description":"Score of the result. A higher score indicates a closer match."},"position":{"type":"object","properties":{"lat":{"type":"number","description":"The latitude of the searched place."},"lng":{"type":"number","description":"The longitude of the searched place."}},"description":"Returns the location coordinates of the result."},"access":{"type":"array","description":"An array returning the location coordinates of all the access points of the search result.","items":{"type":"object","properties":{"lat":{"type":"number","description":"The latitude of the access point of the search result."},"lng":{"type":"number","description":"The longitude of the access point of the search result."}}}},"distance":{"type":"integer","description":"The distance \"as the crow flies\" from the search center to this result item in meters."},"mapView":{"type":"object","properties":{"west":{"type":"number","description":"Longitude of the western-side of the box."},"south":{"type":"number","description":"Longitude of the southern-side of the box."},"east":{"type":"number","description":"Longitude of the eastern-side of the box."},"north":{"type":"number","description":"Longitude of the northern-side of the box."}},"description":"The bounding box enclosing the geometric shape (area or line) that an individual result covers. `place` typed results have no `mapView`."},"categories":{"type":"array","description":"The list of categories assigned to this place.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category.","type":"string"},"name":{"description":"Name of the place category in the result item language.","type":"string"},"primary":{"type":"boolean","description":"Whether or not it is a primary category. This field is visible only when the value is 'true'."}}}},"contacts":{"type":"array","description":"Contact information like phone, email or website.","items":{"type":"object","properties":{"phone":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"mobile":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"tollFree":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"fax":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"www":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}},"email":{"type":"array","items":{"type":"object","properties":{"label":{"description":"Optional label for the contact string, such as \"Customer Service\" or \"Pharmacy Fax\".","type":"string"},"value":{"description":"Contact information, as specified by the contact type.","type":"string"},"categories":{"type":"array","description":"The list of place categories this contact refers to.","items":{"type":"object","properties":{"id":{"description":"Identifier number for an associated category. For example: \"900-9300-0000\"","type":"string"}}}}}}}}}}}}}}}}}}},"tags":["places API"]}},"/create":{"post":{"parameters":{"key":{"name":"key","description":"API Key for authentication","example":"Format: 32 character alphanumeric string\n\n\nUsage:\n\nkey=YOUR_API_KEY","required":"true","schema":{"type":"string"},"in":"query"}},"requestBody":{"content":{"*/*":{"schema":{"properties":{"circle_center":{"description":"Latitude and longitude of the center of a circular polygon."},"circle_radius":{"description":"radius of the geofence (only for a circle) in meters (m)"},"geojson":{"description":"geometry of the geofence in geojson format"},"external_id":{"description":"External/User's ID of the geofence"},"meta_data":{"description":"metadata of the geofence. Metadata refers to additional information that describes a particular object or entity. In the context of geofencing, you can use it to define custom attributes that provide more context and information about a geofence like country, group ID etc."},"name":{"description":"name of the geofence. Use this field to assign meaningful custom names to your geofences. Example: name: “paris_city_limits”"},"tags":{"description":"comma separated list of tags for the geofence. Add custom tags to easily search or filter your geofences (using ‘Get Geofence List’ method) as per business case. Example: tags: “pickup_zone”, “2w” or tags: “pickup_zone”,”4w”.This parameter can accept a string with max length of 255"},"type":{"description":"type of the geofence polygon. Example: polygon, circle"}}}}}},"responses":{"200":{"content":{"*/*":{"schema":{"properties":{"data":{"description":"NextBillion ID of the geofence created"},"status":{"description":"In case of a successful request, it returns OK. Returns the error code otherwise."}}}}}}}}},"/delete":{"post":{"parameters":{"key":{"name":"key","description":"API Key for authentication","example":"Format: 32 character alphanumeric string\n\n\nUsage:\n\nkey=YOUR_API_KEY","required":"true","schema":{"type":"string"},"in":"query"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"external_id":{"type":"string","description":"External/User’s ID of the geofence. At least one out of ‘id’ or ‘external_id’ is mandatory"},"id":{"type":"string","description":"NextBillion ID of the geofence. At least one out of ‘id’ or ‘external_id’ is mandatory"}}}}}},"responses":{"200":{"content":{"*/*":{"schema":{"properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this field is not present in the response."},"status":{"description":"In case of a successful request, it returns OK. Returns the error code otherwise."}}}}}}}}},"/get":{"get":{"parameters":{"id":{"name":"id","description":"NextBillion ID of the geofence. At least one out of ‘id’ or ‘external_id’ is mandatory","example":"Format:id=string"},"external_id":{"name":"external_id","description":"External/User’s ID of the geofence. At least one out of ‘id’ or ‘external_id’ is mandatory"},"key":{"name":"key","description":"API Key for authentication","example":"Format: 32 character alphanumeric string\n\n\nUsage:\n\nkey=YOUR_API_KEY"}},"responses":{"200":{"content":{"*/*":{"schema":{"properties":{"status":{"description":"In case of a successful request, it returns OK. Returns the error code otherwise."},"data":{"properties":{"circle_center":{"description":"Latitude and longitude of the center of a circular polygon."},"circle_radius":{"description":"circle_radius [string] radius of the geofence (only for a circle) in meters (m)"},"created_at":{"description":"time at which the geofence is created expressed in Unix timestamp in seconds"},"external_id":{"description":"External/User’s ID of the geofence."},"geojson":{"description":"geometry of the geofence in geojson format"},"id":{"description":"NextBillion ID of the geofence"},"type":{"description":"type of the polygon. Example: polygon, circle"},"tags":{"description":"tags linked to the geofence"},"updated_at":{"description":"time at which the geofence was last updated, expressed in Unix timestamp in seconds"}}}}}}}}}}},"/getlist":{"get":{"parameters":{"key":{"name":"key","description":"API Key for authentication","example":"Format: 32 character alphanumeric string\n\n\nUsage:\n\nkey=YOUR_API_KEY"},"tags":{"name":"tags","description":"Comma separated list of tags to filter the geofences by. This parameter can accept a string with max length of 255","example":"Format: tags=string,string,[...]\n\n Example:tags=tag1,tag2,....."},"pn":{"name":"pn","description":"Denotes page number. Use this along with the ‘ps’ parameter to implement pagination for your searched results. This parameter does not have a max limit but would return an empty response in case a higher value is provided when the result-set itself is smaller","example":"Format:pn=integer\n\n Example:pn=5"},"ps":{"name":"ps","description":"Denotes number of search results per page. Use this along with the ‘pn’ parameter to implement pagination for your searched results. Max page size is 100, default is 20.","example":"ps=2"}},"responses":{"200":{"content":{"*/*":{"schema":{"properties":{"data":{"items":{"properties":{"geojson":{"description":"geometry of the geofence in geojson format"},"circle_center":{"description":"Latitude and longitude of the center of a circular polygon"},"circle_radius":{"description":"radius of the geofence (only for a circle) in meters (m)"},"created_at":{"description":"time at which the geofence is created expressed in Unix timestamp in seconds"},"external_id":{"description":"External/User’s ID of the geofence."},"id":{"description":"NextBillion ID of the geofence"},"type":{"description":"type of the polygon. Example: polygon, circle"},"tags":{"description":"tags linked to the geofence"},"updated_at":{"description":"time at which the geofence was last updated, expressed in Unix timestamp in seconds"}}}},"status":{"description":"In case of a successful request, it returns OK. Returns the error code otherwise."},"page":{"description":"Use this object to implement pagination in your application","allOf":{"0":{"properties":{"hasmore":{"description":"a boolean variable indicating whether there are more items to show or not."},"page":{"description":"current page number"},"size":{"description":"number of items per page"},"total":{"description":"total number of items"}}}}}}}}}}}}},"/update":{"post":{"parameters":{"key":{"name":"key","description":"API Key for authentication","example":"Format: 32 character alphanumeric string\n\n\nUsage:\n\nkey=YOUR_API_KEY","required":"true","schema":{"type":"string"},"in":"query"}},"requestBody":{"content":{"*/*":{"schema":{"properties":{"circle_center":{"description":"Latitude and longitude of the center of a circular polygon."},"circle_radius":{"description":"radius of the geofence (only for a circle) in meters(m)"},"id":{"description":"NextBillion ID of the geofence. At least one out of ‘id’ or ‘external_id’ is mandatory"},"meta_data":{"description":"metadata of the geofence. Metadata refers to additional information that describes a particular object or entity. In the context of geofencing, you can use it to define custom attributes that provide more context and information about a geofence like country, group ID etc."},"name":{"description":"name of the geofence. Use this field to assign meaningful custom names to your geofences. Example: name: “paris_city_limits”"},"type":{"description":"type of the polygon. Example: polygon, circle"},"tags":{"description":"tags of the geofence.Add custom tags to easily search or filter your geofences (using ‘Get Geofence List’ method) as per business case. Example: tags: “pickup_zone”, “2w” or tags: “pickup_zone”,”4w”."},"geojson":{"description":"geometry of the geofence in geojson format"}}}}}},"responses":{"200":{"content":{"*/*":{"schema":{"properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this attribute is not present in the response."},"status":{"description":"In case of a successful request, it returns OK. Returns the error code otherwise."}}}}}}}}},"/deletebatch":{"post":{"parameters":{"key":{"name":"key","description":"API Key for authentication","example":"Format: 32 character alphanumeric string\n\n\nUsage:\n\nkey=YOUR_API_KEY","required":"true","schema":{"type":"string"},"in":"query"}},"requestBody":{"content":{"*/*":{"schema":{"properties":{"external_id":{"description":"External/User’s ID of the geofence. At least one out of ‘id’ or ‘external_id’ is mandatory"},"id":{"description":"NextBillion ID of the geofence. At least one out of ‘id’ or ‘external_id’ is mandatory"}}}}}},"responses":{"200":{"content":{"*/*":{"schema":{"properties":{"message":{"description":"Displays the error message in case of a failed request. If the request is successful, this attribute is not present in the response."},"status":{"description":"In case of a successful request, it returns OK. Returns the error code otherwise."}}}}}}}}},"/contain":{"get":{"parameters":{"key":{"name":"key","description":"API Key for authentication","example":"Format: 32 character alphanumeric string\n\n\nUsage:\n\nkey=YOUR_API_KEY","required":"true","schema":{"type":"string"},"in":"query"},"verbose":{"name":"verbose","example":"verbose=true","description":"If set to true, an array with detailed information of geofences containing the position is returned. If set to false, an array containing only the IDs of the geofences in which the position lies, is returned."},"external_geofences":{"description":"Comma separated external/user’s ID of the geofences against which the ‘locations’ will be searched. If both ‘geofences’ and ‘external_geofences’ are not set, then the position will be searched against all your existing geofences. Max length of the string can be 255 characters"},"geofences":{"description":"Comma separated NextBillion IDs of the geofences against which the ‘locations’ will be searched. If both ‘geofences’ and ‘external_geofences’ are not set, then the position will be searched against all your existing geofences. Max length of the string can be 255 characters"},"locations":{"description":"Pipe (|) separated locations to be searched in latitude,longitude format."}},"responses":{"200":{"content":{"*/*":{"schema":{"properties":{"data":{"items":{"properties":{"circle_center":{"description":"Latitude and longitude of the center of a circular polygon"},"created_at":{"description":"time at which the geofence is created expressed in Unix timestamp in seconds"},"external_id":{"description":"External/User’s ID of the geofence."},"id":{"description":"NextBillion ID of the geofence"},"type":{"description":"type of the polygon. Example: polygon, circle"},"tags":{"description":"tags linked to the geofence"},"updated_at":{"description":"time at which the geofence was last updated, expressed in Unix timestamp in seconds"},"geojson":{"description":"geometry of the geofence in geojson format"}}}},"status":{"description":"In case of a successful request, it returns OK. Returns the error code otherwise."}}}}}}}}},"/v1/postalcode/json":{"post":{"parameters":{"key":{"required":true,"name":"key","schema":{"type":"string"},"description":"API Key for authentication","example":"Format: 32 character alphanumeric string\n\nUsage:\n\nkey=YOUR_API_KEY"}},"requestBody":{"content":{"application/json":{"schema":{"properties":{"postalcode":{"description":"Provide the postal code for which the information is needed. At least one of (`postalcode` + `country`) or `at` needs to be provided.\n\nPlease note that only 1 postal code can be requested [See this example](#note)"},"country":{"description":"country containing the postal code or the location. It is mandatory if `postalcode` is provided in the request.[See this example](#note)"},"at":{"description":"Location coordinates that you want to get the postal code of. If not providing `postalcode` in the request, `at` becomes mandatory. \n\nPlease note that only 1 point can be requested. [See this example](#note)","properties":{"lat":{"description":"atitude of the location"},"lng":{"description":"longitude of the location"}}}}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"places":{"description":"An object that contains details about the place that was provided in the input.","items":{"properties":{"geopoint":{"description":"Refers to the geographic coordinate denoting the center of the postal code in latitude, longitude format."},"country":{"description":"Name of the country associated with the geographic coordinate point / postal code provided in the API request"},"state":{"description":"Name of the state or province associated with the geographic coordinate point / postal code provided in the API request"},"district":{"description":"Name of the district or region associated with the geographic coordinate point / postal code provided in the API request"},"subDistrict":{"description":"Name of the sub-district or sub-region associated with the postal code or geographic coordinate point / postal code provided in the API request"},"postalCode":{"description":"Returns the postal code associated with the requested geographic coordinate point or the postal code itself as provided in the input API request."},"address":{"description":"Returns the address of the postal code provided."},"boundary":{"description":"An object containing the boundary details of the postal code area","properties":{"multiPolygon":{"description":"An array of objects containing information about all the polygons forming the postal code area. In case, the postal code area is formed by multiple polygons not containing each other, a matching count of `polygon` objects will be returned.","items":{"properties":{"polygon":{"description":"An object containing the details of a single polygon that is a part of the postal code area. In case the postal code area contains other polygon(s), the details of such polygon(s) would be returned through an array of `points` object","items":{"properties":{"points":{"description":"Represents an array of geographic coordinates that define a `polygon` boundary.","items":{"properties":{"lat":{"description":"Latitude of the coordinate"},"lng":{"description":"Longitude of the coordinate"}}}}}}}}}}}}}}}}}}}}}}}},"components":{"schemas":{"RichGroupDto":{"properties":{"bbox":{"example":"{ \"minLat\": 0, \"minLon\": 0, \"maxLat\": 1, \"maxLon\": 1 }"},"status":{"example":"\"active\", or \"inactive\""}}}}}}