共用方式為


GetBulkUploadStatus 服務作業 - 大量

取得大量上傳要求的狀態和完成進度。

要求專案

GetBulkUploadStatusRequest 物件會定義服務作業要求的主體標頭元素。 元素的順序必須與 要求SOAP中所示的順序相同。

注意事項

除非下面另有說明,否則所有要求專案都是必要的。

要求本文專案

元素 描述 資料類型
RequestId 上傳要求的標識碼。

標識碼的有效期最多為15分鐘。 如果您尚未在此期間內成功上傳檔案,則必須取得新的要求標識碼並上傳 URL。
string

要求標頭元素

元素 描述 資料類型
AuthenticationToken OAuth 存取令牌,代表有權Microsoft Advertising 帳戶之用戶的認證。

如需詳細資訊,請 參閱使用 OAuth 進行驗證
string
CustomerAccountId 擁有或與要求中實體相關聯之廣告帳戶的標識碼。 當兩者都需要時,此標頭元素必須具有與 AccountId body 元素相同的值。 此元素是大部分服務作業的必要專案,最佳做法是一律加以設定。

如需詳細資訊, 請參閱取得您的帳戶和客戶標識符
string
CustomerId (使用者存取或操作之使用者) 客戶的管理員帳戶標識碼。 用戶可以存取多個管理員帳戶。 此元素是大部分服務作業的必要專案,最佳做法是一律加以設定。

如需詳細資訊, 請參閱取得您的帳戶和客戶標識符
string
DeveloperToken 用來存取 Bing 廣告 API 的開發人員令牌。

如需詳細資訊 ,請參閱取得開發人員令牌
string
密碼 此元素會保留供內部使用,並會從未來的 API 版本中移除。 您必須使用 AuthenticationToken 元素來設定用戶認證。 string
UserName 此元素會保留供內部使用,並會從未來的 API 版本中移除。 您必須使用 AuthenticationToken 元素來設定用戶認證。 string

Response 元素

GetBulkUploadStatusResponse 物件會定義服務作業響應的主體標頭元素。 這些元素的傳回順序與 回應SOAP中所示的順序相同。

回應本文專案

元素 描述 資料類型
錯誤 OperationError 物件的數位,對應至在 HTTP POST 上傳完成之後,大量檔案系統處理期間所發生的錯誤。

例如,如果上傳的檔案包含對應的檔格式版本不支援的一或多筆大量記錄, OperationError 就會包含 BulkServiceFormatVersionNotSupported 錯誤碼。
OperationError 陣
ForwardCompatibilityMap 用於向前相容性的索引鍵和值字串清單,以避免在目前 API 版本中新增新元素時中斷變更。

未來的版本中將會記下向前相容性變更。 此作業目前沒有向前相容性變更。
KeyValuePairOfstringstring 陣
PercentComplete 上傳大量檔案之系統處理的進度完成百分比。 值範圍介於 0 到 100 之間。

您也應該比較上傳狀態。 如果上傳失敗,完成百分比會重設為零 (0) 。
int
RequestStatus 上傳的狀態。 以下是可能傳回的狀態值。

已完成 - 已接受並成功處理上傳檔案,但未發生錯誤。

CompletedWithErrors - 上傳已完成,併發生一或多個錯誤。 當整體上傳成功時,可能會發生一或多個新增或更新錯誤。 最佳做法是在呼叫 GetBulkUploadUrl 時透過 ResponseMode 元素要求錯誤資訊,並檢查 ResultFileUrl 是否有任何錯誤。

失敗 - 整個上傳因為未預期的錯誤而失敗。 您可以提交實體較少的新上傳,或稍後再試一次提交相同的上傳。

FileUploaded - 已收到上傳要求,且正在佇列中進行處理。

InProgress - 已接受上傳檔案,且上傳正在進行中。

PendingFileUpload - 尚未收到對應 RequestId 的上傳檔案。

UploadFileRowCountExceeded - 已超過上傳檔案中大量記錄的限制。 如需限制和上傳最佳做法的詳細資訊,請參閱 大量上傳

