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.

To get started, contact us to get our API domain to which you should direct your requests, your API username {USER_ID} and token {USER_PASSWORD}. 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 30mins to make sure no one misuses your token.

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
username {USER_ID} The username for login Use your 13-digit ID
password {USER_PASSWORD} The password for login Use the token we provide

Request:

curl --request POST 'https://{domain}/token' \
     -d "grant_type=password&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...",
  "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}/reports/deadlines' \
     --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:

[
    {
        "name": "Yearly Battery Report",
        ...
    }
]

Incorrect token If the token is incorrect, you will receive a status 401 and a response body like this:

{
    "detail": "Could not validate credentials"
}

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. SettingsPage

The settings page submodule allows you to configure the labels necessary for managing your category lists and order data. Tailor multiple profiles to accommodate different data sources and settings specific to each country. It's an essential starting point for ensuring that your data uploads align with your operational requirements.

2. 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.

3. DataLive

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.

4. DataUpload

For users who prefer not to establish a live connection, we provide tools to upload order data via CSV or XLSX files. It's a straightforward method for periodic data submission. Note that combining live data and uploaded data in reports currently requires separate profiles for each type.

5. 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.

6. 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.

7. 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.