Pricing API
This API is used for policy pricing, creation and resolution.
Last updated
This API is used for policy pricing, creation and resolution.
Last updated
You should have received a partner-specific URL and credentials to use this API. If you didn't, please contact our support team to set up the required services and credentials.
For policy creation and resolution the body of the request must be signed.
There's two options available for signing:
Symmetric: a shared secret will be provided and it has to be used to compute an hmac digest. The digest must be sent in the X-Ensuro-Signature
of the request.
Asymmetric: An authorized ethereum account is used to sign the body of the message. This method is safer because only the partner has access to the private key and it does not need to be sent over the internet ever. The signature is computed following the EIP191 standard. It must be sent in the X-EIP191-Signature
header of the request.
Only one of the methods must be used, and "Asymmetric" is the preferred one.
See our samples repository for a js example of how to use each one.
Unsigned
{"internal_id":"ac3b3fe475","arrival":"2022-10-12T14:36:07.00Z","channel":"website","departure":"2022-10-12T11:36:07.00Z"}
2022-10-27T21:36:07.211025Z
190.25
EIP-191 signature of the body digest (SHA256 of the body, without leading '0x'). The signature must be made by an authorized signer. Signature format: r+s+v in hexadecimal. Example: "0xc9a9d2e9ebf6a9930705c4517ff7ae6aa91a4799df8f87189488e1f1396080c76cbeb698c047af21ee94d2c5bb89f72a56fb70ac58f1c2b7245e9d2b400c243f1b"
This is the preferred signing method. Only one of X-EIP191-Signature or X-Ensuro-Signature must be provided.
HMAC-SHA256 signature of the body, using the shared secret provided. The signature must be in hexadecimal, without including the leading "0x", for example: "41deed7140512b0d351a588d05bff44dfdc58a6a038b47edf4f5e944dd1185d6" will be the signature for body '{"foo":"bar"}' and secret 'topsecret'.
This method is not recommended, use X-EIP191-Signature whenever possible. Only one of X-EIP191-Signature or X-Ensuro-Signature must be provided.
{"internal_id":"ac3b3fe475","arrival":"2022-10-12T14:36:07.00Z","channel":"website","departure":"2022-10-12T11:36:07.00Z"}
2022-10-27T21:36:07.211025Z
190.25
EIP-191 signature of the body digest (SHA256 of the body, without leading '0x'). The signature must be made by an authorized signer. Signature format: r+s+v in hexadecimal. Example: "0xc9a9d2e9ebf6a9930705c4517ff7ae6aa91a4799df8f87189488e1f1396080c76cbeb698c047af21ee94d2c5bb89f72a56fb70ac58f1c2b7245e9d2b400c243f1b"
This is the preferred signing method. Only one of X-EIP191-Signature or X-Ensuro-Signature must be provided.
HMAC-SHA256 signature of the body, using the shared secret provided. The signature must be in hexadecimal, without including the leading "0x", for example: "41deed7140512b0d351a588d05bff44dfdc58a6a038b47edf4f5e944dd1185d6" will be the signature for body '{"foo":"bar"}' and secret 'topsecret'.
This method is not recommended, use X-EIP191-Signature whenever possible. Only one of X-EIP191-Signature or X-Ensuro-Signature must be provided.
55290711940124341656440444382658655728151858290209621141129482339851750871896
105.25
EIP-191 signature of the body digest (SHA256 of the body, without leading '0x'). The signature must be made by an authorized signer. Signature format: r+s+v in hexadecimal. Example: "0xc9a9d2e9ebf6a9930705c4517ff7ae6aa91a4799df8f87189488e1f1396080c76cbeb698c047af21ee94d2c5bb89f72a56fb70ac58f1c2b7245e9d2b400c243f1b"
This is the preferred signing method. Only one of X-EIP191-Signature or X-Ensuro-Signature must be provided.
HMAC-SHA256 signature of the body, using the shared secret provided. The signature must be in hexadecimal, without including the leading "0x", for example: "41deed7140512b0d351a588d05bff44dfdc58a6a038b47edf4f5e944dd1185d6" will be the signature for body '{"foo":"bar"}' and secret 'topsecret'.
This method is not recommended, use X-EIP191-Signature whenever possible. Only one of X-EIP191-Signature or X-Ensuro-Signature must be provided.