Pular para o conteúdo principal

Create orders of other formats

In addition to the ICP-Brasil format, the API creates orders of the Paraguay, Cabo Verde and SSL formats. Each format has its own route and its own parameters class. The other request fields are the same as in Create an order.

Before you start​

  • For regular orders, an API key of an application with the Sales app role. See Application roles.
  • For pre-approved orders, the Electronic registration authority role and the registration authority (RA) ID in the X-Subscription header. See Creating pre-approved orders.
  • The code of a certificate type of the applicable format. See List the certificate types.

Routes and parameters classes​

Use the route of the format of the certificate type. In .NET, CreateOrderAsync and CreatePreApprovedOrderAsync select the route from the class of Parameters.

FormatOrderparameters class (.NET)
ParaguayPOST /api/paraguay/ordersParaguayOrderCreateParameters
Cabo VerdePOST /api/cabo-verde/ordersCaboVerdeOrderCreateParameters
SSLPOST /api/ssl/ordersSslOrderCreateParameters
FormatPre-approved orderparameters class (.NET)
ParaguayPOST /api/paraguay/orders/pre-approvedCreatePreApprovedOrderParaguayParameters
Cabo VerdePOST /api/cabo-verde/orders/pre-approvedCreatePreApprovedOrderCaboVerdeParameters
SSLPOST /api/ssl/orders/pre-approvedCreatePreApprovedOrderSslParameters

In a regular order, parameters contains only the identification of the holder. The validation agent fills in the other data. To send this data before the validation, see Pre-fill the holder data.

In a pre-approved order, parameters contains all the holder data that goes into the certificate. The pre-approved order examples omit holderType and holderFiles. If the certificate type has the documents step enabled, send the documents. See Holder documents.

Identify the format and the subtype​

The certificate type list gives the format of each type in the format field. The subtype defines which parameters fields are required.

FormatformatSubtype
ParaguayPkiParaguayparaguayParameters.paraguayType: Firma, Sello or Tributario
Cabo VerdePkiCaboVerdecaboVerdeParameters.caboVerdeType: AutenticacaoIndividual, AssinaturaDigital or SeloElectronico
SSLSslNo subtype. sslParameters contains maxAlternativeDnsNames, serialNumberMode and evCountryMode

Country codes have two letters, in the ISO 3166-1 alpha-2 standard, for example CV.

Create a Paraguay format order​

Send the holder's identity document in parameters. In .NET, the class is ParaguayOrderCreateParameters.

FieldRequiredDescription
holderIdentificationYesNumber of the holder's identity document. Letters and digits only, maximum 20 characters
holderIdentificationTypeYesType of the identity document: CedulaDeIdentidad or Pasaporte
organizationRucNoRUC of the organization

The RUC has 6 to 8 digits, an optional letter and the check digit, with no hyphen. Amplia Reg verifies the check digit.

var orderCreateResponse = await ampliaRegService.CreateOrderAsync(new OrderCreateRequest<ParaguayOrderCreateParameters>() {
RegistrationAuthority = AuthorityReference.FromId(Guid.Parse("3fa85f64-5717-4562-b3fc-2c963f66afa6")), // RA ID
CertificateType = CertificateTypeReference.FromCode("FIRMAF1"), // Certificate type code
IssueType = IssueTypes.Presential,
Parameters = new ParaguayOrderCreateParameters() {
HolderIdentification = "4203918", // Number of the holder's identity document
HolderIdentificationType = ParaguayDocumentTypes.CedulaDeIdentidad, // or ParaguayDocumentTypes.Pasaporte
},
Validity = PeriodModel.FromYears(1), // Certificate validity (the certificate type must allow it)
Contact = new ContactData() {
EmailAddress = "maria.benitez@example.com", // Holder's email
Phone = "+595981000000", // Holder's mobile number, with the country code
},
});

Create a pre-approved Paraguay format order​

In .NET, the parameters class is CreatePreApprovedOrderParaguayParameters. For the other fields, see Request fields.

