ForSURE
ForSURE API Documentation
Welcome to the ForSURE API documentation! This guide is designed to provide all the necessary information you need to integrate your systems with our suite of services. Whether you're looking to fetch data or send it to our platform, you'll find detailed instructions and support to make your integration seamless and efficient.
This documentation includes comprehensive details about each endpoint, including methods, request parameters, response objects, and examples. Our aim is to ensure that you have a smooth experience as you connect and create with ForSURE.
This API is designed to complement the capabilities of our website, available at https://for-sure.net. We encourage you to leverage both our API and the front-end interface according to your needs. Whether you are sending requests programmatically or prefer to interact with our user-friendly frontend, our platform is flexible enough to accommodate your preferred methods of engagement.
Authentication
Our SaaS uses OAuth 2.0 for securing the requests.
You will need the domain, API username {USER_ID} and token {API_TOKEN}. To get these, either contact us or add an API Token at: https://for-sure.net/pages/forsure-configuration
You need these to send the following request for getting your access token.
Your access token is required to send requests to us and will expire every 5 minutes to make sure no one misuses your token. When retrieving your access_token, you will also get a refresh token, that can be used to get a new access_token. This refresh token is valid for 30 minutes.
Generate access token
- URL:
/token - Method:
POST - Content-Type:
application/x-www-form-urlencoded - Body:
| Parameter | Value | Description | Constraints |
|---|---|---|---|
grant_type |
password | Specifies the type of request | Must be password |
client_id |
API | The client ID | Must be API |
client_secret |
{CLIENT_SECRET} | The secret for the client | Must be the provided secret |
username |
{USER_ID} | The username for login | Use your 13-digit ID |
password |
{API_TOKEN} | The API Token for login | Use the token we provide |
Request:
curl --request POST "https://{domain}/realms/ForSURE/protocol/openid-connect/token" \
-d "grant_type=password&client_id=API&client_secret={CLIENT_SECRET}&username={USER_ID}&password={USER_PASSWORD}"
API response
Successful response
If the request was successful you should receive the status code 200 and
a response body like this:
{
"access_token": "eY...",
"refresh_token": "eY...",
"token_type": "bearer"
}
Refreshing token
When the access token is expired, you can use the refresh token to get a new token. The refresh token is valid for 30 minutes, so it is a good idea to regularly refresh it. Once the refresh token is expired, you have to request a new access token.
- URL:
/token - Method:
POST - Content-Type:
application/x-www-form-urlencoded - Body:
| Parameter | Value | Description | Constraints |
|---|---|---|---|
grant_type |
refresh_token | Specifies the type of request | Must be refresh_token |
refresh_token |
{refresh_token} | The refresh token | Use refresh_token |
client_id |
API | The client ID | Must be API |
Request:
curl --request POST "https://{domain}/realms/ForSURE/protocol/openid-connect/token" \
-d "grant_type=refresh_token&client_id=API&refresh_token={refresh_token}"
API response
Successful response
If the request was successful you should receive the status code 200 and
a response body like this:
{
"access_token": "eY...",
"refresh_token": "eY...",
"token_type": "bearer"
}
Use access token
Once you have generated an access token as described above, you need to use it in the header of every request you send as follows:
curl --location --request GET "https://{domain}/saas/nav/notifications" \
--header 'Authorization: Bearer ey...'
API response
Successful response
If the request was successful you should receive the status code 200 and
a response body like this:
[
{
"title": "Data Deviation Issue",
"user": "Test user B.V",
"date_of_notification": "2025-02-26T00:17:12",
"resolved": false,
"id": 24,
"owner": "",
"type_of_report": "WEEE NL",
"error_message": "The WEEE report associated with Test user B.V. for the year 2024 could not be submitted because a reason for the data deviation related to \"E4/22 Measuring and control appliances (> 50 cm)\" is required.",
"allow_custom_resolution": true
},
]
Incorrect token
If the token is incorrect, you will receive a status 401 and
a response body like this:
{
"detail": "Could not validate credentials"
}
Invalid rights
If you don't have permissions to an endpoint, you will receive a status 403 and
a response body like this:
{
"detail": "Insufficient permissions"
}
No token
If you forget to send a token, you will receive a status 401 and
a response body like this:
{
"detail": "Not authenticated"
}
Overview
On the left-hand side of the documentation, you will find various submodules listed. We recommend progressing through these submodules in the order presented. This structured approach is designed because certain operations and requests might need to be completed before others can be initiated effectively. Following this sequence will ensure that you build a solid foundation of understanding and setup, enabling a smoother integration process.
1. CategoryList
Manage your product listings through the category list. It enables you to upload, edit, and delete entries in your category list, which encompasses all the products you sell. This functionality ensures that your product data remains up-to-date and accurate.
2. Orders
Establish a live connection to your ERP system or online store using the dataLive submodule. This direct link allows for real-time data communication. Alternatively, you can opt to send a list of orders directly to our platform, offering flexibility in how you connect and transmit data.
3. Reports
Generate reports for different countries and EPR categories. Additionally, access a list of upcoming deadlines for the countries you operate in, helping you stay compliant and informed.
4. Web
Access and manage the reports you have created or those automatically generated by the system. The web submodule offers options to download reports as XLSX files or retrieve data directly. You can also create shareable links for your reports, enhancing collaboration and accessibility.
5. StatisticsPage
Dive deeper into your data with our statistics. It allows you to retrieve aggregated data for specific columns from your order or category list. Use filters to narrow down by timeframe, country, or specific order IDs, providing tailored insights into your operational metrics.
Final Thoughts
Thank you for exploring the ForSURE API documentation. We've designed this guide to provide you with all the tools and information needed to successfully integrate and make the most of our services. As you begin implementing and utilizing the API, we encourage you to delve deeper into each submodule to fully understand and leverage their capabilities.
If you have any questions or encounter any issues, please don't hesitate to contact us at info@for-sure.net. We're here to assist you and ensure a seamless experience with our services.
We value your feedback to continuously improve our API and documentation. Please let us know your thoughts and suggestions by contacting us or submitting feedback through our portal.