Introduction
The FastSign API are split in two sections, one for customers and one for
partners.
The customer API contains endpoints for creating and sending contracts.
The partner API is used for administrating customers and their subscriptions and API tokens.
Customer API: quick guide
Use the following steps to implement basic functionality of sending a contract:
- Create the contract by uploading PDF file
- Set a name of the contract
or else the name will be empty!
- Create the contract parties
- Send the contract
The FastSign system will send an e-mail or SMS to all contract parties.
- Periodically check if the contract has been signed
- Download the signed PDF
An e-mail or SMS will also be sent to all parties with a download link.
Partner API: quick guide
Use the following steps to implement basic functionality of creating a new customer:
- Create a customer
An administrative user is automatically created the same time a customer is created.
- Create a subscription for that customer
For the sandbox, use product
/api/products/13.
Your sales contact will give you the correct product for production.
- List all users for that customer to get the ID of administrative user
Store that ID for later use when
Api-User-Uri header is required.
- Optional: Upload customer logotype
- Create an API token for customer
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 /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 /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.