FieldRequiredDescription
identificationYesNumber of the holder's identity document. Letters and digits only, maximum 20 characters
identificationTypeYesType of the identity document: CedulaDeIdentidad or Pasaporte
givenNamesYesHolder's given names (maximum 100 characters)
surnamesYesHolder's surnames (maximum 100 characters)
organizationNameDependsName of the organization (maximum 200 characters). Required for the Sello and Tributario subtypes
organizationRucDependsRUC of the organization, in the same format as in the regular order. Required for the Sello and Tributario subtypes
organizationUnitDependsOrganization unit (maximum 100 characters). Required for the Sello subtype
applicationDependsSystem or application (maximum 200 characters). Required for the Sello subtype
organizationTitleNoHolder's role in the organization (maximum 100 characters)
var response = await ampliaRegService.CreatePreApprovedOrderAsync(new CreatePreApprovedOrderOptions2<CreatePreApprovedOrderParaguayParameters>() {
RegistrationAuthorityId = Guid.Parse("3fa85f64-5717-4562-b3fc-2c963f66afa6"), // RA ID
CertificateType = CertificateTypeReference.FromCode("FIRMAF1"), // Certificate type code
Validity = PeriodModel.FromYears(1), // Certificate validity (the certificate type must allow it)
Parameters = new CreatePreApprovedOrderParaguayParameters() {
Identification = "4203918", // Number of the holder's identity document
IdentificationType = ParaguayDocumentTypes.CedulaDeIdentidad, // or ParaguayDocumentTypes.Pasaporte
GivenNames = "María Fernanda", // Holder's given names
Surnames = "Benítez Rojas", // Holder's surnames
},
Contact = new ContactData() {
EmailAddress = "maria.benitez@example.com",
Phone = "+595981000000",
},
});

Create a Cabo Verde format order​

Send the identification that the certificate subtype requires. In .NET, the class is CaboVerdeOrderCreateParameters.

FieldRequiredDescription
nifDependsHolder's NIF. Digits only, 4 to 20. Required for the AutenticacaoIndividual and AssinaturaDigital subtypes
identificationDependsIdentification number. Letters and digits only, 4 to 20 characters. Required for the SeloElectronico subtype
identificationCountryCodeDependsCode of the country that issued the identification. Required for the SeloElectronico subtype

For the AutenticacaoIndividual and AssinaturaDigital subtypes, Amplia Reg uses only nif. For the SeloElectronico subtype, it uses only identification and identificationCountryCode.

var orderCreateResponse = await ampliaRegService.CreateOrderAsync(new OrderCreateRequest<CaboVerdeOrderCreateParameters>() {
RegistrationAuthority = AuthorityReference.FromId(Guid.Parse("3fa85f64-5717-4562-b3fc-2c963f66afa6")), // RA ID
CertificateType = CertificateTypeReference.FromCode("ASSINATURA1"), // Certificate type code
IssueType = IssueTypes.Presential,
Parameters = new CaboVerdeOrderCreateParameters() {
Nif = "254718390", // Holder's NIF
},
Validity = PeriodModel.FromYears(1), // Certificate validity (the certificate type must allow it)
Contact = new ContactData() {
EmailAddress = "joao.tavares@example.com", // Holder's email
Phone = "+2389910000", // Holder's mobile number, with the country code
},
});

Create a pre-approved Cabo Verde format order​

In .NET, the parameters class is CreatePreApprovedOrderCaboVerdeParameters. For the other fields, see Request fields.

FieldRequiredDescription
countryCodeYesCode of the holder's country. Amplia Reg stores it as the nationality and uses it in the country field of the certificate
givenNamesDependsHolder's given names (maximum 100 characters). Required for the AutenticacaoIndividual and AssinaturaDigital subtypes
surnamesDependsHolder's surnames (maximum 100 characters). Required for the AutenticacaoIndividual and AssinaturaDigital subtypes
nifDependsHolder's NIF. Digits only, 4 to 20. Required for the AutenticacaoIndividual and AssinaturaDigital subtypes
identificationDependsIdentification number. Letters and digits only, 4 to 20 characters. Required for the AssinaturaDigital and SeloElectronico subtypes
identificationCountryCodeDependsCode of the country that issued the identification. Required for the AssinaturaDigital and SeloElectronico subtypes
organizationDependsName of the organization (maximum 200 characters). Required for the SeloElectronico subtype
organizationTradeNameDependsTrade name of the organization (maximum 200 characters). Required for the SeloElectronico subtype
organizationUnitNoOrganization unit (maximum 100 characters)
titleNoHolder's title (maximum 100 characters)
stateNoState (maximum 100 characters)
localityNoLocality (maximum 100 characters)
var response = await ampliaRegService.CreatePreApprovedOrderAsync(new CreatePreApprovedOrderOptions2<CreatePreApprovedOrderCaboVerdeParameters>() {
RegistrationAuthorityId = Guid.Parse("3fa85f64-5717-4562-b3fc-2c963f66afa6"), // RA ID
CertificateType = CertificateTypeReference.FromCode("ASSINATURA1"), // Certificate type code
Validity = PeriodModel.FromYears(1), // Certificate validity (the certificate type must allow it)
Parameters = new CreatePreApprovedOrderCaboVerdeParameters() {
CountryCode = "CV", // Code of the holder's country
GivenNames = "João Pedro", // Holder's given names
Surnames = "Tavares Lopes", // Holder's surnames
Nif = "254718390", // Holder's NIF
Identification = "7K29D41", // Identification number
IdentificationCountryCode = "CV", // Code of the country that issued the identification
Locality = "Praia",
},
Contact = new ContactData() {
EmailAddress = "joao.tavares@example.com",
Phone = "+2389910000",
},
});

