Introduction
Rate limits
API access is rate limited per API token. The default setting is 30 requests
per minute. Your current setting can be read from each API response header
X-RateLimit-Limit
.
Every response contains the HTTP header X-RateLimit-Remaining
which
will be 0 when your quota is reached. Use X-RateLimit-Reset
to get the
timestamp when one new API request can be made.
Code samples
HTTP/1.1 200 OK
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 1
HTTP/1.1 200 OK
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 0
X-RateLimit-Reset: Wed, 11 Mar 2020 20:48:07 +0200
Some GET endpoints supports pagination. They are by default limited to 10
items per response. Every paginated response will contain Link
headers
with URL:s to next and previous pages.
Code samples
HTTP/1.1 200 OK
Link: <https://app.fastsign.se/api/contracts?page=eyJwYWdlIjoxLCJwYWdlX3NpemUiOjEwfQ%3D%3D>;rel="previous"
Link: <https://app.fastsign.se/api/contracts?page=eyJwYWdlIjoyLCJwYWdlX3NpemUiOjEwfQ%3D%3D>;rel="next"
Pagination-Page: 2
Pagination-Items-Total: 205
Pagination-Num-Pages: 11
Sorting
Some GET endpoints supports sorting of collections. You can set the sorting by
the sort
query parameter. The value is a comma separated list of properties.
The default sorting direction is ascending. Select descending for a property
by prefix a minus sign.
?sort=name,-created_time
Authentication
Every API request must be authenticated with the Authorization
HTTP header.
The value of this header must be string token
succeeded with your API key.
Your API key consists of public_id:secret_key
.
Code samples
GET https://app.fastsign.se/api/ HTTP/1.1
Host: app.fastsign.se
Accept: application/json
Accept-Api-Version: 1
Authorization: token {public_id}:{secret_key}
User authentication
Some API request requires an extra HTTP header Api-User-Uri
for impersonating
the author of the resource.
Code samples
GET https://app.fastsign.se/api/ HTTP/1.1
Host: app.fastsign.se
Accept: application/json
Accept-Api-Version: 1
Authorization: token {token}
Api-User-Uri: /api/users/{user_id}
Posting data
This API accepts both JSON and URL encoded form data in request bodies with
POST
or PUT
.
Supported content types
-
application/json
-
application/x-www-form-urlencoded
Malformed JSON
Sending a malformed JSON body with content type application/json
will
result in a JsonProblemResponse
and HTTP status code 400.