Lista de pedidos de unidades


Use this endpoint to get a list of unit orders.

Example requests and responses

curl --request GET '' \
--header 'X-DC-DEVKEY: {{api_key}}' \
--header 'Content-Type: application/json'
import requests

url = ""

payload = {}
headers = {
  'X-DC-DEVKEY': {{api_key}},
  'Content-Type': 'application/json'

response = requests.request("GET", url, headers=headers, data = payload)

package main

import (

func main() {

		url := ""
		method := "GET"

		client := &http.Client {
		req, err := http.NewRequest(method, url, nil)

		if err != nil {
		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)

var request = require('request');
var options = {
  'method': 'GET',
  'url': '',
  'headers': {
    'X-DC-DEVKEY': {{api_key}},
    'Content-Type': 'application/json'
request(options, function (error, response) {
  if (error) throw new Error(error);
200 OK
  "orders": [
      "id": 1003,
      "unit_account_id": 1234567,
      "unit_account_name": "Example Subaccount",
      "cost": 10,
      "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,
      "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,
      "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.

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.
.. 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.