Legacy API Migration Guide
End-points and other instruction for successful API migration
API migration guide
If you used our previous Legacy API and you want to migrate to current version there are several differences in:
- authentication,
- URL endpoints
- document inner structure
Authentication
Most important change in the API is completely different authentication method.
Our Legacy API used difficult and confusing non-standard way of signing your API requests. In current API v1 we decided to use industry-standard JWT tokens, which are widely supported in most programming languages and frameworks.
More about authentication can be found in Authentication section of this documentation.
URL endpoints
We renamed some endpoints that used confusing or not up-to-date terminology. Because of the new authentication method used it is unnecessary to have timestamp parameter as a part of URL anymore. All changes in URL endpoints are listed in the table below.
Method | Old Legacy API | Current API v1 |
---|---|---|
GET | /agreement/{timestamp} | /template-suite |
GET | /agreement-template/{timestamp} | /advanced-style |
GET | /currency/{timestamp} | /currency |
GET | /department/{timestamp} | /user-group |
POST | /department/{timestamp} | /user-group |
PUT | /department/{departmentId}/{timestamp} | /user-group/{userGroupId} |
DELETE | /department/{departmentId}/{timestamp} | /user-group/{userGroupId} |
POST | /department/user/{departmentId}/{timestamp} | /user-group/user/{userGroupId} |
DELETE | /department/user/{departmentId}/{userId}{userEmail}/{timestamp} | /user-group/user/{userGroupId}/{userIdOrEmail} |
GET | /document/{timestamp} | /document-record |
PUT | /document/{code}/{timestamp} | /document-record/{code} |
DELETE | /document/{code}/{timestamp} | /document-record/{code} |
GET | /document/data/{code}/{timestamp} | /document-version/data/{code} |
PUT | /document/data/{code}/{timestamp} | /document-version/data/{code} |
GET | /document/data/{code}/tree/{timestamp} | Deleted |
POST | /document/data/{agreementId}/{timestamp} | /document-version/data/{templateSuiteId} |
GET | /document/download/{code}/{format}/{documentId}/{templateId}/{timestamp} | /document-version/download/{code}/{format} |
GET | /group/{timestamp} | /category |
GET | /info/{timestamp} | /info |
GET | /law/{timestamp} | /country |
GET | /share/{code}/{timestamp} | /share/{code} |
POST | /share/user/{code}/{timestamp} | /share/user/{code} |
DELETE | /share/user/{code}/{userId}{userEmail}/{timestamp} | /share/user/{code}/{userIdOrEmail} |
POST | /share/department/{code}/{timestamp} | /share/user-group/{code} |
DELETE | /share/department/{code}/{departmentId}/{timestamp} | /share/user-group/{code}/{userGroupId} |
GET | /timezone/{timestamp} | /timezone |
GET | /user/{timestamp} | /user/ |
POST | /user/{timestamp} | /user/ |
PUT | /user/{id}{email}/{timestamp} | /user/{userIdOrEmail} |
DELETE | /user/{id}{email}/{timestamp} | /user/{userIdOrEmail} |
GET | /user/permission/{id}{email}/{timestamp} | /user/permission/{userIdOrEmail} |
PUT | /user/permission/{id}{email}/{timestamp} | /user/permission/{userIdOrEmail} |
Document inner structure
In last version of Legito we completely redeveloped inner structure of saving of document records and document versions. New structure significantly improved performance, made everything much clearer, robust and is future-proof.
Main concept was to separate document records and document versions to different entities. Current API reflects this concept.