-
Notifications
You must be signed in to change notification settings - Fork 12
/
endpoints.html
204 lines (181 loc) · 7.44 KB
/
endpoints.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
---
layout: page
title: Endpoints & Model types
permalink: /endpoints/
---
<div class="home">
<p>You can make HTTP GET, POST or PUT Requests. Requests are passed to the API by using JSON objects to the API endpoints with the appropriate parameters. The documentation for each API call will contain more detail on the parameters accepted by the call.</p>
<p>All responses are sent JSON-encoded. The specific responses (successful ones) are described in the documentation section for each method. See <a href="https://en.wikipedia.org/wiki/Json">https://en.wikipedia.org/wiki/Json</a> for more information on JSON.</p>
<p>
All input strings should be UTF-8 encoded, our response is always encoded conforming to the Content-Type HTTP header, which for JSON responses is <code class="highlighter-rouge">charset=utf-8</code>.
Optional JSON properties should be omitted from the request when not used.
Do not provide null values.
For backward compatibility reasons we do include null values in the v1 responses, but we won't in the v2 responses.
</p>
<p>Some of our endpoints return both the status of the transaction and signer activities. Further details about the statuses and activities can be found <a href="/status-activity/">here</a>.</p>
<!-- Begin list of all endpoints-->
<h3>All endpoints:</h3>
<ul class="endpoint_list">
{% for path in site.data.api-swagger.paths %}
{% for m in path[1] %}
{% assign method_name = m[0] %}
{% assign method = m[1] %}
{% capture current_path %}#/paths/{{ path[0] }}/{{ method_name }}{% endcapture %}
<li><a href="#{{ current_path | uri_escape }}"><span class="{{ method_name }}_endpoint">{{ method_name | upcase }}:</span> {{ path[0] }}</a></li>
{% endfor %}
{% endfor %}
</ul>
<br>
<!-- End list of all endpoints-->
<!-- Begin list of models -->
<h3>All models:</h3>
<ul >
{% for model in site.data.api-swagger.definitions %}
{% capture def %}#/definitions/{{ model[0] }}{%endcapture%}
<li><a href="#{{ def | uri_escape }}">{{def}}</a>
{% endfor %}
</ul>
<!-- End list of models -->
{% for path in site.data.api-swagger.paths %}
{% for m in path[1] %}
{% assign method_name = m[0] %}
{% assign method = m[1] %}
{% capture method_id %}#/paths/{{ path[0] }}/{{method_name}}{% endcapture %}
<div id="{{ method_id }}">
<h2><span class="{{ method_name }}_endpoint">{{ method_name | upcase }}:</span> {{ path[0] }}</h2>
<h3>Description</h3>
<p>{{ method.description | markdownify }}</p>
<!-- Begin Parameter section -->
{% if method.parameters and first %}
<h3>Parameters</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Location</th>
<th>Required</th>
<th>Description</th>
</thead>
<tbody>
{% for p in method.parameters %}
<tr>
<td>{{ p.name }}</td>
<td>{{ p.in }}</td>
<td>{{ p.required }}</td>
<td>{{ p.description }}
{% if p.schema["$ref"] %}
<a href="#{{ p.schema["$ref"] | uri_escape }}">
{{ p.schema["$ref"] }}
</a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
<!-- End Parameter section -->
<!-- Begin Request body section -->
{% for p in method.parameters %}
{% if p.schema != null and first %}
<h3>Request Body</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</thead>
<tbody>
{% for prop in p.schema.properties %}
{% assign objectproperty_name = prop[0] %}
{% assign objectproperty = prop[1] %}
<tr>
<td>{{ objectproperty_name }}
<td>{{ objectproperty.type }}
<td>{{ objectproperty.default }}
<td>{{ objectproperty.description }}
</tr>
{% endfor %}
</tbody>
</table>
<!-- Begin Request body object definition section -->
<!-- Objects -->
<!-- Access Request body object -->
{% for property in p.schema.properties %}
{% assign objectproperty_name = property[0] %}
{% assign objectproperty = property[1] %}
{% endfor %}
<!-- End Request body object definition section -->
{% endif %}
{% endfor %}
<!-- End Request body section -->
<!-- Begin Response section -->
{% if method.responses and first %}
<h3>Most common responses</h3>
<table>
<tbody>
{% for r in method.responses %}
{% assign response_name = r[0] %}
{% assign response = r[1] %}
<tr>
<th>{{ response_name }}
<td>{{ response.description }}
{% if response.schema["$ref"] %}
<a href="#{{ response.schema["$ref"] | uri_escape }}">
{{ response.schema["$ref"] }}
</a>
{% endif %}
{% endfor %}
</tbody>
</table>
{% endif %}
<!-- End Response section -->
<!-- Begin example section -->
{% for endpoint in site.data.endpoint_examples %}
{% capture endpoint_name %}{{ method_name }}{{ path[0] }}{% endcapture %}
{% if endpoint[0] == endpoint_name %}
<h3>Example</h3>
{% for example in endpoint[1] %}
<strong>Request:</strong>
<div class="dynamic-max-height" data-maxheight="132" data-button-more="Show more" data-button-less="Show less">
<div class="dynamic-wrap">
<pre>{{ example.curl_request }}</pre>
</div>
</div>
{% if example.response_information != null or example.json_response != null %}
<strong>Response:</strong>
{% endif %}
{% if example.response_information != null %}
<p>{{ example.response_information }}</p>
{% endif %}
{% if example.json_response != null %}
<div class="dynamic-max-height" data-maxheight="132" data-button-more="Show more" data-button-less="Show less">
<div class="dynamic-wrap">
{% assign json_response = example.json_response %}
<pre>{% include /endpoint_responses/{{json_response}} %}</pre>
</div>
</div>
{% endif%}
{% endfor %}
{% endif %}
{% endfor %}
<!-- End example section -->
</div>
{% endfor %}
{% endfor %}
<h2>Models</h2>
<p>
These contain the type definitions as used by our API.
We do our best to keep our API backwards compatible as long as you use documented features only.
<em>Only use the types and properties documented. Don't use undocument properties you see in the returned JSON as they may be obsoleted properties and/or contain invalid data.</em>
The sample data provided is purely fictional.
</p>
{% for def in site.data.api-swagger.definitions %}
{% assign model_name = def[0] %}
{% assign model_schema = def[1] %}
{% include schema_object.html level=0 prop_name=model_name prop_schema=model_schema %}
{% endfor %}
{% comment %}<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | prepend: site.baseurl }}">via RSS</a></p> {% endcomment %}
</div>