Certificates Service (CS) Client Library

The client library allows consuming the service REST API.

Index

Service Client

Class Description
CertificatesClient The entry point of the Certificates Service client library.

^ Back to top

Controllers

Class Description
ElectronicSeals Provides actions to manage electronic seals and sign documents.

^ Back to top

Models

Class Description
ActivateOwnerRequest Describes a request to activate or deactivate an owner.
ActivateOwnerResponse Describes the response for a request to activate or deactivate an owner.
ActivateProviderRequest Describes a request to activate or deactivate a provider for a parent owner.
ActivateProviderResponse Describes the response for a request to activate or deactivate a provider for a parent owner.
BeginSignDocumentsResponse Describes the response for a request to begin a request to sign a set of documents.
CertificateData Describes a certificate.
CertificateIdentifierData Describes the identifier of a certificate.
DocumentSignedData Describes a document signed.
DocumentToSignData Describes a document that should be signed.
ElectronicSealActivatedPayload Defines the payload for electronic seals owners webhooks.
ElectronicSealDeactivatedPayload Defines the payload for electronic seals owners webhooks.
ElectronicSealParentPayload Defines the payload for electronic seals parent owners webhooks.
ElectronicSealSignatureCompletedPayload Defines the payload for electronic seals owners webhooks.
EndSignDocumentsResponse Describes the response for a request to try to end a request to sign a set of documents.
GetAuthorizationAddressRequest Describes a request to retrieve the authorization address that should be used to authorize access to the specified electronic seal.
GetAuthorizationAddressResponse Describes the response for a request to retrieve the authorization address that should be used to authorize access to the specified electronic seal.
GetCertificateRequest Describes a request to retrieve the certificate for the specified electronic seal.
GetCertificateResponse Describes the response for a request to retrieve the certificate for the specified electronic seal.
SaveAuthorizerRequest Describes a request to save the authorizer for the specified electronic seal.
SaveAuthorizerResponse Describes a response for a request to save the authorizer for the specified electronic seal.
SignDocumentRequest Describes a request to sign a document.
SignDocumentsError Describes the error that caused a request to sign a set of documents to fail.
SignDocumentsRequest Describes a request to sign a set of documents.
SignDocumentsResponse Describes the response for a request to sign a set of documents.

^ Back to top

Enumerations

Enumeration Description
ProviderEnvironment Defines the provider environment that should be used.
SignDocumentsRequestState Defines the state of a request to sign a set of documents.

^ Back to top

Authorization Policies

Policy Description Scope
DefaultScope Defines an authorization policy that requires the default scope. lithium-certificates
ElectronicSeals Defines an authorization policy that requires a scope that allows accessing the electronic seals actions. lithium-certificates-eseals
Webhooks Defines an authorization policy to access the webhooks endpoints. lithium-certificates-wh

^ Back to top

Reference

Service Client

CertificatesClient

Constructors
CertificatesClient(Uri, BearerTokenCredential)
Parameter Type Description
serviceUri Uri The service URI.
credential BearerTokenCredential The credential that should be used to access the service.
CertificatesClient(Uri, BearerTokenCredential, CertificatesClientOptions)
Parameter Type Description
serviceUri Uri The service URI.
credential BearerTokenCredential The credential that should be used to access the service.
clientOptions CertificatesClientOptions The client options.
Example
Uri address = new Uri("[service-address]");
Uri authorizationServer = new Uri("[authorization-server]");
string clientId = "[client-id]"
string clientSecret = "[client-secret]"

CertificatesClient client = new CertificatesClient(
    new Uri(address),
    new ClientSecretCredential(
        authorizationServer,
        clientId,
        clientSecret));

^ Back to top

Error Codes

ErrorCodes

Constants
Constants Description Remarks
CertificateNotFound The specified certificate does not exist.
ElectronicSealsAuthorizationFailure The electronic seals authorization failed.
ElectronicSealsAuthorizationStateInvalid The electronics seals authorization state is invalid.
ElectronicSealsEnvironmentRequired The electronics seals environment is required.
ElectronicSealsOwnerDuplicate The electronic seals owner is duplicate.
ElectronicSealsOwnerInactive The electronic seals owner is inactive.
ElectronicSealsOwnerNotFound The electronic seals owner is not found.
ElectronicSealsOwnerRequired The electronic seals owner is required.
ElectronicSealsParentOwnerDuplicate The specified electronic seals parent owner is duplicate.
ElectronicSealsParentOwnerNotFound The specified electronic seals parent owner does not exist.
ElectronicSealsProviderInvalid The specified electronic seals provider is invalid.
ElectronicSealsProviderRequired The electronic seals provider is required.
ElectronicSealsRequestNotFound The specified electronic seals request does not exist.
ElectronicSealsSecretsNotFound The electronic seals secrets do not exist.
ElectronicSealsUserNotFound The specified electronic seals user does not exist.
ElectronicSealsUserRequired The electronic seals user is required.
InternalServerError An internal error occurred while processing your request.
RequestArgsInvalid The request arguments are invalid.

