Order Book provides ready-to-run domain-specific logistic data governance for your route optimization.
Conundra Order Book API (1.6.1)
Locations
Locations can be managed separately in Order Book, which allows the user to capture their related business rules in a reusable manner. This is especially valuable in business cases where a select set of Locations is reused across many orders.
Typical use cases include capturing regular opening hours or requirements tied to a specific Location.
Request
Retrieve a list of Locations in bulk, identified by the query parameters defined in the request. The query requires at least a page and page size, in which case all Locations will be returned in a paged format. Providing any additional filter will return the matching subset of Locations. When providing multiple filter parameters, all filters must match for a Location to be included in the response.
The returned list can be empty, but the request will not fail if no results are found.
- Mock serverhttps://developer.conundra.eu/_mock/apis/order-book/order-book-api/locations/by
- Order Book API Productionhttps://api.conundra.eu/orderbook/v1/locations/by
{ "data": [ { … } ], "page": { "total_items": 100, "total_pages": 10, "page_size": 10, "current_page": 1 } }
- Mock serverhttps://developer.conundra.eu/_mock/apis/order-book/order-book-api/locations/{business_id}
- Order Book API Productionhttps://api.conundra.eu/orderbook/v1/locations/{business_id}
OK
A location has an address and timewindows representing opening hours.
An alternative address and/or timewindows to be used for planning can be specified. When planning address and/or timewindows are specified the originals are only there for information purposes.
An address item can consist of an address and/or geo coordinates. The resolved version will be resolved based on the geo coordinates or the address (not both). The resolved version will be available when reading to make out what the original geo coordinates in the routing service are.
{ "data": { "business_id": "locationA", "location_category": "locationCategoryA", "name": "locationName", "description": "locationDescription", "comment": "locationComment", "address": { … }, "planning_address": { … }, "stop_time": "PT5M", "requirements": { … }, "time_window": { … }, "planning_time_window": { … }, "custom_data": { … }, "etag": "W/\"1\"" } }
Request
Create of update a location.
The caller is responsible for providing a unique business id for each Location to retain consistency. If a call is made using an unknown business id, a new Location will be created, otherwise an update will be applied to the existing Location. Locations are versioned and the ETag-header will represent the type of operation that was executed. Conversely, adding an If-Match header to requests can protect the caller against unintended operations by acting as an optimistic lock.
The RFC7240 Prefer header indicates that a particular server behavior is preferred by the client but is not required for successful completion of the request (see RFC 7240).
The following behavior is supported by this API:
- return=<minimal|representation> is used to suggest the server to return using status code 204 without a resource in the response body (minimal) or using status codes 200 or 201 with the resource in the response body on success (representation).
An optional category for the Locations, represented by its code. Defining a category for your Location can help in easy retrieval of the information through the search-endpoints or in the user interface.
A category will also allow you to target Conditionals to Orders which are tied to a Location with specific categories.
A freeform text description of the Location, providing additional details that might be of use for a planner.
The main, physical address for this Location. This address as mandatory for creating/updating a Location.
Optional address line representing the street address (optionally including house number, box, ...)
The name of the locality. Mandatory if no geo point is provided.
The uniquely identifying code of this locality. Mandatory if no geo point is provided.
An ISO3166-1 alpha-2 two letter country code. Mandatory if no geo point is provided.
A The geo point is optional, if and only if all the mandatory address fields are supplied. When no geo point is provided, a geocoding call will determine the geo point using the provided textual address fields. (See resolved address for more information.)
Adding a geo point allows you to retain full control of the data that will be used in your planning.
The planning address allows you to override the address on a Location. A typical use case for this would be to provide the official address of a retail location in the address field, but specifying a loading dock in a back alley using the planning address.
The stop time to be applied when visiting this Location.
Must be specified as a valid ISO Duration (see wikipedia ISO-8601 and RFC-3339). Must be non negative.
Requirements that have to be fulfilled by the executor of an order at this location.
A collection of TimeWindows, defining when this location can be visited. This can be used to restrict an Order's windowed timeframes. If this property is not provided, we consider the location open 24/7.
Planning time windows allow you to specify a different set of time windows for use in the planning, and follow the same format as the time_window property. A typical use case for this would be to specify different delivery windows for a retail location (eg: you can deliver order before the regular opening hours of the retail location) while still providing the information about the regular opening hours (eg: a planner can still determine whether he would be able to contact anyone at the location during their regular opening hours).
If no planning time windows are specified, the regular time windows will be used for planning.
Custom data allows you te enrich a Location with relevant information for the planner that is not part of the Order Book domain.
Custom Data on a Location will be inherited by Orders linked to this Location. When a key is duplicated on the Order, the Order will retain its value for this key.
- Mock serverhttps://developer.conundra.eu/_mock/apis/order-book/order-book-api/locations/{business_id}
- Order Book API Productionhttps://api.conundra.eu/orderbook/v1/locations/{business_id}
Indicates the locations is created or updated.
The response body contains the location, since Prefer is set to return=representation.
A location has an address and timewindows representing opening hours.
An alternative address and/or timewindows to be used for planning can be specified. When planning address and/or timewindows are specified the originals are only there for information purposes.
An address item can consist of an address and/or geo coordinates. The resolved version will be resolved based on the geo coordinates or the address (not both). The resolved version will be available when reading to make out what the original geo coordinates in the routing service are.
{ "data": { "business_id": "locationA", "location_category": "locationCategoryA", "name": "locationName", "description": "locationDescription", "comment": "locationComment", "address": { … }, "planning_address": { … }, "stop_time": "PT5M", "requirements": { … }, "time_window": { … }, "planning_time_window": { … }, "custom_data": { … }, "etag": "W/\"1\"" } }