123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295 |
- <!DOCTYPE HTML><html><head><title>Booking API documentation</title><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="generator" content="https://github.com/kevinrenskers/raml2html 2.2.0"><link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.1/styles/default.min.css"><script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.min.js"></script><script type="text/javascript" src="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.1/highlight.min.js"></script><script type="text/javascript">
- $(document).ready(function() {
- $('.page-header pre code, .top-resource-description pre code').each(function(i, block) {
- hljs.highlightBlock(block);
- });
- $('[data-toggle]').click(function() {
- var selector = $(this).data('target') + ' pre code';
- $(selector).each(function(i, block) {
- hljs.highlightBlock(block);
- });
- });
- // open modal on hashes like #_action_get
- $(window).bind('hashchange', function(e) {
- var anchor_id = document.location.hash.substr(1); //strip #
- var element = $('#' + anchor_id);
- // do we have such element + is it a modal? --> show it
- if (element.length && element.hasClass('modal')) {
- element.modal('show');
- }
- });
- // execute hashchange on first page load
- $(window).trigger('hashchange');
- // remove url fragment on modal hide
- $('.modal').on('hidden.bs.modal', function() {
- try {
- if (history && history.replaceState) {
- history.replaceState({}, '', '#');
- }
- } catch(e) {}
- });
- });
- </script><style>
- .hljs {
- background: transparent;
- }
- .parent {
- color: #999;
- }
- .list-group-item > .badge {
- float: none;
- margin-right: 6px;
- }
- .panel-title > .methods {
- float: right;
- }
- .badge {
- border-radius: 0;
- text-transform: uppercase;
- width: 70px;
- font-weight: normal;
- color: #f3f3f6;
- line-height: normal;
- }
- .badge_get {
- background-color: #63a8e2;
- }
- .badge_post {
- background-color: #6cbd7d;
- }
- .badge_put {
- background-color: #22bac4;
- }
- .badge_delete {
- background-color: #d26460;
- }
- .badge_patch {
- background-color: #ccc444;
- }
- .list-group, .panel-group {
- margin-bottom: 0;
- }
- .panel-group .panel+.panel-white {
- margin-top: 0;
- }
- .panel-group .panel-white {
- border-bottom: 1px solid #F5F5F5;
- border-radius: 0;
- }
- .panel-white:last-child {
- border-bottom-color: white;
- -webkit-box-shadow: none;
- box-shadow: none;
- }
- .panel-white .panel-heading {
- background: white;
- }
- .tab-pane ul {
- padding-left: 2em;
- }
- .tab-pane h2 {
- font-size: 1.2em;
- padding-bottom: 4px;
- border-bottom: 1px solid #ddd;
- }
- .tab-pane h3 {
- font-size: 1.1em;
- }
- .tab-content {
- border-left: 1px solid #ddd;
- border-right: 1px solid #ddd;
- border-bottom: 1px solid #ddd;
- padding: 10px;
- }
- #sidebar {
- margin-top: 30px;
- padding-right: 5px;
- overflow: auto;
- height: 90%;
- }
- .top-resource-description {
- border-bottom: 1px solid #ddd;
- background: #fcfcfc;
- padding: 15px 15px 0 15px;
- margin: -15px -15px 10px -15px;
- }
- .resource-description {
- border-bottom: 1px solid #fcfcfc;
- background: #fcfcfc;
- padding: 15px 15px 0 15px;
- margin: -15px -15px 10px -15px;
- }
- .resource-description p:last-child {
- margin: 0;
- }
- .list-group .badge {
- float: left;
- }
- .method_description {
- margin-left: 85px;
- }
- .method_description p:last-child {
- margin: 0;
- }
- .list-group-item {
- cursor: pointer;
- }
- .list-group-item:hover {
- background-color: #f5f5f5;
- }
- </style></head><body data-spy="scroll" data-target="#sidebar"><div class="container"><div class="row"><div class="col-md-9" role="main"><div class="page-header"><h1>Booking API documentation <small>version v1</small></h1><p>http://dddsample.marcusoncode.se/booking/v1</p></div><div class="panel panel-default"><div class="panel-heading"><h3 id="cargos" class="panel-title">/cargos</h3></div><div class="panel-body"><div class="panel-group"><div class="panel panel-white"><div class="panel-heading"><h4 class="panel-title"><a class="collapsed" data-toggle="collapse" href="#panel_cargos"><span class="parent"></span>/cargos</a> <span class="methods"><a href="#cargos_get"><span class="badge badge_get">get</span></a> <a href="#cargos_post"><span class="badge badge_post">post</span></a></span></h4></div><div id="panel_cargos" class="panel-collapse collapse"><div class="panel-body"><div class="list-group"><div onclick="window.location.href = '#cargos_get'" class="list-group-item"><span class="badge badge_get">get</span><div class="method_description"><p>All booked cargos</p></div><div class="clearfix"></div></div><div onclick="window.location.href = '#cargos_post'" class="list-group-item"><span class="badge badge_post">post</span><div class="method_description"><p>Book a new cargo.</p></div><div class="clearfix"></div></div></div></div></div><div class="modal fade" tabindex="0" id="cargos_get"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h4 class="modal-title" id="myModalLabel"><span class="badge badge_get">get</span> <span class="parent"></span>/cargos</h4></div><div class="modal-body"><div class="alert alert-info"><p>All booked cargos</p></div><ul class="nav nav-tabs"><li><a href="#cargos_get_response" data-toggle="tab">Response</a></li></ul><div class="tab-content"><div class="tab-pane" id="cargos_get_response"><h2>HTTP status code <a href="http://httpstatus.es/200" target="_blank">200</a></h2><h3>Body</h3><p><strong>Type: application/json</strong></p><p><strong>Example</strong>:</p><pre><code>{
- "cargos": [
- {
- "arrival_deadline": "0001-01-01T00:00:00Z",
- "destination": "CNHKG",
- "misrouted": false,
- "origin": "SESTO",
- "routed": false,
- "tracking_id": "ABC123"
- },
- {
- "arrival_deadline": "0001-01-01T00:00:00Z",
- "destination": "SESTO",
- "misrouted": false,
- "origin": "AUMEL",
- "routed": false,
- "tracking_id": "FTL456"
- }
- ]
- }
- </code></pre></div></div></div></div></div></div><div class="modal fade" tabindex="0" id="cargos_post"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h4 class="modal-title" id="myModalLabel"><span class="badge badge_post">post</span> <span class="parent"></span>/cargos</h4></div><div class="modal-body"><div class="alert alert-info"><p>Book a new cargo.</p></div><ul class="nav nav-tabs"><li class="active"><a href="#cargos_post_request" data-toggle="tab">Request</a></li><li><a href="#cargos_post_response" data-toggle="tab">Response</a></li></ul><div class="tab-content"><div class="tab-pane active" id="cargos_post_request"><h3>Body</h3><p><strong>Type: application/json</strong></p><p><strong>Example</strong>:</p><pre><code>{
- "origin": "SESTO",
- "destination": "DEHAM",
- "arrival_deadline": "2016-03-24T23:00:00Z"
- }
- </code></pre></div><div class="tab-pane" id="cargos_post_response"><h2>HTTP status code <a href="http://httpstatus.es/200" target="_blank">200</a></h2><h3>Body</h3><p><strong>Type: application/json</strong></p><p><strong>Example</strong>:</p><pre><code>{
- "tracking_id": "ABC123"
- }
- </code></pre></div></div></div></div></div></div></div><div class="panel panel-white"><div class="panel-heading"><h4 class="panel-title"><a class="collapsed" data-toggle="collapse" href="#panel_cargos__trackingId_"><span class="parent">/cargos</span>/{trackingId}</a> <span class="methods"><a href="#cargos__trackingId__get"><span class="badge badge_get">get</span></a></span></h4></div><div id="panel_cargos__trackingId_" class="panel-collapse collapse"><div class="panel-body"><div class="list-group"><div onclick="window.location.href = '#cargos__trackingId__get'" class="list-group-item"><span class="badge badge_get">get</span><div class="method_description"><p>A specific cargo</p></div><div class="clearfix"></div></div></div></div></div><div class="modal fade" tabindex="0" id="cargos__trackingId__get"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h4 class="modal-title" id="myModalLabel"><span class="badge badge_get">get</span> <span class="parent">/cargos</span>/{trackingId}</h4></div><div class="modal-body"><div class="alert alert-info"><p>A specific cargo</p></div><ul class="nav nav-tabs"><li class="active"><a href="#cargos__trackingId__get_request" data-toggle="tab">Request</a></li><li><a href="#cargos__trackingId__get_response" data-toggle="tab">Response</a></li></ul><div class="tab-content"><div class="tab-pane active" id="cargos__trackingId__get_request"><h3>URI Parameters</h3><ul><li><strong>trackingId</strong>: <em>required (string)</em><p>The tracking id of the cargo</p></li></ul></div><div class="tab-pane" id="cargos__trackingId__get_response"><h2>HTTP status code <a href="http://httpstatus.es/200" target="_blank">200</a></h2><h3>Body</h3><p><strong>Type: application/json</strong></p><p><strong>Example</strong>:</p><pre><code>{
- "cargo": {
- "arrival_deadline": "2016-03-30T22:00:00Z",
- "destination": "DEHAM",
- "legs": [
- {
- "voyage_number": "0300A",
- "from": "CNHKG",
- "to": "SESTO",
- "load_time": "2016-03-06T18:12:11.01579612Z",
- "unload_time": "2016-03-08T02:13:11.01579612Z"
- },
- {
- "voyage_number": "0400S",
- "from": "SESTO",
- "to": "FIHEL",
- "load_time": "2016-03-10T01:42:11.01579612Z",
- "unload_time": "2016-03-11T04:21:11.01579612Z"
- },
- {
- "voyage_number": "0100S",
- "from": "FIHEL",
- "to": "NLRTM",
- "load_time": "2016-03-13T08:42:11.01579612Z",
- "unload_time": "2016-03-14T01:38:11.01579612Z"
- }
- ],
- "misrouted": true,
- "origin": "CNHKG",
- "routed": true,
- "tracking_id": "D0909E1C"
- }
- }
- </code></pre></div></div></div></div></div></div></div><div class="panel panel-white"><div class="panel-heading"><h4 class="panel-title"><a class="collapsed" data-toggle="collapse" href="#panel_cargos__trackingId__assign_to_route"><span class="parent">/cargos/{trackingId}</span>/assign_to_route</a> <span class="methods"><a href="#cargos__trackingId__assign_to_route_post"><span class="badge badge_post">post</span></a></span></h4></div><div id="panel_cargos__trackingId__assign_to_route" class="panel-collapse collapse"><div class="panel-body"><div class="list-group"><div onclick="window.location.href = '#cargos__trackingId__assign_to_route_post'" class="list-group-item"><span class="badge badge_post">post</span><div class="method_description"><p>Assign given route to the cargo.</p></div><div class="clearfix"></div></div></div></div></div><div class="modal fade" tabindex="0" id="cargos__trackingId__assign_to_route_post"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h4 class="modal-title" id="myModalLabel"><span class="badge badge_post">post</span> <span class="parent">/cargos/{trackingId}</span>/assign_to_route</h4></div><div class="modal-body"><div class="alert alert-info"><p>Assign given route to the cargo.</p></div><ul class="nav nav-tabs"><li class="active"><a href="#cargos__trackingId__assign_to_route_post_request" data-toggle="tab">Request</a></li></ul><div class="tab-content"><div class="tab-pane active" id="cargos__trackingId__assign_to_route_post_request"><h3>URI Parameters</h3><ul><li><strong>trackingId</strong>: <em>required (string)</em><p>The tracking id of the cargo</p></li></ul><h3>Body</h3><p><strong>Type: application/json</strong></p><p><strong>Example</strong>:</p><pre><code>{
- "legs": [
- {
- "voyage_number": "0301S",
- "from": "SESTO",
- "to": "FIHEL",
- "load_time": "2015-11-14T14:10:29.173391809Z",
- "unload_time": "2015-11-15T21:55:29.173391809Z"
- },
- {
- "voyage_number": "0100S",
- "from": "FIHEL",
- "to": "CNHKG",
- "load_time": "2015-11-18T02:19:29.173391809Z",
- "unload_time": "2015-11-19T04:11:29.173391809Z"
- }
- ]
- }
- </code></pre></div></div></div></div></div></div></div><div class="panel panel-white"><div class="panel-heading"><h4 class="panel-title"><a class="collapsed" data-toggle="collapse" href="#panel_cargos__trackingId__change_destination"><span class="parent">/cargos/{trackingId}</span>/change_destination</a> <span class="methods"><a href="#cargos__trackingId__change_destination_post"><span class="badge badge_post">post</span></a></span></h4></div><div id="panel_cargos__trackingId__change_destination" class="panel-collapse collapse"><div class="panel-body"><div class="list-group"><div onclick="window.location.href = '#cargos__trackingId__change_destination_post'" class="list-group-item"><span class="badge badge_post">post</span><div class="method_description"><p>Change destination of the cargo. May result in a misrouted cargo.</p></div><div class="clearfix"></div></div></div></div></div><div class="modal fade" tabindex="0" id="cargos__trackingId__change_destination_post"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h4 class="modal-title" id="myModalLabel"><span class="badge badge_post">post</span> <span class="parent">/cargos/{trackingId}</span>/change_destination</h4></div><div class="modal-body"><div class="alert alert-info"><p>Change destination of the cargo. May result in a misrouted cargo.</p></div><ul class="nav nav-tabs"><li class="active"><a href="#cargos__trackingId__change_destination_post_request" data-toggle="tab">Request</a></li></ul><div class="tab-content"><div class="tab-pane active" id="cargos__trackingId__change_destination_post_request"><h3>URI Parameters</h3><ul><li><strong>trackingId</strong>: <em>required (string)</em><p>The tracking id of the cargo</p></li></ul><h3>Body</h3><p><strong>Type: application/json</strong></p><p><strong>Example</strong>:</p><pre><code>{
- "destination": "CNHKG"
- }
- </code></pre></div></div></div></div></div></div></div><div class="panel panel-white"><div class="panel-heading"><h4 class="panel-title"><a class="collapsed" data-toggle="collapse" href="#panel_cargos__trackingId__request_routes"><span class="parent">/cargos/{trackingId}</span>/request_routes</a> <span class="methods"><a href="#cargos__trackingId__request_routes_get"><span class="badge badge_get">get</span></a></span></h4></div><div id="panel_cargos__trackingId__request_routes" class="panel-collapse collapse"><div class="panel-body"><div class="list-group"><div onclick="window.location.href = '#cargos__trackingId__request_routes_get'" class="list-group-item"><span class="badge badge_get">get</span><div class="method_description"><p>Requests routes based on current specification. Uses an external routing service provided by the routing package.</p></div><div class="clearfix"></div></div></div></div></div><div class="modal fade" tabindex="0" id="cargos__trackingId__request_routes_get"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h4 class="modal-title" id="myModalLabel"><span class="badge badge_get">get</span> <span class="parent">/cargos/{trackingId}</span>/request_routes</h4></div><div class="modal-body"><div class="alert alert-info"><p>Requests routes based on current specification. Uses an external routing service provided by the routing package.</p></div><ul class="nav nav-tabs"><li class="active"><a href="#cargos__trackingId__request_routes_get_request" data-toggle="tab">Request</a></li><li><a href="#cargos__trackingId__request_routes_get_response" data-toggle="tab">Response</a></li></ul><div class="tab-content"><div class="tab-pane active" id="cargos__trackingId__request_routes_get_request"><h3>URI Parameters</h3><ul><li><strong>trackingId</strong>: <em>required (string)</em><p>The tracking id of the cargo</p></li></ul></div><div class="tab-pane" id="cargos__trackingId__request_routes_get_response"><h2>HTTP status code <a href="http://httpstatus.es/200" target="_blank">200</a></h2><h3>Body</h3><p><strong>Type: application/json</strong></p><p><strong>Example</strong>:</p><pre><code>{
- "routes": [
- {
- "legs": [
- {
- "voyage_number": "0301S",
- "from": "SESTO",
- "to": "FIHEL",
- "load_time": "2015-11-14T14:10:29.173391809Z",
- "unload_time": "2015-11-15T21:55:29.173391809Z"
- },
- {
- "voyage_number": "0100S",
- "from": "FIHEL",
- "to": "CNHKG",
- "load_time": "2015-11-18T02:19:29.173391809Z",
- "unload_time": "2015-11-19T04:11:29.173391809Z"
- }
- ]
- },
- {
- "legs": [
- {
- "voyage_number": "0400S",
- "from": "SESTO",
- "to": "JNTKO",
- "load_time": "2015-11-14T06:22:29.173415471Z",
- "unload_time": "2015-11-15T10:22:29.173415471Z"
- },
- {
- "voyage_number": "0200T",
- "from": "JNTKO",
- "to": "CNHKG",
- "load_time": "2015-11-17T10:45:29.173415471Z",
- "unload_time": "2015-11-18T11:48:29.173415471Z"
- }
- ]
- }
- ]
- }
- </code></pre></div></div></div></div></div></div></div></div></div></div><div class="panel panel-default"><div class="panel-heading"><h3 id="locations" class="panel-title">/locations</h3></div><div class="panel-body"><div class="panel-group"><div class="panel panel-white"><div class="panel-heading"><h4 class="panel-title"><a class="collapsed" data-toggle="collapse" href="#panel_locations"><span class="parent"></span>/locations</a> <span class="methods"><a href="#locations_get"><span class="badge badge_get">get</span></a></span></h4></div><div id="panel_locations" class="panel-collapse collapse"><div class="panel-body"><div class="list-group"><div onclick="window.location.href = '#locations_get'" class="list-group-item"><span class="badge badge_get">get</span><div class="method_description"><p>All registered locations.</p></div><div class="clearfix"></div></div></div></div></div><div class="modal fade" tabindex="0" id="locations_get"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h4 class="modal-title" id="myModalLabel"><span class="badge badge_get">get</span> <span class="parent"></span>/locations</h4></div><div class="modal-body"><div class="alert alert-info"><p>All registered locations.</p></div><ul class="nav nav-tabs"><li><a href="#locations_get_response" data-toggle="tab">Response</a></li></ul><div class="tab-content"><div class="tab-pane" id="locations_get_response"><h2>HTTP status code <a href="http://httpstatus.es/200" target="_blank">200</a></h2><h3>Body</h3><p><strong>Type: application/json</strong></p><p><strong>Example</strong>:</p><pre><code>{
- "locations": [
- {
- "locode": "DEHAM",
- "name": "Hamburg"
- },
- {
- "locode": "SESTO",
- "name": "Stockholm"
- },
- {
- "locode": "AUMEL",
- "name": "Melbourne"
- },
- {
- "locode": "CNHKG",
- "name": "Hongkong"
- },
- {
- "locode": "JNTKO",
- "name": "Tokyo"
- },
- {
- "locode": "NLRTM",
- "name": "Rotterdam"
- }
- ]
- }
- </code></pre></div></div></div></div></div></div></div></div></div></div></div><div class="col-md-3"><div id="sidebar" class="hidden-print affix" role="complementary"><ul class="nav nav-pills nav-stacked"><li><a href="#cargos">/cargos</a></li><li><a href="#locations">/locations</a></li></ul></div></div></div></div></body></html>
|