Controllers

ElectronicSealsClientController

Provides actions to manage electronic seals and sign documents.

Methods
ActivateOwnerAsync()

Activates or deactivates the electronic seals for the specified owner.

public async Task<Cegid.Hydrogen.Rest.Client.RestServiceResult<Cegid.Lithium.Certificates.Client.Rest.Models.ActivateOwnerResponse>> ActivateOwnerAsync(Cegid.Lithium.Certificates.Client.Rest.Models.ActivateOwnerRequest request, CancellationToken cancellationToken = default);
Parameters
Parameter Type Description Rules
request Cegid.Lithium.Certificates.Client.Rest.Models.ActivateOwnerRequest The request. Required.
Returns
Return Type Description
Cegid.Lithium.Certificates.Client.Rest.Models.ActivateOwnerResponse The response.
Status Codes
Status Code Description
HttpStatusCode.OK Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.UnprocessableEntity Failure: the request is invalid.
HttpStatusCode.NotFound Failure: not found.
HttpStatusCode.Conflict Failure: conflict.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

ActivateProviderAsync()

Activates or deactivates the electronic seals for the specified parent owner using a specific provider.

public async Task<Cegid.Hydrogen.Rest.Client.RestServiceResult<Cegid.Lithium.Certificates.Client.Rest.Models.ActivateProviderResponse>> ActivateProviderAsync(Cegid.Lithium.Certificates.Client.Rest.Models.ActivateProviderRequest request, CancellationToken cancellationToken = default);
Parameters
Parameter Type Description Rules
request Cegid.Lithium.Certificates.Client.Rest.Models.ActivateProviderRequest The request. Required.
Returns
Return Type Description
Cegid.Lithium.Certificates.Client.Rest.Models.ActivateProviderResponse The response.
Status Codes
Status Code Description
HttpStatusCode.OK Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.UnprocessableEntity Failure: the request is invalid.
HttpStatusCode.NotFound Failure: not found.
HttpStatusCode.Conflict Failure: conflict.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

BeginSignDocumentAsync()

Starts a request to sign a document.

public async Task<Cegid.Hydrogen.Rest.Client.RestServiceResult<Cegid.Lithium.Certificates.Client.Rest.Models.BeginSignDocumentsResponse>> BeginSignDocumentAsync(Cegid.Lithium.Certificates.Client.Rest.Models.SignDocumentRequest request, CancellationToken cancellationToken = default);
Parameters
Parameter Type Description Rules
request Cegid.Lithium.Certificates.Client.Rest.Models.SignDocumentRequest The request. Required.
Returns
Return Type Description
Cegid.Lithium.Certificates.Client.Rest.Models.BeginSignDocumentsResponse The response.
Status Codes
Status Code Description
HttpStatusCode.OK Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.UnprocessableEntity Failure: the request is invalid.
HttpStatusCode.NotFound Failure: not found.
HttpStatusCode.Conflict Failure: conflict.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

BeginSignDocumentsAsync()

Starts a request to sign a set of documents.

public async Task<Cegid.Hydrogen.Rest.Client.RestServiceResult<Cegid.Lithium.Certificates.Client.Rest.Models.BeginSignDocumentsResponse>> BeginSignDocumentsAsync(Cegid.Lithium.Certificates.Client.Rest.Models.SignDocumentsRequest request, CancellationToken cancellationToken = default);
Parameters
Parameter Type Description Rules
request Cegid.Lithium.Certificates.Client.Rest.Models.SignDocumentsRequest The request. Required.
Returns
Return Type Description
Cegid.Lithium.Certificates.Client.Rest.Models.BeginSignDocumentsResponse The response.
Status Codes
Status Code Description
HttpStatusCode.Accepted Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.UnprocessableEntity Failure: the request is invalid.
HttpStatusCode.NotFound Failure: not found.
HttpStatusCode.Conflict Failure: conflict.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

EndSignDocumentAsync()

Tries to end a request to sign a document.

