--- title: "List unit orders" source_url: https://dev.digicert.com/certcentral-apis/services-api/subaccount/list-unit-orders.html api_method: GET api_endpoint: "/services/v2/units/order" api_url: "https://www.digicert.com/services/v2/units/order" --- **GET** `https://www.digicert.com/services/v2/units/order` Use this endpoint to get a list of unit orders. ## Example requests and responses **cURL** ```bash curl --request GET 'https://www.digicert.com/services/v2/units/order' \ --header 'X-DC-DEVKEY: {{api_key}}' \ --header 'Content-Type: application/json' ``` **Python** ```python import requests url = "https://www.digicert.com/services/v2/units/order" payload = {} headers = { 'X-DC-DEVKEY': {{api_key}}, 'Content-Type': 'application/json' } response = requests.request("GET", url, headers=headers, data = payload) print(response.text.encode('utf8')) ``` **Go** ```go package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://www.digicert.com/services/v2/units/order" method := "GET" client := &http.Client { } req, err := http.NewRequest(method, url, nil) if err != nil { fmt.Println(err) } req.Header.Add("X-DC-DEVKEY", {{api_key}}) req.Header.Add("Content-Type", "application/json") res, err := client.Do(req) defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) fmt.Println(string(body)) } ``` **NodeJS** ```javascript var request = require('request'); var options = { 'method': 'GET', 'url': 'https://www.digicert.com/services/v2/units/order', 'headers': { 'X-DC-DEVKEY': {{api_key}}, 'Content-Type': 'application/json' } }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); ``` ## 200 OK ```json { "orders": [ { "id": 1003, "unit_account_id": 1234567, "unit_account_name": "Example Subaccount", "cost": 10, "currency": "USD", "status": "completed", "expiration_date": "2021-11-02", "created_date": "2020-11-02 13:19:47" }, { "id": 1007, "unit_account_id": 1234567, "unit_account_name": "Example Subaccount", "cost": 3, "currency": "USD", "status": "completed", "expiration_date": "2021-11-02", "created_date": "2020-11-02 13:24:16" }, { "id": 1011, "unit_account_id": 1234567, "unit_account_name": "Example Subaccount", "cost": 15, "currency": "USD", "status": "completed", "expiration_date": "2021-11-03", "created_date": "2020-11-03 02:13:58" } ], "page": { "total": 3, "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](https://dev.digicert.com/md/certcentral-apis/services-api.md#filters-sorting-and-pagination-parameters).
Name Req/Opt Type Description
filters[{{property_name}}] optional string Filters results by the specified property.
Replace {{property_name}} in your request with the property to use for filtering. This endpoint supports filtering by the following properties:
  • filters[unit_account_id]
  • filters[status]
sort optional string Sorts 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 this list.
This endpoint supports sorting by the following properties:
  • id
  • unit_account_id
  • unit_account_name
  • cost
  • status
  • expiration_date
  • created_date
offset optional integer Index of the first result to include in the response.
Default: 0
limit optional integer Total number of results to include in the response.
Max: 1000 (default)
## Response parameters
Name Type Description
orders array List of objects with details for each unit order.
.. id integer ID of the order.
.. unit_account_id integer Account ID of the subaccount on the order.
.. unit_account_name string Name of the subaccount on the order.
.. cost double Total order cost.
.. currency string Currency unit for order cost.
.. status string Order status.
Possible values: completed, canceled
.. expiration_date string Expiration date of the units.
Format: YYYY-MM-DD
.. created_date string Creation timestamp for the order.
Format: YYYY-MM-DD hh:mm:ss
page object Pagination details for the results. Modified using URL query strings.