UploadFileFormatNotSupported - 此大量 API 版本不支援上傳中指定的 [ 格式版本名稱 ] 字段。
string
ResultFileUrl 包含要求結果之檔案的 URL,例如上傳錯誤資訊。

URL 必須在 GetBulkUploadStatus 作業傳回 Completed 或CompletedWithErrors 狀態回應字串串的五分鐘內使用。 如果您未在這段時間內開始下載,則必須再次呼叫 GetBulkUploadStatus 以取得新的 URL。 您不應該對下載 URL 的網域採取相依性,因為它可能會變更。
string

回應標頭元素

元素 描述 資料類型
TrackingId 包含 API 呼叫詳細數據的記錄項目識別碼。 string

要求SOAP

此範本是由工具所產生,用來顯示SOAP要求的主體標頭元素順序。 如需可搭配此服務作業使用的支援類型,請參閱上述 的要求本文項目 參考。

<s:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
    <Action mustUnderstand="1">GetBulkUploadStatus</Action>
    <AuthenticationToken i:nil="false">ValueHere</AuthenticationToken>
    <CustomerAccountId i:nil="false">ValueHere</CustomerAccountId>
    <CustomerId i:nil="false">ValueHere</CustomerId>
    <DeveloperToken i:nil="false">ValueHere</DeveloperToken>
  </s:Header>
  <s:Body>
    <GetBulkUploadStatusRequest xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
      <RequestId i:nil="false">ValueHere</RequestId>
    </GetBulkUploadStatusRequest>
  </s:Body>
</s:Envelope>

回應 SOAP

此範本是由工具所產生,用來顯示SOAP回應的 主體標頭 元素順序。

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
    <TrackingId d3p1:nil="false" xmlns:d3p1="http://www.w3.org/2001/XMLSchema-instance">ValueHere</TrackingId>
  </s:Header>
  <s:Body>
    <GetBulkUploadStatusResponse xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
      <Errors d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
        <OperationError>
          <Code>ValueHere</Code>
          <Details d4p1:nil="false">ValueHere</Details>
          <ErrorCode d4p1:nil="false">ValueHere</ErrorCode>
          <Message d4p1:nil="false">ValueHere</Message>
        </OperationError>
      </Errors>
      <ForwardCompatibilityMap xmlns:e216="http://schemas.datacontract.org/2004/07/System.Collections.Generic" d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
        <e216:KeyValuePairOfstringstring>
          <e216:key d4p1:nil="false">ValueHere</e216:key>
          <e216:value d4p1:nil="false">ValueHere</e216:value>
        </e216:KeyValuePairOfstringstring>
      </ForwardCompatibilityMap>
      <PercentComplete>ValueHere</PercentComplete>
      <RequestStatus d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">ValueHere</RequestStatus>
      <ResultFileUrl d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">ValueHere</ResultFileUrl>
    </GetBulkUploadStatusResponse>
  </s:Body>
</s:Envelope>

程序代碼語法

範例語法可以與 Bing 廣告 SDK 搭配使用。 如需更多範例,請參閱 Bing 廣告 API 程式代碼範 例。

public async Task<GetBulkUploadStatusResponse> GetBulkUploadStatusAsync(
	string requestId)
{
	var request = new GetBulkUploadStatusRequest
	{
		RequestId = requestId
	};

	return (await BulkService.CallAsync((s, r) => s.GetBulkUploadStatusAsync(r), request));
}
static GetBulkUploadStatusResponse getBulkUploadStatus(
	java.lang.String requestId) throws RemoteException, Exception
{
	GetBulkUploadStatusRequest request = new GetBulkUploadStatusRequest();

	request.setRequestId(requestId);

	return BulkService.getService().getBulkUploadStatus(request);
}
static function GetBulkUploadStatus(
	$requestId)
{

	$GLOBALS['Proxy'] = $GLOBALS['BulkProxy'];

	$request = new GetBulkUploadStatusRequest();

	$request->RequestId = $requestId;

	return $GLOBALS['BulkProxy']->GetService()->GetBulkUploadStatus($request);
}
response=bulk_service.GetBulkUploadStatus(
	RequestId=RequestId)

需求

服務: BulkService.svc v13
命名空間: https://bingads.microsoft.com/CampaignManagement/v13