Список организаций субучётная запись

GET
https://www.digicert.com/services/v2/account/subaccount/{{subaccount_id}}/organization

Use this endpoint to get details about the organizations in a subaccount.

Example requests and responses

cURL
curl --request GET 'https://www.digicert.com/services/v2/account/subaccount/1389108/organization' \
--header 'X-DC-DEVKEY: {{api_key}}' \
--header 'Content-Type: application/json' \
Python
import requests

url = "https://www.digicert.com/services/v2/account/subaccount/1234567/organization"

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

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

print(response.text)
Go
package main

import (
		"fmt"
		"net/http"
		"io/ioutil"
)

func main() {

		url := "https://www.digicert.com/services/v2/account/subaccount/1234567/organization"
		method := "GET"

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

		if err != nil {
				fmt.Println(err)
				return
		}
		req.Header.Add("X-DC-DEVKEY", {{api_key}})
		req.Header.Add("Content-Type", "application/json")

		res, err := client.Do(req)
		if err != nil {
				fmt.Println(err)
				return
		}
		defer res.Body.Close()

		body, err := ioutil.ReadAll(res.Body)
		if err != nil {
				fmt.Println(err)
				return
		}
		fmt.Println(string(body))
}
NodeJS
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'https://www.digicert.com/services/v2/account/subaccount/1234567/organization',
  '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
{
  "organizations": [
    {
      "id": 12345678,
      "status": "active",
      "name": "Example Organization",
      "display_name": "Example Organization",
      "validations": [
        {
          "type": "ev",
          "name": "EV",
          "description": "Extended Organization Validation (EV)",
          "date_created": "2020-10-23T06:41:34+00:00",
          "validated_until": "2021-11-23T07:00:00+00:00",
          "status": "active"
        },
        {
          "type": "ov",
          "name": "OV",
          "description": "Normal Organization Validation",
          "date_created": "2020-10-23T06:40:51+00:00",
          "validated_until": "2021-11-23T07:00:00+00:00",
          "status": "active"
        }
      ]
    },
    …
  ]
}

Path parameters

Name Type Description
subaccount_id int ID of the subaccount to query.

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[status] – Use active or inactive
  • filters[validation] – Use pending to include organizations with pending validations, or not_pending to include organizations without pending validations.
filters[search] optional string Limits response to results where the value of the name property matches or contains a specific string of characters.
  • To search for values that contain a specific string of characters, prefix the string with a URL encoded (percent-encoded) % character: %25
  • To search for values that are an exact match for a string of characters, omit the %25 from the request.
Examples:
  • filters[search]=%25example
    Limits response to results where the value of a searched property contains the string example
  • filters[search]=example.com
    Limits response to results where the values of a searched property is an exact match for the string example.com
sort optional string Sorts results by the value of one or more properties.

By default, sorts 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
  • name
  • is_active
limit optional int Total number of results to include in the response.
Maximum: 1000 (default)
offset optional int Index of the first result to include in the response.
Default 0

Response parameters

Name Type Description
organizations array List of objects with information about each organization.
.. id int Organization ID.
.. status string Organization status.
Possible values: activeinactive. For more information, see Glossary - Organization status.
.. name string Organization legal name.
.. display_name string Organization display name.
.. validations array List of objects with details about the validation for the organization.
Note: Organizations with no validations do not return a validations array.
.. .. type string Validation type identifier.
Possible values: See Glossary – Validation types
.. .. name string Name of the validation type.
.. .. description string Description of the validation type.
.. .. date_created string Date and time the organization was validated.
Format: YYYY-MM-DDThh:mm:ssTZD
UTC time zone and ISO 8601 date.
.. .. validated_until string Date and time the validation expires.
Format: YYYY-MM-DDThh:mm:ssTZD
UTC time zone and ISO 8601 date.
.. .. status string Validation status.
Possible values: See Glossary – Organization validation statuses.
page object Object with pagination details.
Modified using URL query strings.