Skip to main content

CertificateCreatePrivate

Generates a new private certificate directly on the ECGridOS platform for a communication channel, eliminating the need to provision and upload a certificate externally.

:::caution Established API The SOAP API is in maintenance mode. For new integrations use the REST equivalent. :::

Method Signature

CommIDInfo CertificateCreatePrivate(string SessionID, int CommID, datetime BeginUsage,
CertificateUsage Usage, CertificateSecureHashAlgorithm SecureHashAlgorithm,
string PartnerAS2ID, datetime Expires)

Parameters

ParameterTypeRequiredDescription
SessionIDstringYesActive session token from Login()
CommIDintYesIdentifier of the communication channel to generate the certificate for
BeginUsagedatetimeYesDate and time from which the certificate should be considered valid
UsageCertificateUsageYesIntended cryptographic purpose of the generated certificate
SecureHashAlgorithmCertificateSecureHashAlgorithmYesHashing algorithm to use when generating the certificate
PartnerAS2IDstringNoAS2 ID of the trading partner that will use this certificate
ExpiresdatetimeYesExpiration date for the generated certificate

Response Object — CommIDInfo

FieldTypeDescription
CommIDintCommunication channel the certificate was generated for
NetworkIDintNetwork owning the channel
MailboxIDintMailbox owning the channel
CommTypestringProtocol type of the channel
StatusstringCurrent channel status
CertKeyIDintIdentifier of the newly generated certificate key
<!-- Example response XML -->
<CommIDInfoResult>
<CommID>5001</CommID>
<NetworkID>1</NetworkID>
<MailboxID>100</MailboxID>
<CommType>AS2</CommType>
<Status>Active</Status>
<CertKeyID>79</CertKeyID>
</CommIDInfoResult>

ENUMs

CertificateUsage

ValueDescription
SSLTLS/SSL transport layer security
EncryptionEncrypt EDI payloads
SignatureSign EDI payloads
EncryptionAndSignatureBoth encryption and signing

CertificateSecureHashAlgorithm

ValueDescription
SHA1SHA-1 (established — avoid for new certificates)
SHA256SHA-256 (recommended minimum)
SHA384SHA-384
SHA512SHA-512

See Appendix — ENUMs for the complete enumeration definitions.

Code Examples

// .NET 10 — dotnet-svcutil generated proxy
// Generate a new SHA-256 certificate for AS2 encryption and signing, valid for 2 years
var commInfo = await client.CertificateCreatePrivateAsync(
sessionID,
commID: 5001,
beginUsage: DateTime.UtcNow,
usage: CertificateUsage.EncryptionAndSignature,
secureHashAlgorithm: CertificateSecureHashAlgorithm.SHA256,
partnerAS2ID: "PARTNER-AS2-ID",
expires: DateTime.UtcNow.AddYears(2));

Console.WriteLine($"Certificate generated. CertKeyID: {commInfo.CertKeyID}");

REST Equivalent

See Create CertificatePOST /v2/certificates/create.