public async Task<Cegid.Hydrogen.Rest.Client.RestServiceResult<Cegid.Lithium.Certificates.Client.Rest.Models.EndSignDocumentsResponse>> EndSignDocumentAsync(System.Guid requestId, CancellationToken cancellationToken = default);
Parameters
Parameter Type Description Rules
requestId System.Guid The unique identifier of the request. Required.Not empty.
Returns
Return Type Description
Cegid.Lithium.Certificates.Client.Rest.Models.EndSignDocumentsResponse The response (which describes the status of the request, including the signed document if the request is completed).
Status Codes
Status Code Description
HttpStatusCode.OK Success.
HttpStatusCode.UnprocessableEntity Failure: the request is invalid.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

EndSignDocumentsAsync()

Tries to end a request to sign a set of documents.

public async Task<Cegid.Hydrogen.Rest.Client.RestServiceResult<Cegid.Lithium.Certificates.Client.Rest.Models.EndSignDocumentsResponse>> EndSignDocumentsAsync(System.Guid requestId, CancellationToken cancellationToken = default);
Parameters
Parameter Type Description Rules
requestId System.Guid The unique identifier of the request. Required.Not empty.
Returns
Return Type Description
Cegid.Lithium.Certificates.Client.Rest.Models.EndSignDocumentsResponse The response (which describes the status of the request, including the signed documents if the request is completed).
Status Codes
Status Code Description
HttpStatusCode.OK Success.
HttpStatusCode.UnprocessableEntity Failure: the request is invalid.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

GetAuthorizationAddressAsync()

Retrieves the authorization address that should be used to authorize access to the specified electronic seal.

public async Task<Cegid.Hydrogen.Rest.Client.RestServiceResult<Cegid.Lithium.Certificates.Client.Rest.Models.GetAuthorizationAddressResponse>> GetAuthorizationAddressAsync(Cegid.Lithium.Certificates.Client.Rest.Models.GetAuthorizationAddressRequest request, CancellationToken cancellationToken = default);
Parameters
Parameter Type Description Rules
request Cegid.Lithium.Certificates.Client.Rest.Models.GetAuthorizationAddressRequest The request. Required.
Returns
Return Type Description
Cegid.Lithium.Certificates.Client.Rest.Models.GetAuthorizationAddressResponse The response.
Status Codes
Status Code Description
HttpStatusCode.OK Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.UnprocessableEntity Failure: the request is invalid.
HttpStatusCode.NotFound Failure: not found.
HttpStatusCode.Conflict Failure: conflict.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

GetCertificateAsync()

Retrieves the certificate for the specified electronic seal.

public async Task<Cegid.Hydrogen.Rest.Client.RestServiceResult<Cegid.Lithium.Certificates.Client.Rest.Models.GetCertificateResponse>> GetCertificateAsync(Cegid.Lithium.Certificates.Client.Rest.Models.GetCertificateRequest request, CancellationToken cancellationToken = default);
Parameters
Parameter Type Description Rules
request Cegid.Lithium.Certificates.Client.Rest.Models.GetCertificateRequest The request. Required.
Returns
Return Type Description
Cegid.Lithium.Certificates.Client.Rest.Models.GetCertificateResponse The response.
Status Codes
Status Code Description
HttpStatusCode.OK Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.UnprocessableEntity Failure: the request is invalid.
HttpStatusCode.NotFound Failure: not found.
HttpStatusCode.Conflict Failure: conflict.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

SaveAuthorizerAsync()

Saves the authorizer for the specified electronic seal.

public async Task<Cegid.Hydrogen.Rest.Client.RestServiceResult<Cegid.Lithium.Certificates.Client.Rest.Models.SaveAuthorizerResponse>> SaveAuthorizerAsync(Cegid.Lithium.Certificates.Client.Rest.Models.SaveAuthorizerRequest request, CancellationToken cancellationToken = default);
Parameters
Parameter Type Description Rules
request Cegid.Lithium.Certificates.Client.Rest.Models.SaveAuthorizerRequest The request. Required.
Returns
Return Type Description
Cegid.Lithium.Certificates.Client.Rest.Models.SaveAuthorizerResponse The response.
Status Codes
Status Code Description
HttpStatusCode.OK Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.UnprocessableEntity Failure: the request is invalid.
HttpStatusCode.NotFound Failure: not found.
HttpStatusCode.Conflict Failure: conflict.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

SignDocumentAsync()

Signs a document.

