Để thảo luận và đưa ra ý kiến phản hồi về các sản phẩm của chúng tôi, hãy tham gia kênh Discord chính thức của Google Ads trong máy chủ Cộng đồng quảng cáo và đo lường của Google.
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Nếu cần thực hiện trên nhiều loại thực thể cùng một lúc hoặc muốn ghi vào một điểm cuối duy nhất thay vì sử dụng một điểm cuối riêng biệt cho mỗi loại tài nguyên, thì bạn có thể sử dụng điểm cuối GoogleAdsService.Mutate cho tất cả các thao tác biến đổi được hỗ trợ.
mutate_operation1=client.operation(:Mutate)mutate_operation2=client.operation(:Mutate)campaign_operation=client.operation(:Campaign)ad_group_operation=client.operation(:AdGroup)# Do some setup here to get campaign_operation and ad_group_operation into the# state you would want them for a regular mutate call to their respective# services.mutate_operation1.campaign_operation=campaign_operationmutate_operation2.ad_group_operation=ad_group_operationgoogle_ads_service.mutate(customer_id,[mutate_operation1,mutate_operation2])
Giống như các dịch vụ khác, điểm cuối này hỗ trợ lỗi một phần và chỉ xác thực.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-27 UTC."],[[["\u003cp\u003eUse the \u003ccode\u003eGoogleAdsService.Mutate\u003c/code\u003e endpoint to operate on different entity types or prefer a single endpoint.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMutateGoogleAdsRequest\u003c/code\u003e accepts multiple \u003ccode\u003eMutateOperation\u003c/code\u003e entities, each handling a single operation for one resource type.\u003c/p\u003e\n"],["\u003cp\u003eConstruct separate \u003ccode\u003eMutateOperation\u003c/code\u003e objects for each desired operation, like creating a campaign and an ad group, and pass them to \u003ccode\u003eGoogleAdsService\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis endpoint supports partial failure handling and validate-only requests, similar to other Google Ads API services.\u003c/p\u003e\n"]]],[],null,["# Bulk Mutates\n\nIf you need to operate on different types of entities at the same time or\nprefer to write against a single endpoint rather than using a separate endpoint\nper resource type, then you can use the\n[`GoogleAdsService.Mutate`](/google-ads/api/reference/rpc/v21/GoogleAdsService/Mutate)\nendpoint for all supported mutate operations.\n| **Note:** You can see the full list of supported operations on the reference page for [`MutateOperation`](/google-ads/api/reference/rpc/v21/MutateOperation).\n\nMutate operations\n-----------------\n\nEach [`MutateGoogleAdsRequest`](/google-ads/api/reference/rpc/v21/MutateGoogleAdsRequest)\naccepts a repeated [`MutateOperation`](/google-ads/api/reference/rpc/v21/MutateOperation), each of\nwhich can include a single operation for one resource type. To create one\ncampaign and one ad group in a single\n[`GoogleAdsService.Mutate`](/google-ads/api/reference/rpc/v21/GoogleAdsService/Mutate) call,\nyou would need to create two [`MutateOperation`](/google-ads/api/reference/rpc/v21/MutateOperation)\nentities (one for the [`CampaignOperation`](/google-ads/api/reference/rpc/v21/CampaignOperation),\nthe other for the [`AdGroupOperation`](/google-ads/api/reference/rpc/v21/AdGroupOperation)),\nand then pass both to\n[`GoogleAdsService`](/google-ads/api/reference/rpc/v21/GoogleAdsService). \n\n### Ruby\n\n mutate_operation1 = client.operation(:Mutate)\n mutate_operation2 = client.operation(:Mutate)\n\n campaign_operation = client.operation(:Campaign)\n ad_group_operation = client.operation(:AdGroup)\n\n # Do some setup here to get campaign_operation and ad_group_operation into the\n # state you would want them for a regular mutate call to their respective\n # services.\n\n mutate_operation1.campaign_operation = campaign_operation\n mutate_operation2.ad_group_operation = ad_group_operation\n\n google_ads_service.mutate(customer_id, [mutate_operation1, mutate_operation2])\n\nLike other services, this endpoint supports\n[partial failure](/google-ads/api/docs/best-practices/partial-failures) and\nvalidate-only."]]