General

Description of the response message content

All API responses are wrapped with a response object. An actual response looks like.

{
  "success": true,
  "result": {
    ...
  },
  "error": null,
  "targetUrl": null,
  "unAuthorizedRequest": false,
  "__abp": true
}

Here’s an overview of the fields:

  • success A boolean value that indicates the status of the operation.
  • result The actual return value. It’s valid if the request was successfully and the server sends a return value.
  • error In the case of a failed request an object that contains a message and details field with the error description.
  • targetUrl This provides a way for the server to redirect the client to another URL if needed.
  • unAuthorizedRequest This provides a method for the server to inform the client that this operation is not authorized or the user is not authenticated.
  • __abp A special signature that is returned. You don’t use this yourself.

Used HTTP status codes

InsuranceManager returns the following HTTP status codes when exceptions occurs:

  • 400 for invalid requests. The details field contains more information why the request was invalid.
  • 401 for unauthenticated requests (User has not logged in and the server-action needs authentication).
  • 403 for unauthorized requests.
  • 404 for requests when the requested data can not be found.
  • 429 for requests when the rate-limit is exceeded.
  • 500 for all other exception types.

Returning errors

As described above, success will be false in the case of an error. A response of a failed request will look like this:

{
  "targetUrl": null,
  "result": null,
  "success": false,
  "error": {
    "message": "An internal error occurred during your request!",
    "details": "..."
  },
  "unAuthorizedRequest": false,
  "__abp": true
}

As you can see, success is false and result is null.

Select request language

You can select the language in which InsuranceManager will return messages. Currently we support the following languages:

  • French – fr
  • Dutch – nl
  • English – en
    (validation and error messages but not all internal translations)
  • German – de
    (validation and error messages but not all internal translations)

To select the language for your request, you can switch between different methods.

  • Query string
    Specify the language using a query string. Example value: “culture=fr&ui-culture=fr”
  • Request Header
    Set the .AspNetCore.Culture or Accept-Language value in the header of the request. Example value: “c=fr|uic=fr”
  • Cookie
    Set .AspNetCore.Culture cookie value. Example value: “c=fr|uic=fr”

Rate limits

There is a rate limit active on the Web-API. If you execute to many request against the Web-API you will be blocked for a certain time.

In this case, you will receive a HTTP 429 status indicating that you have exceeded your limits.

Multitenancy

How to select the tenant

Since all tenant users use the same application, we should have a way of distinguishing the tenant of the current request. The default session implementation uses different approaches to find the tenant related to the current request in this given order:

  1. If the user is logged in, it gets the TenantId from current claims. Claim name is http://www.aspnetboilerplate.com/identity/claims/tenantId and should contain an integer value. If it’s not found in claims then the user is assumed to be a host user.This claim is contained in your bearer token.
  2. If the user has not logged in, then it tries to resolve the TenantId in a given order (first successful resolver ‘wins’):
    1. Request Header
      Set the Abp.TenantId value in the header of the request.
    2. Cookie
      Set Abp.TenantId cookie value.

The available tenants are:

  • 4 for Aedes.
  • 5 for Aedes Vlanderen.

Authentication

Authenticate

You can authenticate a user by an authenticate api call, where you provide a login and password.

After succesfully authentication, a bearer token is send and you need to pass this token to each request. Some requests are not accessible for each login and you get an unauthorized error message.

Paging, filtering and sorting

The most list requests have general request parameters.

Paging

There are 2 parameters to provide by querystring.

  • MaxResultCount integer
    This sets the maximum expected results.
    You can provide 0 to return all items and ignore the MaxResultCount.
  • SkipCount integer
    This sets the number of results to skip.

Sorting

To sort a result set, you can provide by querystring a Sorting parameter.

You should include the sorting field(s) and optionnally a direction (ASC or DESC).
It can contain more than one field separated by comma.

Filtering

To filter a result set, you can provide by querystring a Filter parameter.

The filter is in C# syntax.

Validation

