[null,null,["Last updated 2025-02-25 UTC."],[[["\u003cp\u003eEnables batch operations (delete, fetch, get, insert, update) on multiple datafeeds using a single HTTP POST request.\u003c/p\u003e\n"],["\u003cp\u003eRequires providing a \u003ccode\u003eDatafeedsCustomBatchRequest\u003c/code\u003e object in the request body, specifying individual operations within the batch.\u003c/p\u003e\n"],["\u003cp\u003eResponses are structured as a \u003ccode\u003eDatafeedsCustomBatchResponse\u003c/code\u003e, containing individual \u003ccode\u003eDatafeedsCustomBatchResponseEntry\u003c/code\u003e objects for each operation.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization is necessary using the \u003ccode\u003ehttps://www.googleapis.com/auth/content\u003c/code\u003e scope.\u003c/p\u003e\n"],["\u003cp\u003eEach batch entry requires a unique \u003ccode\u003ebatchId\u003c/code\u003e, \u003ccode\u003emerchantId\u003c/code\u003e, the desired \u003ccode\u003emethod\u003c/code\u003e, and optionally \u003ccode\u003edatafeedId\u003c/code\u003e and/or \u003ccode\u003edatafeed\u003c/code\u003e object depending on the operation.\u003c/p\u003e\n"]]],["This content outlines the `DatafeedsCustomBatch` API, which allows for batch operations on datafeeds. Key actions include deleting, fetching, getting, inserting, and updating multiple datafeeds via a single `POST` request to a specified endpoint. The request body utilizes `DatafeedsCustomBatchRequest` to manage multiple requests, each with a unique ID and method. Responses are structured within `DatafeedsCustomBatchResponse`, which contain an array of `DatafeedsCustomBatchResponseEntry`, indicating success or failure. OAuth scope `https://www.googleapis.com/auth/content` is required.\n"],null,["# Method: datafeeds.custombatch\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.DatafeedsCustomBatchResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [DatafeedsCustomBatchRequest](#DatafeedsCustomBatchRequest)\n - [JSON representation](#DatafeedsCustomBatchRequest.SCHEMA_REPRESENTATION)\n- [DatafeedsCustomBatchRequestEntry](#DatafeedsCustomBatchRequestEntry)\n - [JSON representation](#DatafeedsCustomBatchRequestEntry.SCHEMA_REPRESENTATION)\n- [DatafeedsCustomBatchResponseEntry](#DatafeedsCustomBatchResponseEntry)\n - [JSON representation](#DatafeedsCustomBatchResponseEntry.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nDeletes, fetches, gets, inserts and updates multiple datafeeds in a single request.\n\n### HTTP request\n\n`POST https://shoppingcontent.googleapis.com/content/v2.1/datafeeds/batch`\n\n### Request body\n\nThe request body contains an instance of [DatafeedsCustomBatchRequest](/shopping-content/reference/rest/v2.1/datafeeds/custombatch#DatafeedsCustomBatchRequest).\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"entries\": [ { object (/shopping-content/reference/rest/v2.1/datafeeds/custombatch#DatafeedsCustomBatchResponseEntry) } ], \"kind\": string } ``` |\n\n| Fields ||\n|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `entries[]` | `object (`[DatafeedsCustomBatchResponseEntry](/shopping-content/reference/rest/v2.1/datafeeds/custombatch#DatafeedsCustomBatchResponseEntry)`)` The result of the execution of the batch requests. |\n| `kind` | `string` Identifies what kind of resource this is. Value: the fixed string \"`content#datafeedsCustomBatchResponse`\". |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/content`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2).\n\nDatafeedsCustomBatchRequest\n---------------------------\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"entries\": [ { object (/shopping-content/reference/rest/v2.1/datafeeds/custombatch#DatafeedsCustomBatchRequestEntry) } ] } ``` |\n\n| Fields ||\n|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `entries[]` | `object (`[DatafeedsCustomBatchRequestEntry](/shopping-content/reference/rest/v2.1/datafeeds/custombatch#DatafeedsCustomBatchRequestEntry)`)` The request entries to be processed in the batch. |\n\nDatafeedsCustomBatchRequestEntry\n--------------------------------\n\nA batch entry encoding a single non-batch datafeeds request.\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"batchId\": integer, \"merchantId\": string, \"method\": string, \"datafeedId\": string, \"datafeed\": { object (/shopping-content/reference/rest/v2.1/datafeeds#Datafeed) } } ``` |\n\n| Fields ||\n|--------------|---------------------------------------------------------------------------------------------------------------------------------------|\n| `batchId` | `integer (`[uint32](https://developers.google.com/discovery/v1/type-format)` format)` An entry ID, unique within the batch request. |\n| `merchantId` | `string` The ID of the managing account. |\n| `method` | `string` The method of the batch entry. Acceptable values are: - \"`delete`\" - \"`fetchNow`\" - \"`get`\" - \"`insert`\" - \"`update`\" \u003cbr /\u003e |\n| `datafeedId` | `string` The ID of the data feed to get, delete or fetch. |\n| `datafeed` | `object (`[Datafeed](/shopping-content/reference/rest/v2.1/datafeeds#Datafeed)`)` The data feed to insert. |\n\nDatafeedsCustomBatchResponseEntry\n---------------------------------\n\nA batch entry encoding a single non-batch datafeeds response.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"batchId\": integer, \"datafeed\": { object (/shopping-content/reference/rest/v2.1/datafeeds#Datafeed) }, \"errors\": { object (/shopping-content/reference/rest/v2.1/Errors) } } ``` |\n\n| Fields ||\n|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `batchId` | `integer (`[uint32](https://developers.google.com/discovery/v1/type-format)` format)` The ID of the request entry this entry responds to. |\n| `datafeed` | `object (`[Datafeed](/shopping-content/reference/rest/v2.1/datafeeds#Datafeed)`)` The requested data feed. Defined if and only if the request was successful. |\n| `errors` | `object (`[Errors](/shopping-content/reference/rest/v2.1/Errors)`)` A list of errors for failed custombatch entries. | **Note:** Schema errors fail the whole request. \u003cbr /\u003e |"]]