public async Task<Cegid.Hydrogen.Rest.Client.RestServiceResult<Cegid.Lithium.Certificates.Client.Rest.Models.SignDocumentsResponse>> SignDocumentAsync(Cegid.Lithium.Certificates.Client.Rest.Models.SignDocumentRequest request, CancellationToken cancellationToken = default);
Parameters
Parameter Type Description Rules
request Cegid.Lithium.Certificates.Client.Rest.Models.SignDocumentRequest The request. Required.
Returns
Return Type Description
Cegid.Lithium.Certificates.Client.Rest.Models.SignDocumentsResponse The response.
Status Codes
Status Code Description
HttpStatusCode.OK Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.UnprocessableEntity Failure: the request is invalid.
HttpStatusCode.NotFound Failure: not found.
HttpStatusCode.Conflict Failure: conflict.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

SignDocumentsAsync()

Signs a set of documents.

public async Task<Cegid.Hydrogen.Rest.Client.RestServiceResult<Cegid.Lithium.Certificates.Client.Rest.Models.SignDocumentsResponse>> SignDocumentsAsync(Cegid.Lithium.Certificates.Client.Rest.Models.SignDocumentsRequest request, CancellationToken cancellationToken = default);
Parameters
Parameter Type Description Rules
request Cegid.Lithium.Certificates.Client.Rest.Models.SignDocumentsRequest The request. Required.
Returns
Return Type Description
Cegid.Lithium.Certificates.Client.Rest.Models.SignDocumentsResponse The response.
Status Codes
Status Code Description
HttpStatusCode.OK Success.
HttpStatusCode.BadRequest Failure: the request is invalid.
HttpStatusCode.UnprocessableEntity Failure: the request is invalid.
HttpStatusCode.NotFound Failure: not found.
HttpStatusCode.Conflict Failure: conflict.

The operation will raise RestRequestException for any failure status code. The exception may include a body with an instance of RestProblemDetails depending on the status code.

^ Back to top

The class includes custom methods not described here.

Models

ActivateOwnerRequest

Describes a request to activate or deactivate an owner.

Properties
Property Type Description Rules
ParentOwnerId string The parent owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
OwnerId string The owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
AuthorizerId string? The authorizer identifier.
AuthorizerSecret string? The authorizer secret.
AccessToken string? The access token that can be used to invoke the provider API.
Activate bool Indicates whether the electronic seals should be activated or deactivated. Required.

^ Back to top

ActivateOwnerResponse

Describes the response for a request to activate or deactivate an owner.

Properties
Property Type Description Rules
Environment Cegid.Lithium.Certificates.Client.Rest.Models.ProviderEnvironment The provider environment that was used. Required.
ParentOwnerId string The parent owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
OwnerId string The owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).

^ Back to top

ActivateProviderRequest

Describes a request to activate or deactivate a provider for a parent owner.

Properties
Property Type Description Rules
ParentOwnerId string The parent owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
ProviderId string The provider identifier. Required.
UserId string? The user identifier.
ApplicationId string? The application identifier.
Activate bool Indicates whether the electronic seals should be activated or deactivated. Required.

^ Back to top

ActivateProviderResponse

Describes the response for a request to activate or deactivate a provider for a parent owner.

Properties
Property Type Description Rules
Environment Cegid.Lithium.Certificates.Client.Rest.Models.ProviderEnvironment The provider environment that was used. Required.
ProviderId string The provider identifier. Required.
ParentOwnerId string The parent owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
RedirectUri System.Uri? The redirect URI. Absolute URI.

^ Back to top

BeginSignDocumentsResponse

Describes the response for a request to begin a request to sign a set of documents.

Properties
Property Type Description Rules
Environment Cegid.Lithium.Certificates.Client.Rest.Models.ProviderEnvironment The provider environment that was used. Required.
ParentOwnerId string The parent owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
OwnerId string The owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
RequestId System.Guid The unique identifier of the request (for correlation). Required.Not empty.

^ Back to top

CertificateData

Describes a certificate.

Properties
Property Type Description Rules
Identifier Cegid.Lithium.Certificates.Client.Rest.Models.CertificateIdentifierData The certificate identifier. Required.
Data string The certificate data (in Base64). Required.
HasPrivateKey bool A value indicating whether the certificate has a private key. Required.
NotBefore System.DateTimeOffset? The moment when the certificate becomes active.
NotAfter System.DateTimeOffset? The moment when the certificate becomes inactive.
Properties System.Collections.Generic.IDictionary<string, string>? The properties associated with the certificate.

^ Back to top

CertificateIdentifierData

Describes the identifier of a certificate.

