Skip to end of metadata
Go to start of metadata

This documentation is no longer actively supported and may be out of date. Going forward, please visit and bookmark our new site (https://docs.phunware.com/) for up-to-date documentation.

Create a Route

 

This method is used to create a route, but it should be considered deprecated, since the typical use case is to generate routes via a POST on the …v1.1/routes/reset URL, which will eliminate existing routes and recalculate them.  Routes may only be created via this method on draft floors.

Method

POST

URL

http://map-api.phunware.com/v1.1/routes

Headers

X-Auth (see Security)

Request Body

Required parameters are underlined.

Parameter

Value

Description

startPointId

integer

The ID of the starting point to match routes against.

endPointId

integer

The ID of the ending point to match routes against.

isAccessible

Boolean

Specifies whether this route is considered accessible.

Default value: false

pointIds

string

Comma-separated, ordered list of the points that make up this route.

floorId

integer

The floor that this route is associated with.

data

array

JSON array containing the points, in order, that comprise this route.

{
    "startPointId": <integer>,
    "endPointId": <integer>,
    "isAccessible": <Boolean>,
    "pointIds": <string>,
    "data": <array>
} 

Example Request

POST the following request body to: http://map-api.phunware.com/v1.1/routes

{
    "startPointId": 78757,
    "endPointId": 75759,
    "isAccessible": true,
    "pointIds": "78757,78758,78759",
    "data": 
	[
        <object containing point ID 78757 data>,
        <object containing point ID 78758 data>,
        <object containing point ID 78759 data>
    ]
} 

Response

A successful response will have a 200 status code and a body containing the newly created route's ID:

{
    "data": 
	{
        "id": <integer>
    }
}

See Mapping API Response Handling for error payloads.

Example Response

Example body of successful response:

{
    "data": 
	{
        "id": 10
    }
}

ON THIS PAGE

 

 

  • No labels