---
title: "POST /v4/sdfdownloadtasks"
method: POST
path: "/v4/sdfdownloadtasks"
tags: ["sdfdownloadtasks"]
---

# POST /v4/sdfdownloadtasks

`POST /v4/sdfdownloadtasks`

Creates an SDF Download Task. Returns an Operation. An SDF Download Task is a long-running, asynchronous operation. The metadata type of this operation is SdfDownloadTaskMetadata. If the request is successful, the response type of the operation is SdfDownloadTask. The response will not include the download files, which must be retrieved with media.download. The state of operation can be retrieved with `sdfdownloadtasks.operations.get`. Any errors can be found in the error.message. Note that error.details is expected to be empty.

## Request body

- CreateSdfDownloadTaskRequest — Request message for [SdfDownloadTaskService.CreateSdfDownloadTask].
  - `parentEntityFilter` ParentEntityFilter — A filtering option that filters on selected file types belonging to a chosen set of filter entities.
    - `filterIds` string[] — The IDs of the specified filter type. This is used to filter entities to fetch. If filter type is not `FILTER_TYPE_NONE`, at least one ID must be specified.
    - `filterType` 'FILTER_TYPE_UNSPECIFIED' | 'FILTER_TYPE_NONE' | 'FILTER_TYPE_ADVERTISER_ID' | 'FILTER_TYPE_CAMPAIGN_ID' | 'FILTER_TYPE_MEDIA_PRODUCT_ID' | 'FILTER_TYPE_INSERTION_ORDER_ID' | 'FILTER_TYPE_LINE_ITEM_ID' — Required. Filter type used to filter fetched entities.
    - `fileType` string[] — Required. File types that will be returned.
  - `partnerId` string, int64 — The ID of the partner to download SDF for.
  - `advertiserId` string, int64 — The ID of the advertiser to download SDF for.
  - `inventorySourceFilter` InventorySourceFilter — A filtering option for filtering on Inventory Source entities.
    - `inventorySourceIds` string[] — Inventory Sources to download by ID. All IDs must belong to the same Advertiser or Partner specified in CreateSdfDownloadTaskRequest. Leave empty to download all Inventory Sources for the selected Advertiser or Partner.
  - `idFilter` IdFilter — A filtering option that filters entities by their entity IDs.
    - `insertionOrderIds` string[] — Insertion Orders to download by ID. All IDs must belong to the same Advertiser or Partner specified in CreateSdfDownloadTaskRequest.
    - `lineItemQaIds` string[] — Optional. Line Items, by ID, to download in QA format. All IDs must belong to the same Advertiser or Partner specified in CreateSdfDownloadTaskRequest.
    - `campaignIds` string[] — Campaigns to download by ID. All IDs must belong to the same Advertiser or Partner specified in CreateSdfDownloadTaskRequest.
    - `mediaProductIds` string[] — Media Products to download by ID. All IDs must belong to the same Advertiser or Partner specified in CreateSdfDownloadTaskRequest.
    - `lineItemIds` string[] — Line Items to download by ID. All IDs must belong to the same Advertiser or Partner specified in CreateSdfDownloadTaskRequest.
    - `adGroupAdIds` string[] — YouTube Ads to download by ID. All IDs must belong to the same Advertiser or Partner specified in CreateSdfDownloadTaskRequest.
    - `adGroupIds` string[] — YouTube Ad Groups to download by ID. All IDs must belong to the same Advertiser or Partner specified in CreateSdfDownloadTaskRequest.
    - `adGroupQaIds` string[] — Optional. YouTube Ad Groups, by ID, to download in QA format. All IDs must belong to the same Advertiser or Partner specified in CreateSdfDownloadTaskRequest.
  - `version` 'SDF_VERSION_UNSPECIFIED' | 'SDF_VERSION_3_1' | 'SDF_VERSION_4' | 'SDF_VERSION_4_1' | 'SDF_VERSION_4_2' | 'SDF_VERSION_5' | 'SDF_VERSION_5_1' | 'SDF_VERSION_5_2' | 'SDF_VERSION_5_3' | 'SDF_VERSION_5_4' | 'SDF_VERSION_5_5' | 'SDF_VERSION_6' | 'SDF_VERSION_7' | 'SDF_VERSION_7_1' | 'SDF_VERSION_8' | 'SDF_VERSION_8_1' | 'SDF_VERSION_9' | 'SDF_VERSION_9_1' | 'SDF_VERSION_9_2' | 'SDF_VERSION_10' — Required. The SDF version of the downloaded file. If set to `SDF_VERSION_UNSPECIFIED`, this will default to the version specified by the advertiser or partner identified by `root_id`. An advertiser inherits its SDF version from its partner unless configured otherwise.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/displayvideo.md) · [All operations](https://skmtc.dev/google/apis/displayvideo/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/displayvideo/revisions/68b64e49eced/schema)