Properties
Property Type Description Rules
Identifier string The certificate identifier. Required.
Name string The certificate name. Required.RegEx (^(\d|[a-z]|[A-Z]|\.|-|_)*$).
Version string The certificate version (if any). Required.
Storage string The secrets storage (if any). Required.

^ Back to top

DocumentSignedData

Describes a document signed.

Properties
Property Type Description Rules
Alias string The document alias. Required.
HashSignedBase64 string The document hash signed (in Base64). Required.

^ Back to top

DocumentToSignData

Describes a document that should be signed.

Properties
Property Type Description Rules
Alias string The document alias. Required.
HashBase64 string The document hash (in Base64). Required.

^ Back to top

ElectronicSealActivatedPayload

Defines the payload for electronic seals owners webhooks.

Properties
Property Type Description Rules
Environment Cegid.Lithium.Certificates.Client.Rest.Models.ProviderEnvironment The provider environment used. Required.
ParentOwnerId string The parent owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
ProviderId string The provider identifier. Required.
OwnerId string The owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
AuthorizerId string? The authorizer identifier.
AuthorizerSecret string? The authorizer secret.

^ Back to top

ElectronicSealDeactivatedPayload

Defines the payload for electronic seals owners webhooks.

Properties
Property Type Description Rules
Environment Cegid.Lithium.Certificates.Client.Rest.Models.ProviderEnvironment The provider environment used. Required.
ParentOwnerId string The parent owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
ProviderId string The provider identifier. Required.
OwnerId string The owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).

^ Back to top

ElectronicSealParentPayload

Defines the payload for electronic seals parent owners webhooks.

Properties
Property Type Description Rules
Environment Cegid.Lithium.Certificates.Client.Rest.Models.ProviderEnvironment The provider environment used. Required.
ParentOwnerId string The parent owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
ProviderId string The provider identifier. Required.

^ Back to top

ElectronicSealSignatureCompletedPayload

Defines the payload for electronic seals owners webhooks.

Properties
Property Type Description Rules
Environment Cegid.Lithium.Certificates.Client.Rest.Models.ProviderEnvironment The provider environment used. Required.
ParentOwnerId string The parent owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
ProviderId string The provider identifier. Required.
OwnerId string The owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
RequestId System.Guid The unique identifier of the request. Required.Not empty.
RequestState Cegid.Lithium.Certificates.Client.Rest.Models.SignDocumentsRequestState The request state. Required.

^ Back to top

EndSignDocumentsResponse

Describes the response for a request to try to end a request to sign a set of documents.

Properties
Property Type Description Rules
Environment Cegid.Lithium.Certificates.Client.Rest.Models.ProviderEnvironment The provider environment that was used. Required.
ParentOwnerId string The parent owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
OwnerId string The owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
RequestId System.Guid The unique identifier of the request. Required.Not empty.
RequestState Cegid.Lithium.Certificates.Client.Rest.Models.SignDocumentsRequestState The request state. Required.
Documents System.Collections.Generic.IList<Cegid.Lithium.Certificates.Client.Rest.Models.DocumentSignedData>? The documents signed. Not set when the request is not completed.
Error Cegid.Lithium.Certificates.Client.Rest.Models.SignDocumentsError? The error that caused the request to fail.

^ Back to top

GetAuthorizationAddressRequest

Describes a request to retrieve the authorization address that should be used to authorize access to the specified electronic seal.

Properties
Property Type Description Rules
OwnerId string The owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
ReturnUri System.Uri? The return URI. Optional. Absolute URI.

^ Back to top

GetAuthorizationAddressResponse

Describes the response for a request to retrieve the authorization address that should be used to authorize access to the specified electronic seal.

Properties
Property Type Description Rules
Environment Cegid.Lithium.Certificates.Client.Rest.Models.ProviderEnvironment The provider environment that was used. Required.
ParentOwnerId string The parent owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
OwnerId string The owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
AuthorizationUri System.Uri The authorization address. Required.Absolute URI.

^ Back to top

GetCertificateRequest

Describes a request to retrieve the certificate for the specified electronic seal.

Properties
Property Type Description Rules
OwnerId string The owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).

^ Back to top

GetCertificateResponse

Describes the response for a request to retrieve the certificate for the specified electronic seal.

Properties
Property Type Description Rules
Environment Cegid.Lithium.Certificates.Client.Rest.Models.ProviderEnvironment The provider environment that was used. Required.
ParentOwnerId string The parent owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
OwnerId string The owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
Certificate Cegid.Lithium.Certificates.Client.Rest.Models.CertificateData The electronic seal certificate. Required.