Before executing a request, the incomming data will be validated. The validation process is organized in two steps.

  • Binding validation
    During this step, the Web-API tries to convert the passed data. If a value can’t be converted, you will receive error messages for this.
    For instance, the date 08/10/202O can not be converted because the last caracter is an ‘O’ and not the number 0.
  • Data validation
    During this step, the request content will be validated. If the content is invalid, you will receive error messages for this

Binding validation messages

The following is a list of messages in the supported langues that you can receive if there are binding problems:

  • The value {0} is not valid for ‘{1}’.
    La valeur {0} n’est pas valable pour ‘{1}’.
    De waarde {0} is niet geldig voor ‘{1}’.
    Der Wert {0} ist nicht gültig für ‘{1}’.
  • A value for the ‘{0}’ property was not provided.
    Une valeur pour le champ ‘{0}’ n’a pas été fournie.
    Een waarde voor de “{0}” eigenschap werd niet gegeven.
    Ein Wert für das Feld ‘{0}’ wurde nicht angegeben.
  • A value is required.
    Une valeur est requise.
    Een waarde is vereist.
    Ein Wert ist erforderlich.
  • A non-empty request body is required.
    Un Request-Body non-vides est nécessaire.
    De specificatie van een Request-Body is vereist.
    Die Angabe eines Request-Body’s ist erforderlich.
  • The value {0} is not valid.
    La valeur {0} n’est pas valide.
    De waarde {0} is niet geldig.
    Der Wert {0} ist ungültig.
  • The supplied value is invalid.
    La valeur fournie n’est pas valable.
    De geleverde waarde is ongeldig.
    Der angegebene Wert ist ungültig.
  • The field must be a number.
    Le champ doit être un numéro.
    Het veld moet een nummer zijn.
    Das Feld muss eine Zahl sein.
  • The supplied value is invalid for ‘{0}’.
    La valeur fournie n’est pas valable pour ‘{0}’.
    De geleverde waarde is ongeldig voor ‘{0}’.
    Der angegebene Wert für ‘{0}’ ist ungültig.
  • The value {0} is invalid.
    La valeur {0} n’est pas valide.
    De waarde {0} is ongeldig.
    Der Wert {0} ist ungültig.
  • The field ‘{0}’ must be a number.
    Le champ ‘{0}’ doit être un nombre.
    Het veld ‘{0}’ moet een getal zijn.
    Das Feld ‘{0}’ muss eine Zahl sein.
  • The value {0} is invalid.
    La valeur {0} n’est pas valide.
    De waarde {0} is niet geldig.
    Der Wert {0} ist ungültig.

Data validation messages