Create an SSL format order​

Send the primary DNS name of the certificate in parameters. In .NET, the class is SslOrderCreateParameters.

FieldRequiredDescription
primaryDnsNameYesPrimary DNS name of the certificate (maximum 200 characters). It accepts a DNS name, a name that starts with *. or an IP address
var orderCreateResponse = await ampliaRegService.CreateOrderAsync(new OrderCreateRequest<SslOrderCreateParameters>() {
RegistrationAuthority = AuthorityReference.FromId(Guid.Parse("3fa85f64-5717-4562-b3fc-2c963f66afa6")), // RA ID
CertificateType = CertificateTypeReference.FromCode("SSLOV"), // Certificate type code
IssueType = IssueTypes.Presential,
Parameters = new SslOrderCreateParameters() {
PrimaryDnsName = "www.example.com", // Primary DNS name of the certificate
},
Validity = PeriodModel.FromYears(1), // Certificate validity (the certificate type must allow it)
Contact = new ContactData() {
EmailAddress = "admin@example.com", // Holder's email
Phone = "+5511999990000", // Holder's mobile number, with the country code
},
});

Create a pre-approved SSL format order​

In .NET, the parameters class is CreatePreApprovedOrderSslParameters. For the other fields, see Request fields.

FieldRequiredDescription
primaryDnsNameYesPrimary DNS name of the certificate (maximum 200 characters)
alternativeDnsNamesNoList of alternative DNS names, each with a maximum of 200 characters. The maximum number of names is the maxAlternativeDnsNames of the certificate type
organizationYesName of the organization (maximum 200 characters)
organizationUnitNoOrganization unit (maximum 100 characters)
businessCategoryYesBusiness category: GovernmentEntity, BusinessEntity or NonCommercialEntity
streetAddressYesStreet address, with the street name and the number (maximum 200 characters)
localityYesCity or county (maximum 200 characters)
stateYesState or province name (maximum 200 characters)
zipCodeNoPostal code. Letters, digits, spaces and hyphens only, maximum 16 characters
countryCodeYesCode of the country of the organization
serialNumberDependsSerial number of the holder in the certificate (maximum 20 characters). Required if serialNumberMode is Required. Do not send it if the mode is Disabled
evCountryCodeDependsCode of the country of jurisdiction of incorporation. Required if evCountryMode is Required. Do not send it if the mode is Disabled
var response = await ampliaRegService.CreatePreApprovedOrderAsync(new CreatePreApprovedOrderOptions2<CreatePreApprovedOrderSslParameters>() {
RegistrationAuthorityId = Guid.Parse("3fa85f64-5717-4562-b3fc-2c963f66afa6"), // RA ID
CertificateType = CertificateTypeReference.FromCode("SSLOV"), // Certificate type code
Validity = PeriodModel.FromYears(1), // Certificate validity (the certificate type must allow it)
Parameters = new CreatePreApprovedOrderSslParameters() {
PrimaryDnsName = "www.example.com", // Primary DNS name of the certificate
AlternativeDnsNames = new List<string>() { "example.com" }, // Alternative DNS names
Organization = "Example Comércio LTDA", // Name of the organization
BusinessCategory = BusinessCategories.BusinessEntity, // Business category
StreetAddress = "Rua das Palmeiras, 120", // Street address
Locality = "São Paulo", // City or county
State = "São Paulo", // State or province name
ZipCode = "12345-678", // Postal code
CountryCode = "BR", // Code of the country of the organization
},
Contact = new ContactData() {
EmailAddress = "admin@example.com",
Phone = "+5511999990000",
},
});

Response​

The creation of a regular order returns the fields described in Response. The creation of a pre-approved order returns the issue keys and the issue links. See Creating pre-approved orders.

Common errors​

CodeWhen it happens
CertificateFormatMismatchIn the creation of a regular order: the certificate type has a format different from the route
NifIsRequiredCabo Verde, AutenticacaoIndividual and AssinaturaDigital subtypes: the regular order request has no nif
IdentificationIsRequiredCabo Verde, SeloElectronico subtype: the regular order request has no identification
IdentificationCountryCodeIsRequiredCabo Verde, SeloElectronico subtype: the regular order request has no identificationCountryCode
AdssValidationFailedCabo Verde, certificate type with keyMediaType equal to Adss: the emailAddress in contact has more than 50 characters

If a required parameters field is missing or a value has an incorrect format, the API returns a validation error. See HTTP status codes. For the other codes, see Error codes.

See also​

View as Markdown