^ Back to top

SaveAuthorizerRequest

Describes a request to save the authorizer for the specified electronic seal.

Properties
Property Type Description Rules
OwnerId string The owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
AuthorizerId string The authorizer identifier. Required.
AuthorizerSecret string The authorizer secret. Required.

^ Back to top

SaveAuthorizerResponse

Describes a response for a request to save the authorizer for the specified electronic seal.

Properties
Property Type Description Rules
Environment Cegid.Lithium.Certificates.Client.Rest.Models.ProviderEnvironment The provider environment that was used. Required.
ParentOwnerId string The parent owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
OwnerId string The owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
AuthorizerId string The authorizer identifier. Required.
Certificate Cegid.Lithium.Certificates.Client.Rest.Models.CertificateData The electronic seal certificate. Required.

^ Back to top

SignDocumentRequest

Describes a request to sign a document.

Properties
Property Type Description Rules
OwnerId string The owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
Document Cegid.Lithium.Certificates.Client.Rest.Models.DocumentToSignData The document that should be signed. Required.

^ Back to top

SignDocumentsError

Describes the error that caused a request to sign a set of documents to fail.

Properties
Property Type Description Rules
ErrorCode string The error code. Required.
ErrorDescription string The error description. Required.

^ Back to top

SignDocumentsRequest

Describes a request to sign a set of documents.

Properties
Property Type Description Rules
OwnerId string The owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
Documents System.Collections.Generic.IList<Cegid.Lithium.Certificates.Client.Rest.Models.DocumentToSignData> The list of documents that should be signed. Required.

^ Back to top

SignDocumentsResponse

Describes the response for a request to sign a set of documents.

Properties
Property Type Description Rules
Environment Cegid.Lithium.Certificates.Client.Rest.Models.ProviderEnvironment The provider environment that was used. Required.
ParentOwnerId string The parent owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
OwnerId string The owner identifier. Required.RegEx (^(\d|[a-z]|[A-Z]|-)*$).
RequestId System.Guid The unique identifier of the request (for correlation). Required.Not empty.
Documents System.Collections.Generic.IList<Cegid.Lithium.Certificates.Client.Rest.Models.DocumentSignedData> The documents signed. Required.

^ Back to top

Enumerations

ProviderEnvironment

Defines the provider environment that should be used.

Members
Member Value Description
Testing 0 The testing environment.
Production 1 The production environment.

^ Back to top

SignDocumentsRequestState

Defines the state of a request to sign a set of documents.

Members
Member Value Description
Pending 0 The request is pending. Signed documents are not available.
Completed 1 The request is completed. Signed documents are available.
Failed 2 The request failed. Signed documents are not available.

^ Back to top

Webhooks

Events

| Event | Description | Payload | Payload Description | Remarks | | | | | | | | ElectronicSeal_Activated | Webhook raised when an electronic seal owner is activated. | ElectronicSealActivatedPayload | Describes information about the electronic seal owner. | | | ElectronicSeal_Deactivated | Webhook raised when an electronic seal owner is deactivated. | ElectronicSealDeactivatedPayload | Describes information about the electronic seal owner. | | | ElectronicSealParent_Activated | Webhook raised when an electronic seals parent owner is activated. | ElectronicSealParentPayload | Describes information about the electronic seals parent owner. | | | ElectronicSealParent_Deactivated | Webhook raised when an electronic seals parent owner is deactivated. | ElectronicSealParentPayload | Describes information about the electronic seals parent owner. | | | ElectronicSealSignature_Completed | Webhook raised when an electronic seal signature has completed. | ElectronicSealSignatureCompletedPayload | Describes information about the electronic seal signature. | |

Payloads

ElectronicSealActivatedPayload

Defines the payload for electronic seals owners webhooks.

Property Description
Environment The provider environment used.
ParentOwnerId The parent owner identifier.
ProviderId The provider identifier.
OwnerId The owner identifier.
AuthorizerId The authorizer identifier.
AuthorizerSecret The authorizer secret.

^ Back to top

ElectronicSealDeactivatedPayload

Defines the payload for electronic seals owners webhooks.

Property Description
Environment The provider environment used.
ParentOwnerId The parent owner identifier.
ProviderId The provider identifier.
OwnerId The owner identifier.

^ Back to top

ElectronicSealParentPayload

Defines the payload for electronic seals parent owners webhooks.

Property Description
Environment The provider environment used.
ParentOwnerId The parent owner identifier.
ProviderId The provider identifier.

