彙整程序

啟用資料區隔

如要啟用其中一個資料區隔,請使用 curators.dataSegments.activate 方法。買方可以在交易或套裝方案中指定資料區隔。

下列範例會向 API 端點發出 HTTP POST 要求,啟用指定資料區隔。

curl API 呼叫範例

要求

curl --request POST \
'https://authorizedbuyersmarketplace.googleapis.com/v1beta/curators/[YOUR_ACCOUNT_ID]/dataSegments/test-data-segment-1:activate?key=[YOUR_API_KEY]' \
--header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{}' \
--compressed
    

回應

{
  "name": "curators/[YOUR_ACCOUNT_ID]/dataSegments/test-data-segment-1",
  "createTime": "2025-08-13T12:14:03.421Z",,
  "updateTime": "2025-08-14T19:47:40.253938Z",
  "cpmFee": {
    "currencyCode": "USD",
    "units": "1000000"
  },
  "state": "ACTIVE"
}
    

停用資料區隔

如要停用其中一個資料區隔,請使用 curators.dataSegments.deactivate 方法。

以下範例會向 API 端點發出 HTTP POST 要求,停用指定資料區隔。

curl API 呼叫範例

要求

curl --request POST \
'https://authorizedbuyersmarketplace.googleapis.com/v1beta/curators/[YOUR_ACCOUNT_ID]/dataSegments/test-data-segment-1:deactivate?key=[YOUR_API_KEY]' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{}' \
--compressed
    

回應

{
  "name": "curators/[YOUR_ACCOUNT_ID]/dataSegments/test-data-segment-1",
  "createTime": "2025-08-13T12:14:03.421Z",
  "updateTime": "2025-08-14T20:05:51.439110Z",
  "cpmFee": {
    "currencyCode": "USD",
    "units": "1000000"
  },
  "state": "INACTIVE"
}
    

後續步驟