List all voucher orders

GET https://www.digicert.com/services/v2/voucher

Use this endpoint to list all voucher orders. For more information, see Vouchers.

To get the list of orders in CSV format, set the Accept header in the request to text/csv.

Example requests and responses

cURL

curl --request GET 'https://www.digicert.com/services/v2/voucher' \
--header 'X-DC-DEVKEY: {{api_key}}'

200 OK

{
  "voucher_orders": [
    {
      "id": 1002,
      "name": "Example Organization",
      "status": "canceled",
      "cost": 100.5,
      "currency": "USD",
      "cost_plus_tax": 100.5,
      "created_date": "2020-04-17 09:41:22",
      "expiration_date": "2021-04-17",
      "receipt_id": 12345
    },
    {
      "id": 1003,
      "name": "Example Organization",
      "status": "completed",
      "cost": 85.5,
      "currency": "USD",
      "cost_plus_tax": 85.5,
      "created_date": "2020-04-17 09:44:26",
      "expiration_date": "2021-04-17",
      "receipt_id": 12346
    }
  ],
  "page": {
    "total": 2,
    "limit": 1000,
    "offset": 0
  }
}

Filters and URL query parameters

This endpoint supports filters, sorting, and pagination. For general information and examples of the syntax to use when applying filters and sorting results, see Services API – Filters, sorting, and pagination parameters.

NameReq/OptTypeDescription
filters[{{property_name}}]optionalstringFilters results by the specified property. Replace {{property_name}} in your request with the property to use for filtering.
If the value of the property is a date (for example, created_date or expiration_date), you can filter by date range.
  • To filter by date range, separate the start date and end date with an ellipsis (...).
  • To return all results before a specific date, prefix the date with a less than (<) character.
  • To return all results after a date, prefix the date with a greater than (>) character.

For examples of filtering by date range, see Services API – Filters, sorting, and pagination parameters.
Supported filters:
  • filters[product_name_id]: Filters by product identifier. See Glossary – Product identifiers.
  • filters[status]: Filters by order status (completed or canceled).
  • filters[codes_status]: Filters by voucher code usage status. Accepts none (no codes used), unused (one or more codes unused), partial (one or more codes used), and used (all codes used).
  • filters[created_date]: Filters by order creation date.
  • filters[expiration_date]: Filters by order expiration date.
  • filters[name]: Filters by order name. By default, returns voucher orders with a name value that is an exact match for the provided filter value. To return orders with a name that is a partial match, prefix the filter value with a %. Example: filters[name]=%partial
  • filters[id]: Filters by order ID.

For example, to retrieve only active voucher orders, you can use the following request URL: GET https://www.digicert.com/services/v2/voucher?filters[status]=active
sortoptionalstringSorts results by the value of one or more properties.
By default, sorts results in ascending alphabetical order (0-9, A-Z). To sort in descending alphabetical order (9-0, Z-A), prefix the property name with a minus (-).
To sort by multiple properties, separate the name of each property with a comma. Sort hierarchy matches the order of properties in the comma-separated list.
This endpoint supports sorting by the following properties:
  • id
  • created_date
  • status
  • name
  • cost_plus_tax

For example, to sort voucher orders by creation date in descending order, you can use the following request URL: GET https://www.digicert.com/services/v2/voucher?sort=-created_date
limitoptionalintegerTotal number of results to include in the response.
Max:1000 (default)
For example, to fetch the second page of results with 50 orders per page, you can use the following request URL: GET https://www.digicert.com/services/v2/voucher?limit=50&offset=50
offsetoptionalintegerIndex of the first result to include in the response.
Default:0
For example, to fetch the third page of results with 50 orders per page, you can use the following request URL: GET https://www.digicert.com/services/v2/voucher?limit=50&offset=100

Response parameters

NameTypeDescription
voucher_ordersobjectList of voucher order objects.
.. idintegerVoucher order ID.
.. statusstringStatus of voucher order.
Possible values:completed, canceled
.. costnumberVoucher order cost, without tax.
.. cost_plus_taxnumberVoucher order cost, with tax.
.. currencystringCurrency unit for voucher order cost.
.. created_datestringDate the voucher order was created.
Format: YYYY-MM-DD HH:MM:SS
.. expiration_datestringVoucher order expiration date.
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.
.. notesstringNotes provided in request to help you manage the voucher order.
pageobjectObject with pagination details.