^ Back to top

ElectronicSealSignatureCompletedPayload

Defines the payload for electronic seals owners webhooks.

Property Description
Environment The provider environment used.
ParentOwnerId The parent owner identifier.
ProviderId The provider identifier.
OwnerId The owner identifier.
RequestId The unique identifier of the request.
RequestState The request state.

^ Back to top

Controllers

WebhooksClientController

Allows managing webhooks.

Methods
ActivateSubscriptionAsync()

Activates the specified webhook subscription.

Task<Cegid.Hydrogen.Rest.Client.RestServiceResult<bool>> ActivateSubscriptionAsync(string clientId, string subscriptionId, CancellationToken cancellationToken = default);
Task<Cegid.Hydrogen.Rest.Client.RestServiceResult<bool>> ActivateSubscriptionAsync(string clientId, System.Collections.Generic.IList<string> eventNames, CancellationToken cancellationToken = default);
Parameters
Parameter Type Description Rules
clientId string The client identifier. Required.
subscriptionId string The subscription identifier. Required.
eventNames System.Collections.Generic.IList<string> The names of the events subscribed. Required.
Returns
Return Type Description
bool A value indicating whether the subscription was activated.
Status Codes
Status Code Description
HttpStatusCode.OK Success.
HttpStatusCode.NotFound Failure: the subscription does not exist.
HttpStatusCode.BadRequest Failure: the request is invalid.

^ Back to top

CreateSubscriptionAsync()

Creates the specified webhook subscription.

Task<Cegid.Hydrogen.Rest.Client.RestServiceResult<string>> CreateSubscriptionAsync(Cegid.Hydrogen.Rest.Webhooks.CreateWebhookSubscriptionRequest request, CancellationToken cancellationToken = default);
Parameters
Parameter Type Description Rules
request Cegid.Hydrogen.Rest.Webhooks.CreateWebhookSubscriptionRequest The request. Required.
Returns
Return Type Description
string The identifier of the new subscription.
Status Codes
Status Code Description
HttpStatusCode.Created Success.
HttpStatusCode.Conflict Failure: the subscription could not be created.
HttpStatusCode.BadRequest Failure: the request is invalid.

^ Back to top

DeleteSubscriptionAsync()

Deletes the specified webhook subscription.

Task<Cegid.Hydrogen.Rest.Client.RestServiceResult> DeleteSubscriptionAsync(string clientId, string subscriptionId, CancellationToken cancellationToken = default);
Parameters
Parameter Type Description Rules
clientId string The client identifier. Required.
subscriptionId string The subscription identifier. Required.
Returns
Return Type Description
None The operation has no return value.
Status Codes
Status Code Description
HttpStatusCode.NoContent Success.
HttpStatusCode.NotFound Failure: the subscription does not exist.
HttpStatusCode.BadRequest Failure: the request is invalid.

^ Back to top

DeleteSubscriptionIfExistsAsync()

Deletes the specified webhook subscription if it exists.

Task<Cegid.Hydrogen.Rest.Client.RestServiceResult<bool>> DeleteSubscriptionIfExistsAsync(string clientId, string subscriptionId, CancellationToken cancellationToken = default);
Parameters
Parameter Type Description Rules
clientId string The client identifier. Required.
subscriptionId string The subscription identifier. Required.
Returns
Return Type Description
bool A value indicating whether the subscription was deleted.
Status Codes
Status Code Description
HttpStatusCode.NoContent Success.
HttpStatusCode.BadRequest Failure: the request is invalid.

^ Back to top

DeleteSubscriptionsAsync()

Deletes all the webhooks subscriptions for the specified client application.

Task<Cegid.Hydrogen.Rest.Client.RestServiceResult> DeleteSubscriptionsAsync(string clientId, CancellationToken cancellationToken = default);
Parameters
Parameter Type Description Rules
clientId string The client identifier. Required.
subscriptionId string The subscription identifier. Required.
Returns
Return Type Description
None The operation has no return value.
Status Codes
Status Code Description
HttpStatusCode.NoContent Success.
HttpStatusCode.NotFound Failure: no subscriptions exist.
HttpStatusCode.BadRequest Failure: the request is invalid.

^ Back to top

DeleteSubscriptionsIfExistAsync()

Deletes all the webhooks subscriptions for the specified client application if they exist.

