# Create a download order

Creates a download order for the specified assets using the defined download options.

Endpoint: POST /api/downloadorders
Version: v1.0
Security: OAuth2

## Security:

  - `OAuth2` (unknown)
    oauth2

## Request body:

  - `application/json-patch+json, application/json, text/json, application/*+json` (unknown)
    A download order request that contains the order details.

## Request fields (application/json-patch+json):

  - `target_selection` (object)
    Describes what selection pool to use for an order. The selection pool contains the list of entities to download.

  - `target_selection.selectionPool` (string)
    The identifier of the selection pool that contains the entities to download.

  - `target_selection.subPoolId` (integer)
    When a selection pool is page specific, the ID of the entity on the page. For example, in the case of a selection pool for the assets in a collection, the ID of the collection.

  - `target_selection.definitionName` (string)
    The definition name of the download order items, for example, `M.Asset`.

  - `item_name_resolver_id` (string)
    The ID of the item name resolver.

  - `culture` (string)
    The culture code of the download order, for example, `en-US`.

  - `name` (string)
    The name of the download order.

  - `order` (object, required)
    The configuration to create an order.

  - `order.zip_filename` (string)
    The name of the ZIP file.

  - `order.global` (object)
    Configuration of what to download by asset media group. For example, the rendition `MP4` for all videos, and the `medium` for all images. Asset media groups are identified by their ID.

  - `order.individual` (object)
    Configuration of what to download for individual assets. To use when willing to download something different for specific assets than for the rest of the assets of the same media group. For example, to download the rendition `MP4` for a video asset with ID 1234, while for all other videos, the `Original` rendition will be downloaded through the `global` configuration.

  - `download_order_type` (string)
    The type of order, for example, `Standard` or `Custom`.
    Enum: "Standard", "Custom"

## Response 201:

  - `201` (unknown)
    Created

## Response 201 fields (application/json):

  - `order_id` (integer)
    The ID of the download order.

  - `name` (string)
    The name of the download order.

  - `target_count` (integer)
    The number of targets contained in the download order.

  - `has_conversions` (boolean)
    Whether the order contains converted files or not.

  - `created_by` (object)
    Represents a link to a resource.

  - `created_by.href` (string)
    Gets or sets the URI that points to the resource this link refers to.

  - `created_by.filename_properties` (array)
    Gets or sets the URI that points to the resource this link refers to.

  - `created_by.title` (string)
    Gets or sets the title that describes this link.

  - `created_by.templated` (boolean)
    Gets or sets a value indicating whether the contained URI is a template.

  - `created_on` (string)
    The date the download order was created.

  - `status` (string)
    The status of the download order, for example, `Completed`.

  - `additional_info` (string)
    Additional information about the download order.

  - `culture` (string)
    The culture code of the download order, for example `en-US`.

## Response 400:

  - `400` (unknown)
    Request not valid

## Response 401:

  - `401` (unknown)
    Unauthorized request