The following is a list of messages in the supported langues that you can receive if there are data validation problems:

  • ‘{PropertyName}’ is not a valid email address.
    ‘{PropertyName}’ n’est pas une adresse email valide.
    ‘{PropertyName}’ is geen geldig email adres.
    ‘{PropertyName}’ ist keine gültige E-Mail-Adresse.
  • ‘{PropertyName}’ must be greater than or equal to ‘{ComparisonValue}’.
    ‘{PropertyName}’ doit être plus grand ou égal à ‘{ComparisonValue}’.
    ‘{PropertyName}’ moet meer dan of gelijk zijn aan ‘{ComparisonValue}’.
    Der Wert von ‘{PropertyName}’ muss grösser oder gleich ‘{ComparisonValue}’ sein.
  • ‘{PropertyName}’ must be greater than ‘{ComparisonValue}’.
    ‘{PropertyName}’ doit être plus grand que ‘{ComparisonValue}’.
    ‘{PropertyName}’ moet groter zijn dan ‘{ComparisonValue}’.
    Der Wert von ‘{PropertyName}’ muss grösser sein als ‘{ComparisonValue}’.
  • ‘{PropertyName}’ must be between {MinLength} and {MaxLength} characters. You entered {TotalLength} characters.
    ‘{PropertyName}’ doit contenir entre {MinLength} et {MaxLength} caractères. {TotalLength} caractères ont été saisis.
    De lengte van ‘{PropertyName}’ moet tussen {MinLength} en {MaxLength} karakters zijn. Er zijn {TotalLength} karakters ingevoerd.
    Die Länge von ‘{PropertyName}’ muss zwischen {MinLength} und {MaxLength} Zeichen liegen. Es wurden {TotalLength} Zeichen eingetragen.
  • The length of ‘{PropertyName}’ must be at least {MinLength} characters. You entered {TotalLength} characters.
    ‘{PropertyName}’ doit être supérieur ou égal à {MinLength} caractères. Vous avez saisi {TotalLength} caractères.
    De lengte van ‘{PropertyName}’ moet groter zijn dan of gelijk aan {MinLength} tekens. U hebt {TotalLength} -tekens ingevoerd.
    Die Länge von ‘{PropertyName}’ muss größer oder gleich {MinLength} sein. Sie haben {TotalLength} Zeichen eingegeben.
  • The length of ‘{PropertyName}’ must be {MaxLength} characters or fewer. You entered {TotalLength} characters.
    ‘{PropertyName}’ doit être inférieur ou égal à {MaxLength} caractères. Vous avez saisi {TotalLength} caractères.
    De lengte van ‘{PropertyName}’ moet kleiner zijn dan of gelijk aan {MaxLength} tekens. U hebt {TotalLength} -tekens ingevoerd.
    Die Länge von ‘{PropertyName}’ muss kleiner oder gleich {MaxLength} sein. Sie haben {TotalLength} Zeichen eingegeben.
  • ‘{PropertyName}’ must be less than or equal to ‘{ComparisonValue}’.
    ‘{PropertyName}’ doit être plus petit ou égal à ‘{ComparisonValue}’.
    ‘{PropertyName}’ moet minder dan of gelijk zijn aan ‘{ComparisonValue}’.
    Der Wert von ‘{PropertyName}’ muss kleiner oder gleich ‘{ComparisonValue}’ sein.
  • ‘{PropertyName}’ must be less than ‘{ComparisonValue}’.
    ‘{PropertyName}’ doit être plus petit que ‘{ComparisonValue}’.
    ‘{PropertyName}’ moet minder zijn dan ‘{ComparisonValue}’.
    Der Wert von ‘{PropertyName}’ muss kleiner sein als ‘{ComparisonValue}’.
  • ‘{PropertyName}’ must not be empty.
    ‘{PropertyName}’ ne doit pas être vide.
    ‘{PropertyName}’ mag niet leeg zijn.
    ‘{PropertyName}’ darf nicht leer sein.
  • ‘{PropertyName}’ must not be equal to ‘{ComparisonValue}’.
    ‘{PropertyName}’ ne doit pas être égal à ‘{ComparisonValue}’.
    ‘{PropertyName}’ moet anders zijn dan ‘{ComparisonValue}’.
    ‘{PropertyName}’ darf nicht ‘{ComparisonValue}’ sein.
  • ‘{PropertyName}’ must not be empty.
    ‘{PropertyName}’ ne doit pas avoir la valeur null.
    ‘{PropertyName}’ mag niet leeg zijn.
    ‘{PropertyName}’ darf kein Nullwert sein.
  • The specified condition was not met for ‘{PropertyName}’.
    ‘{PropertyName}’ ne respecte pas la condition fixée.
    ‘{PropertyName}’ voldoet niet aan de vereisten.
    Der Wert von ‘{PropertyName}’ entspricht nicht der festgelegten Bedingung.
  • The specified condition was not met for ‘{PropertyName}’.
    ‘{PropertyName}’ ne respecte pas la condition fixée.
    ‘{PropertyName}’ voldoet niet aan de vereisten.
    Der Wert von ‘{PropertyName}’ entspricht nicht der festgelegten Bedingung.
  • ‘{PropertyName}’ is not in the correct format.
    ‘{PropertyName}’ n’a pas le bon format.
    ‘{PropertyName}’ voldoet niet aan het verwachte formaat.
    ‘{PropertyName}’ weist ein ungültiges Format auf.
  • ‘{PropertyName}’ must be equal to ‘{ComparisonValue}’.
    ‘{PropertyName}’ doit être égal à ‘{ComparisonValue}’.
    ‘{PropertyName}’ moet gelijk zijn aan ‘{ComparisonValue}’.
    ‘{PropertyName}’ muss gleich ‘{ComparisonValue}’ sein.
  • ‘{PropertyName}’ must be {MaxLength} characters in length. You entered {TotalLength} characters.
    ‘{PropertyName}’ doit être d’une longueur de {MaxLength} caractères. {TotalLength} caractères ont été saisis.
    De lengte van ‘{PropertyName}’ moet {MaxLength} karakters zijn. Er zijn {TotalLength} karakters ingevoerd.
    ‘{PropertyName}’ muss genau {MaxLength} lang sein. Es wurden {TotalLength} eingegeben.
  • ‘{PropertyName}’ must be between {From} and {To}. You entered {Value}.
    ‘{PropertyName}’ doit être entre {From} et {To}. Vous avez saisi {Value}.
    ‘{PropertyName}’ moet tussen {From} en {To} liggen. Je hebt ingevuld {Value}.
    ‘{PropertyName}’ muss zwischen {From} and {To} sein. Es wurde {Value} eingegeben.
  • ‘{PropertyName}’ must be between {From} and {To} (exclusive). You entered {Value}.
    ‘{PropertyName}’ doit être entre {From} et {To} (exclusif). Vous avez saisi {Value}.
    ‘{PropertyName}’ moet na {From} komen en voor {To} liggen. Je hebt ingevuld {Value}.
    ‘{PropertyName}’ muss zwischen {From} und {To} sein (exklusiv). Es wurde {Value} eingegeben.
  • ‘{PropertyName}’ is not a valid credit card number.
    ‘{PropertyName}’ n’est pas un numéro de carte de crédit valide.
    ‘{PropertyName}’ is geen geldig credit card nummer.
    ‘{PropertyName}’ ist keine gültige Kreditkartennummer.
  • ‘{PropertyName}’ must not be more than {ExpectedPrecision} digits in total, with allowance for {ExpectedScale} decimals. {Digits} digits and {ActualScale} decimals were found.
    ‘{PropertyName}’ ne doit pas dépasser {ExpectedPrecision} chiffres au total, avec une tolérance pour les décimales {ExpectedScale}. Les chiffres {Digits} et les décimales {ActualScale} ont été trouvés.
    ‘{PropertyName}’ mag in totaal niet meer dan {ExpectedPrecision} decimalen nauwkeurig zijn, met een grote van {ExpectedScale} gehele getallen. Er zijn {Digits} decimalen en een grote van {ActualScale} gehele getallen gevonden.
    ‘{PropertyName}’ darf insgesamt nicht mehr als {ExpectedPrecision} Ziffern enthalten, mit Berücksichtigung von {ExpectedScale} Dezimalstellen. Es wurden {Digits} Ziffern und {ActualScale} Dezimalstellen gefunden.
  • ‘{PropertyName}’ must be empty.
    ‘{PropertyName}’ devrait être vide.
    ‘{PropertyName}’ hoort leeg te zijn.
    ‘{PropertyName}’ sollte leer sein.
  • ‘{PropertyName}’ must be empty.
    ‘{PropertyName}’ devrait être vide.
    ‘{PropertyName}’ moet leeg zijn.
    ‘{PropertyName}’ sollte leer sein.
  • ‘{PropertyName}’ has a range of values which does not include ‘{PropertyValue}’.
    ‘{PropertyName}’ a une plage de valeurs qui n’inclut pas ‘{PropertyValue}’.
    ‘{PropertyValue}’ komt niet voor in het bereik van ‘{PropertyName}’.
    ‘{PropertyName}’ hat einen Wertebereich, der ‘{PropertyValue}’ nicht enthält.
  • ‘{PropertyName}’ must be between {MinLength} and {MaxLength} characters.
    ‘{PropertyName}’ doit contenir entre {MinLength} et {MaxLength} caractères.
    De lengte van ‘{PropertyName}’ moet tussen {MinLength} en {MaxLength} karakters zijn.
    Die Länge von ‘{PropertyName}’ muss zwischen {MinLength} und {MaxLength} Zeichen liegen.
  • The length of ‘{PropertyName}’ must be at least {MinLength} characters.
    ‘{PropertyName}’ doit être supérieur ou égal à {MinLength} caractères.
    De lengte van ‘{PropertyName}’ moet groter zijn dan of gelijk aan {MinLength} tekens.
    Die Länge von ‘{PropertyName}’ muss größer oder gleich {MinLength} sein.
  • The length of ‘{PropertyName}’ must be {MaxLength} characters or fewer.
    ‘{PropertyName}’ doit être inférieur ou égal à {MaxLength} caractères.
    De lengte van ‘{PropertyName}’ moet kleiner zijn dan of gelijk aan {MaxLength} tekens.
    Die Länge von ‘{PropertyName}’ muss kleiner oder gleich {MaxLength} sein.
  • ‘{PropertyName}’ must be {MaxLength} characters in length.
    ‘{PropertyName}’ doit être d’une longueur de {MaxLength} caractères.
    De lengte van ‘{PropertyName}’ moet {MaxLength} karakters zijn.
    ‘{PropertyName}’ muss genau {MaxLength} lang sein.
  • ‘{PropertyName}’ must be between {From} and {To}.
    ‘{PropertyName}’ doit être entre {From} et {To}.
    ‘{PropertyName}’ moet tussen {From} en {To} liggen.
    ‘{PropertyName}’ muss zwischen {From} and {To} sein.
  • ‘{PropertyName}’ contains a non-existing reference identifier.
    ‘{PropertyName}’ contient un identifiant de référence inexistant.
    ‘{PropertyName}’ bevat een niet-bestaande referentie-identificatiecode.
    ‘{PropertyName}’ enthält einen nicht existierenden Referenzidentifikator.
  • ‘{PropertyName}’ collection can’t contain multiple items of same type.
    La collection ‘{PropertyName}’ ne peut pas contenir plusieurs éléments du même type.
    De ‘{PropertyName}’ collectie kan niet meerdere items van hetzelfde type bevatten.
    Die Auflistung ‘{PropertyName}’ kann nicht mehrere Einträge desselben Typs enthalten.
  • ‘{PropertyName}’ collection should have one item of type ‘{TypeNameValue}’.
    La collection ‘{PropertyName}’ doit contenir un élément du type ‘{TypeNameValue}’.
    De ‘{PropertyName}’ collectie moet één item van het type ‘{TypeNameValue}’ hebben.
    Die Auflistung ‘{PropertyName}’ sollte einen Eintrag des Typs ‘{TypeNameValue}’ enthalten.
  • The value of ‘{PropertyName}’ is not allowed in the current situation.
    La valeur de ‘{PropertyName}’ n’est pas autorisée dans la situation actuelle.
    De waarde van ‘{PropertyName}’ is niet toegestaan in de actuele situatie.
    Der Wert von ‘{PropertyName}’ ist in der aktuellen Situation nicht zulässing.
  • The object referenced by ‘{PropertyName}’ is in a state where the operation is not allowed.
    L’objet référencé par ‘{PropertyName}’ est dans un état où l’opération n’est pas autorisée.
    Het object waarnaar wordt verwezen door ‘{PropertyName}’ bevindt zich in een toestand waarin de bewerking niet is toegestaan.
    Das Objekt, auf das von ‘{PropertyName}’ verwiesen wird, befindet sich in einem Zustand, in dem der Vorgang nicht zulässig ist.

Common concepts

Lists

Lookups