Introduction to the REST API
Scope
The ilink REST API allows programmatic control of the main document operations available on the ilink platform, facilitating integration with external systems.
ilink supports two main integration flows: document receiving and issuing, with the corresponding reporting of document states. You may implement both flows or only one, depending on your software requirements.
Prerequisites
To integrate via the API, you must first contact our team (apoio@ilink.pt) o request access to the test/quality environment.
The provided access includes:
- A platform token, which identifies the system/platform accessing the webservice
- A public key, which identifies the customer/TIN requesting access to the webservice
This means that each customer wishing to issue or receive documents must be pre-registered with our team so that their public key can be generated. The platform token is unique to the system being integrated (shared by all clients using that system) and must be used in all API calls.
For test access, 2 customers/TINs are also provided, along with their respective credentials for accessing the ilink portal. You should use these entities to perform document transactions between them and optionally access the portal to consult the documents. The assigned TINs may be changed if necessary.
Note: New access credentials (platform token and public key per TIN) will be provided upon deployment to production.
Technical Notes
- The webservice follows the REST architecture
- HTTP status codes returned comply with RFC 7231
- All data sent (including XML attachments) must be encoded in UTF-8. Formats such as ANSI, UTF-8 BOM, and ISO 8859-1 should be avoided to ensure compatibility with all recipient systems
- Responses (payloads) are returned in JSON format
- ilink servers operate exclusively via HTTPS, com versão TLS 1.2 (or communication issues, see possible solutions for Java and C#)
- The Swagger specification and demo client are available here
Environments and important considerations
- There are 2 distinct environments, with different base URLs and usage conditions:
| Environment | Base URL |
|---|---|
| Testing/QA | https://ilink.acin.pt/ilinktests-api/api/v1/pt |
| Production | https://ilink.pt/ilink-api/api/v1/pt |
- The testing environment is only available in Portugal and Spain.
- The production environment provides a global availability SLA of 99.90%, in accordance with our terms of service.
- There is a usage limit of 200 requests/minute. After exceeding this limit, the software is blocked for 2 minutes.
Note: The documents issued and received through the API can be consulted in the ilink test portal using the credentials provided.