Để 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.
API Google Ads cung cấp một số cách để thay đổi tài nguyên, tuỳ thuộc vào
trường hợp sử dụng của bạn. Mỗi tài nguyên có một dịch vụ tương ứng cho phép bạn chỉ định các hoạt động thay đổi cho loại tài nguyên cụ thể đó. Ví dụ: tài nguyên Campaign có điểm cuối CampaignService.MutateCampaigns tương ứng để thay đổi các chiến dịch.
Các hành động theo nhóm trên nhiều dịch vụ tài nguyên. Các lệnh gọi thông thường chỉ có thể thực thi các thao tác đối với một dịch vụ tài nguyên duy nhất.
Tên tài nguyên tạm thời. Kết hợp các thao tác để tạo một thực thể và các thực thể con trong yêu cầu đó.
Với hai thuộc tính này, bạn có thể sử dụng
GoogleAdsService.Mutate để, ví dụ, chỉ tạo toàn bộ cấu trúc chiến dịch nếu mỗi bước trong quá trình
thành công.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-27 UTC."],[[["\u003cp\u003eThe Google Ads API offers resource-specific services and the \u003ccode\u003eGoogleAdsService.Mutate\u003c/code\u003e endpoint for modifying resources.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eGoogleAdsService.Mutate\u003c/code\u003e enables grouped actions across various resource services and supports temporary resource names for creating entities and their children in one request.\u003c/p\u003e\n"],["\u003cp\u003eWhile resource-specific services handle mutations for their resource type, \u003ccode\u003eGoogleAdsService.Mutate\u003c/code\u003e provides flexibility for complex operations, ensuring all steps succeed.\u003c/p\u003e\n"],["\u003cp\u003eCross-account mutations are generally prohibited, with exceptions for manager accounts acting on client-created objects.\u003c/p\u003e\n"]]],[],null,["# Mutating Resources\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nThe Google Ads API provides a few different ways for mutating resources, depending on\nyour use case. Each resource has a corresponding service that lets you\nspecify mutate operations for that specific resource type. For example, the\n`Campaign` resource has a corresponding\n[`CampaignService.MutateCampaigns`](/google-ads/api/reference/rpc/v21/CampaignService/MutateCampaigns)\nendpoint for mutating campaigns.\n\nAnother option is the\n[`GoogleAdsService.Mutate`](/google-ads/api/reference/rpc/v21/GoogleAdsService/Mutate) endpoint,\nwhich essentially wraps a series of individual mutate calls on the resource\nservices and [provides the following benefits](/google-ads/api/docs/mutating/best-practices):\n\n- **Grouped actions across different resource services.** Normal calls can only execute operations against a single resource service.\n- **Temporary resource names.** Combine operations to create an entity and its child entities in a single request.\n\nWith these two properties, you can use\n[`GoogleAdsService.Mutate`](/google-ads/api/reference/rpc/v21/GoogleAdsService/Mutate) to, for\nexample, create an entire campaign structure only if every step along the way\nsucceeds.\n| **Key Point:** Generally, cross-account mutating is not allowed; an account cannot mutate objects that it didn't create, unless it is the manager of the client that created the object."]]