Create voucher order

POST https://www.digicert.com/services/v2/voucher
Use this endpoint to place a voucher order. To order voucher codes for multiple products at once, pass a voucher object for each product configuration you want to order.

Example requests and responses

cURL

curl --request POST 'https://www.digicert.com/services/v2/voucher' \
--header 'X-DC-DEVKEY: {{api_key}}' \
--header 'Content-Type: application/json' \
--data-raw '
{
  "vouchers": [
    {
      "product_name_id": "ssl_ev_basic",
      "no_of_fqdns": 5,
      "validity_years": 1,
      "quantity": 1,
      "use_san_package": true
    },
    {
      "product_name_id": "ssl_ev_securesite_pro",
      "no_of_fqdns": 2,
      "validity_years": 2,
      "quantity": 1
    }
  ],
  "payment_method": "balance"
}'

201 Created

{
  "id": 25261,
  "name": "Example",
  "status": "completed",
  "cost": 10039.9,
  "cost_plus_tax": 10039.9,
  "created_date": "2022-03-03 15:38:43",
  "expiration_date": "2023-03-03",
  "receipt_id": 200896,
  "codes": [
    {
      "id": 2104,
      "value": "QWWQ7LQSO72QLPXEXMC5OA65SHS2CPWJ",
      "product": {
        "name_id": "ssl_ev_basic"
      },
      "no_of_fqdns": 5,
      "validity_years": 1,
      "status": "active"
    },
    {
      "id": 2105,
      "value": "WWXPP6EC2GUXRYY4AE52FMOZ33K32M7K",
      "product": {
        "name_id": "ssl_ev_securesite_pro"
      },
      "no_of_fqdns": 2,
      "validity_years": 2,
      "status": "active"
    }
  ],
{
    "id": 1014,
    "name": "My test voucher order",
    "status": "completed",
    "cost": 2698,
    "expiration_date": "2021-07-09",
    "codes": [
        {
            "id": 2104,
            "value": "QWWQ7LQSO72QLPXEXMC5OA65SHS2CPWJ",
            "product": {
                "name_id": "ssl_ev_basic"
            },
            "no_of_fqdns": 5,
            "validity_years": 1,
            "status": "active"
        },
        {
            "id": 2105,
            "value": "WWXPP6EC2GUXRYY4AE52FMOZ33K32M7K",
            "product": {
                "name_id": "ssl_ev_securesite_pro"
            },
            "no_of_fqdns": 2,
            "validity_years": 2,
            "status": "active"
        }
    ],
}

Request parameters

NameReq/OptTypeDescription
vouchersrequiredarrayList of object containers for new vouchers to order.
.. product_name_idrequiredstringProduct name identifier. See Glossary – Product identifiers.
.. no_of_fqdnsoptionalintegerNumber of FQDN SAN slots.
Range: 0-250. Note that the total number of SANs cannot exceed 250.
.. no_of_wildcardsoptionalintegerNumber of Wildcard SAN slots.
Range: 0-250. Note that the total number of SANs cannot exceed 250.
.. validity_yearsconditionalintegerThe number of years of order coverage. You must provide a value for either validity_years or validity_days.
Range: Maximum order validity varies by product. To get the maximum order validity period for a product, use the Product info endpoint.
.. validity_daysconditionalintegerThe number of days of order coverage. Overrides validity_years. You must provide a value for either validity_years or validity_days.
Range: Maximum order validity varies by product. To get the maximum order validity period for a product, use the Product info endpoint.
.. quantityrequiredintegerQuantity of certificates you want to order with this configuration. Each certificate receives a unique voucher code.
Range: 1-1000
.. shipping_methodconditionalstringFor document signing and code signing certificates, choose how the requestor will provision or ship the certificates. Usage requirements depend on product type.
payment_methodrequiredstringSpecify the payment method to use.
Allowed values:balance, card, wire_transfer
credit_cardconditionalobjectObject with information about the credit card charged for the order. Required if payment_method is card; otherwise, ignored.
.. numberrequiredstringCredit card number.
.. expiration_monthrequiredintegerCredit card expiration month. Format as a two-digit number between 01 (Jan) and 12 (Dec).
.. expiration_yearrequiredintegerCredit card expiration year. Format as a four-digit number. For example: 2026
.. cvvrequiredintegerCard verification value (CVV). Format as a three- or four-digit number. For example: 333 or 4444
.. cardholder_namerequiredstringCardholder’s first and last name.
billing_addressconditionalobjectObject with information about the billing address. Required if payment_method is card; otherwise, ignored.
.. addressrequiredstringBilling street address.
.. address2optionalstringContinuation of street address.
.. cityrequiredstringBilling city.
.. stateconditionalstringBilling state or province. Optional for some countries.
.. countryrequiredstringBilling country.
.. zipconditionalstringBilling zip or postal code. Optional for some countries.
billing_contactconditionalobjectBilling contact to use for wire transfers. Required if payment_method is wire_transfer; otherwise, ignored.
.. namerequiredstringBilling contact name.
Character limit: 128
.. organization_namerequiredstringBilling contact organization name.
Character limit: 128
.. countryrequiredstringTwo-letter country code for the country where the billing contact resides.
Format: Must be a valid ISO 3166-1 alpha-2 code.
.. addressrequiredstringBilling contact address.
Character limit: 64
.. address2optionalstringContinuation of billing contact address.
Character limit: 64
.. cityrequiredstringBilling contact city.
Character limit: 64
.. stateoptionalstringBilling contact state or province.
Character limit: 64
.. ziprequiredintegerBilling contact zip or postal code.
Character limit: 10
.. emailrequiredstringBilling contact email address.
Character limit: 255
.. phoneoptionalstringBilling contact phone number.
Character limit: 32
nameoptionalstringInclude a customer name or organization that this voucher order is intended for. Only for tracking and order management purposes.
Character limit:
128
notesoptionalstringInclude any notes that help you with order management.
Character limit:
512

Response parameters

NameTypeDescription
idintegerVoucher order ID.
namestringVoucher order name provided in request.
statusstringStatus of Voucher order.
Possible values:active, used, canceled
costnumberVoucher order cost, without tax.
cost_plus_taxnumberVoucher order cost, with tax.
created_datestringDate and time the voucher order was created.
Format: YYYY-MM-DD hh-mm-ss
expiration_datestringDate the voucher order expires.
Format:YYYY-MM-DD
receipt_idintegerReceipt ID. Returned when the payment_method for the order is balance or card. Not returned if cost_plus_tax is 0.
invoice_idintegerInvoice ID. Returned when the payment_method for the order is wire_transfer. Not returned if cost_plus_tax is 0.
codesarrayList of objects with details about the voucher codes in this order. Each certificate in the order is returned as a separate object.
.. idintegerVoucher code ID.
.. valuestringUnique voucher code.
.. productobjectObject with product details.
.. .. name_idstringName ID of the product. See Glossary – Product identifiers.
.. no_of_fqdnsintegerNumber of FQDN SAN slots.
Possible values: 0-250. Note that the total number of SANs cannot exceed 250.
.. no_of_wildcardsintegerNumber of Wildcard SAN slots.
Possible values: 0-250. Note that the total number of SANs cannot exceed 250.
.. validity_yearsintegerNumber of years the certificate is valid. Only returned if the order request used validity_years to set the validity period.
.. validity_daysintegerNumber of days the certificate is valid. Only returned if the order request used validity_days to set the validity period.
.. statusstringVoucher code status.
notesstringNotes provided in request to help you manage the voucher order.