The SESAR webhook notifies your system when a file has been received and processed. It relies on an HTTP request containing a structured object and must be configured correctly to ensure seamless integration with your environment.
When a file is uploaded via SESAR, it sends a notification (a "hook") to an address you have defined. This notification contains an encrypted object, which must be received, decrypted, and processed by your service.
The webhook expects a POST request with the following content :
{
"args": {
"CryptedObject": "...",
"HashKey": "..."
}
}
CryptedObject : the manifest encrypted in base64.
HashKey : the SHA512 of the public key used for encryption, also in base64.
This content is sent with the header Content-Type: application/json .
[WebMethod]
[ScriptMethod(UseHttpGet = false, ResponseFormat = ResponseFormat.Json)]
public void SESARHook(SesarWebHook args)
{
// Traitement ici
}
[HttpPost]
public string SESARHook([FromBody] HookArgs SEManifest)
{
var crypted = SEManifest.args.CryptedObject;
var hash = SEManifest.args.HashKey;
// Traitement ici
return "OK";
}
public class HookArgs
{
public SesarWebHook args { get; set; }
}
public class SesarWebHook
{
public string CryptedObject { get; set; }
public string HashKey { get; set; }
}
CryptedObjectTo decrypt the received object (StoreManifest), use the Secure Exchanges SDK as follows:
var jsonObject = CryptoHelper.DecryptStringFromBytes(
Convert.FromBase64String(cryptedObject),
Convert.FromBase64String(base64Key),
Convert.FromBase64String(base64Iv)
);
StoreManifest manifest = SerializationHelper.DeserializeFromJson<StoreManifest>(jsonObject);
base64Key : the 256-bit AES key used for encryption.
base64Iv : the 128-bit initialization vector (IV) .
These two values must be protected in your environment.
The following elements are crucial for the proper functioning of your webhook:
WebHookKey : 256-bit AES key (generable via SECT Tools).
WebHookIv : IV 128 bits (also generateable via SECT Tools).
These values are used to encrypt/decrypt StoreManifests.

.sesar file specific to your configuration. This file must not be moved .Your webhook URL must follow this format:
https://[adresse_serveur]/[endpoint]/[methode]
For example :
https://localhost/Test.asmx/SESARHook
The webhook is called every 30 seconds if files are available.
An HTTP 200 code means that the processing was successful.
If the webhook fails or returns another code, it will be retried.
The response waiting timeout is 5 minutes .