Task<Cegid.Hydrogen.Rest.Client.RestServiceResult<bool>> DeleteSubscriptionsIfExistAsync(string clientId, CancellationToken cancellationToken = default);
Parameters
Parameter Type Description Rules
clientId string The client identifier. Required.
subscriptionId string The subscription identifier. Required.
Returns
Return Type Description
bool A value indicating whether any subscription was deleted.
Status Codes
Status Code Description
HttpStatusCode.NoContent Success.
HttpStatusCode.BadRequest Failure: the request is invalid.

^ Back to top

GetWebhooksMetadataAsync()

Retrieves information about the webhooks available.

Task<Cegid.Hydrogen.Rest.Client.RestServiceResult<System.Collections.Generic.IList<Cegid.Hydrogen.Rest.Webhooks.WebhookMetadata>>> GetWebhooksMetadataAsync(CancellationToken cancellationToken = default);
Returns
Return Type Description
System.Collections.Generic.IList<Cegid.Hydrogen.Rest.Webhooks.WebhookMetadata> A list containing the information about the webhooks available.
Status Codes
Status Code Description
HttpStatusCode.OK Success.
HttpStatusCode.BadRequest Failure: the request is invalid.

^ Back to top

GetSubscriptionAsync()

Retrieves the specified webhook subscription.

Task<Cegid.Hydrogen.Rest.Client.RestServiceResult<Cegid.Hydrogen.Rest.Webhooks.WebhookSubscription>> GetSubscriptionAsync(string clientId, string subscriptionId, CancellationToken cancellationToken = default);
Task<Cegid.Hydrogen.Rest.Client.RestServiceResult<Cegid.Hydrogen.Rest.Webhooks.WebhookSubscription>> GetSubscriptionAsync(string clientId, System.Collections.Generic.IList<string> eventNames, CancellationToken cancellationToken = default);
Parameters
Parameter Type Description Rules
clientId string The client identifier. Required.
subscriptionId string The subscription identifier. Required.
eventNames System.Collections.Generic.IList<string> The names of the events subscribed. Required.
Returns
Return Type Description
Cegid.Hydrogen.Rest.Webhooks.WebhookSubscription The webhook subscription.
Status Codes
Status Code Description
HttpStatusCode.OK Success.
HttpStatusCode.NotFound Failure: the subscription does not exist.
HttpStatusCode.BadRequest Failure: the request is invalid.

^ Back to top

GetSubscriptionsAsync()

Retrieves all the subscriptions for the specified client application.

Task<Cegid.Hydrogen.Rest.Client.RestServiceResult<System.Collections.Generic.IList<Cegid.Hydrogen.Rest.Webhooks.WebhookSubscription>>> GetSubscriptionsAsync(string clientId, CancellationToken cancellationToken = default);
Parameters
Parameter Type Description Rules
clientId string The client identifier. Required.
subscriptionId string The subscription identifier. Required.
Returns
Return Type Description
System.Collections.Generic.IList<Cegid.Hydrogen.Rest.Webhooks.WebhookSubscription> A list containing the webhooks subscriptions.
Status Codes
Status Code Description
HttpStatusCode.OK Success.
HttpStatusCode.NotFound Failure: no subscriptions exist.
HttpStatusCode.BadRequest Failure: the request is invalid.

^ Back to top

PingSubscriptionAsync()

Pings the specified webhook subscription (to check if the callback is working correctly, for example).

Task<Cegid.Hydrogen.Rest.Client.RestServiceResult> PingSubscriptionAsync(string clientId, string subscriptionId, CancellationToken cancellationToken = default);
Parameters
Parameter Type Description Rules
clientId string The client identifier. Required.
Returns
Return Type Description
None The operation has no return value.
Status Codes
Status Code Description
HttpStatusCode.OK Success.
HttpStatusCode.NotFound Failure: the subscription does not exist.
HttpStatusCode.BadRequest Failure: the request is invalid.

^ Back to top

UpdateSubscriptionAsync()

Updates the specified webhook subscription.

Task<Cegid.Hydrogen.Rest.Client.RestServiceResult> UpdateSubscriptionAsync(Cegid.Hydrogen.Rest.Webhooks.UpdateWebhookSubscriptionRequest request, CancellationToken cancellationToken = default);
Parameters
Parameter Type Description Rules
request Cegid.Hydrogen.Rest.Webhooks.UpdateWebhookSubscriptionRequest The request. Required.
Returns
Return Type Description
None The operation has no return value.
Status Codes
Status Code Description
HttpStatusCode.OK Success.
HttpStatusCode.NotFound Failure: the subscription does not exist.
HttpStatusCode.Conflict Failure: the subscription could not be updated.
HttpStatusCode.BadRequest Failure: the request is invalid.

^ Back to top