Create unit order


Use this endpoint to create a unit order. Unit orders allow you to buy units for the subaccounts you manage.

To buy units for a subaccount, the pricing method for the subaccount must be set to units. To get the pricing method for a subaccount, use the List subaccount products endpoint.

To create a unit order, the option to allow unit transfers must be enabled for your account. To find out if this option is enabled for your account, contact your account manager.

Example requests and responses

curl --request POST '' \
--header 'X-DC-DEVKEY: {{api_key}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "unit_account_id": {{unit_account_id}},
    "notes": "Notes about the order",
    "bundle": [
            "product_name_id": "ssl_securesite_flex",
            "units": "5"
            "product_name_id": "ssl_ev_securesite_flex",
            "units": "20"
import requests

url = ""

payload = "{\n    \"unit_account_id\": {{unit_account_id}},\n    \"notes\": \"For Testing Purpose\",\n    \"bundle\": [\n        {\n            \"product_name_id\": \"ssl_securesite_flex\",\n            \"units\": \"5\"\n        },\n\t\t{\n            \"product_name_id\": \"ssl_ev_securesite_flex\",\n            \"units\": \"20\"\n        }\n    ]\n}"
headers = {
  'X-DC-DEVKEY': {{api_key}},
  'Content-Type': 'application/json'

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

package main

import (

func main() {

		url := ""
		method := "POST"

		payload := strings.NewReader("{\n    \"unit_account_id\": {{unit_account_id}},\n    \"notes\": \"For Testing Purpose\",\n    \"bundle\": [\n        {\n            \"product_name_id\": \"ssl_securesite_flex\",\n            \"units\": \"5\"\n        },\n		{\n            \"product_name_id\": \"ssl_ev_securesite_flex\",\n            \"units\": \"20\"\n        }\n    ]\n}")

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

		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': 'POST',
  'url': '',
  'headers': {
    'X-DC-DEVKEY': {{api_key}},
    'Content-Type': 'application/json'
  body: "{\n    \"unit_account_id\": {{unit_account_id}},\n    \"notes\": \"For Testing Purpose\",\n    \"bundle\": [\n        {\n            \"product_name_id\": \"ssl_securesite_flex\",\n            \"units\": \"5\"\n        },\n\t\t{\n            \"product_name_id\": \"ssl_ev_securesite_flex\",\n            \"units\": \"20\"\n        }\n    ]\n}"

request(options, function (error, response) {
  if (error) throw new Error(error);
201 Created
  "id": 1371

Request parameters

Name Req/Opt Type Description
unit_account_id required integer ID of the subaccount to buy units for.
To get IDs for the subaccounts you manage, use the List subaccounts endpoint.
notes optional string Custom note to attach to the order.
Character limit: 512
bundle required array List of one or more objects with information about the amount of units to order for each type of product.
.. product_name_id required string Unique identifier for the product that you want to order units for.
Allowed values: See Glossary - Product identifiers.
.. units required integer Amount of units to order for the specified product.

Response parameters

Name Type Description
id integer ID of the order.