Sign in ☰Integrating With the Resail REST API — Quick Start Tutorial
This tutorial will guide you through a simple end-to-end integration with the Resail API. In just a few steps, you’ll authenticate, search for products, and retrieve stock and price information. The API is designed to be straightforward and developer-oriented, so you can plug it into your application with minimal effort.
1. Obtain an Access Token
Resail uses an OAuth-based authentication flow.
To start, you need your client ID and client secret, which are provided when your application is registered.
You will exchange these credentials for an access token using Resail’s authentication server.
Example (pseudo-request):
POST https://<auth-server>/connect/token
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials
client_id=YOUR_CLIENT_ID
client_secret=YOUR_CLIENT_SECRET
Successful response:
{
"access_token": "eyJhbGciOiJIUzI1...",
"token_type": "Bearer",
"expires_in": 3600
}
You will use this token in the Authorization: Bearer header for all API calls.
2. Build Your API Request
Every request to the Resail API must include:
The Bearer access token
Your subscription code (provided separately)
Example header structure:
Authorization: Bearer <your_access_token> Ocp-Apim-Subscription-Key: <your_subscription_code>These two elements are required for all endpoints.
3. Search for Products
To look up products, call the /search endpoint:
GET https://resailapi2.azure-api.net/customer/api/v1/search?request={request}[&page][&size]requestcontains your search parameters (SKU, keyword, etc.)page(optional) defines the result pagesize(optional) defines the number of records per page
Example Product Response Structure
A search request returns a list of product objects, each following this schema:
{"sku": "70542790","rexelPartNumber": "BIZ350012","manufacturer": { ... },"ean": "ean","brand": { ... },"name": "BiProduct","description": { ... },"units": { ... },"quantity": { ... },"webshopUrl": "https://sampleWebshopurl.com"}
Each object provides identifiers, brand and manufacturer details, descriptions, packaging units, and a link to the product in the webshop.
4. Retrieve Stock and Price Information
Once you have the list of products, you can request detailed stock and pricing using the /product endpoint:
GET https://resailapi2.azure-api.net/customer/api/v1/product?request={request}The request parameter should contain the product identifiers returned from the search step (e.g., SKU or Rexel part number).
The response includes availability, stock levels, and corresponding price information.
Need Help?
If you run into issues or have questions about authentication, request parameters, or API behavior, feel free to contact our support team. We’re here to assist you with your integration.