Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
takinola committed Oct 29, 2023
1 parent 41d3b1f commit bee3b35
Showing 1 changed file with 47 additions and 12 deletions.
59 changes: 47 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,26 +174,26 @@
</ul>
</div>
<div class="p-2 w-75">
<section id="introduction">
<section class="mt-3" id="introduction">
<h3> Background</h3>
<p>Weave is an API aggregator for the Travel Tech industry. Weave enables applications to integrate with a number of different service providers using a single API. When the underlying service provider APIs change, the integrations built using Weave will be updated with minimal to no development effort by application developers. Weave will continue to support previous versions of its own API endpoints for a predetermined period of time to enable developers sufficient time to plan and execute updates to their product roadmaps</p>
</section>
<h3>API Design</h3>
<section id="domain">
<section class="mt-3" id="domain">
<p class="lead">Domain</p>
<p>Requests are made to the Weave API domain eg https://use1.weaveapi.com</p>
<p>Requests can only be made using SSL enabled connections</p>
</section>
<section id="api_version">
<section class="mt-3" id="api_version">
<p class="lead">API Versions</p>
<p>Requests will specify the Weave API version being used. If the version is omitted (or is invalid), Weave will default to the latest API version.</p>
<p>Deprecation schedule: Weave will support 2 previous versions for a period of 6 months before deprecation</p>
</section>
<section id="endpoints">
<section class="mt-3" id="endpoints">
<p class="lead">Endpoints</p>
<p>Each API will have an end point eg /listings. End points may require additional query parameters (for GET requests) or body parameters (for POST requests).</p>
</section>
<section id="headers">
<section class="mt-3" id="headers">
<p class="lead">Headers</p>
<p>Additional parameters for the request, for example authentication tokens and request destinations</p>
<p>
Expand All @@ -207,8 +207,8 @@ <h3>API Design</h3>
</p>
</section>
<h3>Context</h3>
<section id="integrations">
<table class="table table-dark">
<section class="mt-3" id="integrations">
<table class="table">
<thead>
<tr>
<th scope="col">Type</th>
Expand Down Expand Up @@ -251,18 +251,18 @@ <h3>Context</h3>
</tbody>
</table>
</section>
<section id="origin">
<section class="mt-3" id="origin">
<p class="lead">Origin</p>
<p>Origin for all requests will be:
https://use1.weaveapi.com
</p>
</section>
<section id="api_version">
<section class="mt-3" id="api_version">
<p class="lead">API Version</p>
<p>Current API version is “v1”</p>
<p>Request paths should be prefixed with the API version ie “/api/v1/endpoint/path”</p>
</section>
<section id="api_headers">
<section class="mt-3" id="api_headers">
<p class="lead">Headers</p>
<p>The following headers need to be included with each request</p>
<p>X-WEAVE-APIKEY
Expand Down Expand Up @@ -295,7 +295,7 @@ <h3>Context</h3>
</p>
</section>

<section id="returned_data">
<section class="mt-3" id="returned_data">
<p class="lead">Returned data</p>
<p>Data is always returned in the format</p>
<p>{
Expand All @@ -306,7 +306,7 @@ <h3>Context</h3>
</p>
<p>Note: If the proxy target does not support the endpoint, the response will be returned with the data and raw fields as empty arrays</p>
</section>
<section id="errors">
<section class="mt-3" id="errors">
<p class="lead">Errors</p>
<p>Errors are returned with the appropriate error code and message</p>
<p>{
Expand All @@ -315,6 +315,41 @@ <h3>Context</h3>
}
</p>
</section>

<h3>Endpoints</h3>
<section class="mt-3" id="authentication">
<p class="lead">Authentication</p>
<h6>Context</h6>
<p>This endpoint is used to obtain authentication tokens from the target PMS. The authentication token is then used in future requests (ie passed in the header as X-WEAVE-PROXY-ACCESS-TOKEN)</p>
<h6>Path</h6>
<p>/accessTokens</p>
<h6>Request type</h6>
<p>POST</p>
<h6>Headers</h6>
<p>Content-type: application/json</p>
<h6>Search parameters</h6>
<p>None</p>
<h6>Body</h6>
<p>client_id: PMS user client id</p>
<p>client_secret: PMS user client secret</p>
<h6>Results</h6>
<p>{
status: true/false,
data: [
{
access_token: ‘xs34…’ // access token to be used in future requests in the X-WEAVE-PROXY-ACCESS-TOKEN header field
expiry: 1749275583083 // expiry time of the access_token presented as the number of milliseconds since the beginning of the UNIX epoch
}
],
raw: ….
}
</p>
<h6>Supported destinations</h6>
<ul>
<li>Hostaway</li>
<li>Hospitable</li>
</ul>
</section>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
Expand Down

0 comments on commit bee3b35

Please sign in to comment.