Get started with the Genero APIs
Genero Solutions offers two APIs for its tenants to be used either by the tenant itself or by a third party acting on behalf of the tenant.
Provisioning the Genero APIs
Provisioning of the Genero APIs is made by Genero upon request of a Genero tenant. Genero sends the tenant a clientid and secret. The tenant can then choose to send the clientid and secret to a trusted party. For example:
- A provider of customer data working on behalf of a Genero tenant who will use Public API to update the tenants Genero database
- A provider of business intelligence reports working on behalf of the Genero tenant who will extract data from the tenants Genero database by using the Genero Data Warehouse API
You as a Genero tenant own your data at Genero. You need to agree with the trusted party on how to manage your data. Please reach out to your contact person at Genero, or to our help desk, if you have any questions or want to request access to either API.
Clientid and tenant agency
Genero can provide a clientid with either single tenant agency or multitenant agency. A clientid with singe tenant agency can only provide access to one Genero tenant. A client with multi tenant agency can be used to access multiple Genero tenants.
Authorizing and using the Genero APIs
Follow the links above to each API to get specific information about the usage. Note! Apart from the limitations of token usage below, each API may have additional codes of conducts and limitations. Reach out to your contact person at Genero, or to our help desk, to get more information.
Access token
The Genero APIs uses Oauth2 with grant type client credentials. To call either API you need to use your clientid and secret to aquire an access token. The access token should then be added to each call using the authorization header with the Bearer scheme.
The life span of an access token is 30 days. You are allowed to fetch max 5 daily and 150 per month. We strongly recommend that you create a token and re use it for all calls until it expires and fetch a new access token only when needed.
- Public API
- api-audience = https://prod.generosales.com/api
- api-scope = manage:customers (other scopes may apply depending on usage, see details for the API for more info)
- Data Warehouse API
- api-audience = https://prod.generosales.com/api/externalschema
- api.scope = read:externalschema
Example for retrieving access token:
POST https://generosales.eu.auth0.com/oauth/token
Body:
{
"client_id": "your-client-id",
"client_secret": "your-client-secret",
"audience": "api-audience",
"scope": "api-scope",
"grant_type": "client_credentials"
}
Upon successful call, the access token is received in JWT format:
{
"access_token": "your-access-token",
"scope": "api-scope",
"expires_in": 2592000,
"token_type": "Bearer"
}
Add the header Authorization with the value 'Bearer your-access-token' in each subsequent call.