Method: inventory.partners.feeds.record.batchPush
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Inserisce e/o aggiorna i record del tipo di feed specificato. Esegue solo la convalida di base (ad esempio, richiesta con formato non corretto), dopodiché restituisce immediatamente una risposta appropriata al partner. Google esegue la convalida della logica di business sulla richiesta in modo asincrono. Questa chiamata batch non garantisce l'atomicità.
Richiesta HTTP
POST https://mapsbooking.googleapis.com/v1alpha/inventory/{parent=partners/*/feeds/*}/record:batchPush
L'URL utilizza la sintassi di transcodifica gRPC.
Parametri del percorso
Parametri |
parent |
string
Nome della risorsa, che ha il formato - partners/{partner_id}/feeds/{feed_name} .
|
Corpo della richiesta
Il corpo della richiesta contiene dati con la seguente struttura:
Rappresentazione JSON |
{
"records": [
{
object (GenericRecord )
}
]
} |
Campi |
records[] |
object (GenericRecord )
Record da inserire e/o aggiornare. Sono consentiti massimo 1000 record in una chiamata API.
|
Corpo della risposta
In caso di esito positivo, il corpo della risposta è vuoto.
Ambiti di autorizzazione
Richiede il seguente ambito OAuth:
https://www.googleapis.com/auth/mapsbooking
GenericRecord
Record del tipo di feed menzionato nella richiesta di URL.
Rappresentazione JSON |
{
"generationTimestamp": string,
// Union field record_type can be only one of the following:
"dataRecord": string,
"protoRecord": {
"@type": string,
field1: ...,
...
}
// End of list of possible types for union field record_type .
} |
Campi |
generationTimestamp |
string (Timestamp format)
Obbligatorio. Questo timestamp viene utilizzato per garantire l'ordinamento corretto degli aggiornamenti dell'inventario. Un timestamp in formato "Zulu" UTC RFC3339, con risoluzione a livello di nanosecondo e fino a nove cifre frazionarie. Esempi: "2014-10-02T15:01:23Z" e "2014-10-02T15:01:23.045123456Z" .
|
Campo unione record_type . Incapsulare diversi tipi di feed (ndjson, basato su proto e così via). record_type può essere solo uno dei seguenti: |
dataRecord |
string (bytes format)
Per i feed non basati su proto. Una stringa con codifica Base64.
|
protoRecord |
object
Per feed basati su proto. Un oggetto contenente campi di tipo arbitrario. Un campo aggiuntivo "@type" contiene un URI che identifica il tipo. Esempio: { "id": 1234, "@type": "types.example.com/standard/id" } .
|
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-24 UTC.
[null,null,["Ultimo aggiornamento 2025-07-24 UTC."],[[["\u003cp\u003eInserts or updates records for a specified feed type using batch calls, which do not guarantee atomicity.\u003c/p\u003e\n"],["\u003cp\u003eSupports two types of records: dataRecord (base64-encoded string) and protoRecord (arbitrary object with a type identifier).\u003c/p\u003e\n"],["\u003cp\u003eRequires the \u003ccode\u003ehttps://www.googleapis.com/auth/mapsbooking\u003c/code\u003e OAuth scope for authorization.\u003c/p\u003e\n"],["\u003cp\u003eMaximum of 1000 records are allowed per API call.\u003c/p\u003e\n"],["\u003cp\u003eGoogle performs business logic validation asynchronously, and basic validation is performed synchronously with an immediate response.\u003c/p\u003e\n"]]],[],null,["# Method: inventory.partners.feeds.record.batchPush\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [GenericRecord](#GenericRecord)\n - [JSON representation](#GenericRecord.SCHEMA_REPRESENTATION)\n\nInserts and/or updates records of specified feed type. Only performs basic validation (like malformed request) after which an appropriate response is returned to the partner immediately. Google performs business logic validation on the request asynchronously. This batch call does not guarantee atomicity.\n\n### HTTP request\n\n`POST https://mapsbooking.googleapis.com/v1alpha/inventory/{parent=partners/*/feeds/*}/record:batchPush`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|----------------------------------------------------------------------------------------------|\n| `parent` | `string` Resource name, which has the format of - `partners/{partner_id}/feeds/{feed_name}`. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"records\": [ { object (/maps-booking/reference/maps-booking-api/rest/v1alpha/inventory.partners.feeds.record/batchPush#GenericRecord) } ] } ``` |\n\n| Fields ||\n|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `records[]` | `object (`[GenericRecord](/maps-booking/reference/maps-booking-api/rest/v1alpha/inventory.partners.feeds.record/batchPush#GenericRecord)`)` Records to be inserted and/or updated. Maximum of 1000 records are allowed in one api call. |\n\n### Response body\n\nIf successful, the response body is empty.\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/mapsbooking`\n\nGenericRecord\n-------------\n\nRecord of the feed type mentioned in url request.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"generationTimestamp\": string, // Union field `record_type` can be only one of the following: \"dataRecord\": string, \"protoRecord\": { \"@type\": string, field1: ..., ... } // End of list of possible types for union field `record_type`. } ``` |\n\n| Fields ||\n|-------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `generation``Timestamp` | `string (`[Timestamp](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp)` format)` Required. This timestamp is used to to ensure correct ordering of inventory updates. A timestamp in RFC3339 UTC \"Zulu\" format, with nanosecond resolution and up to nine fractional digits. Examples: `\"2014-10-02T15:01:23Z\"` and `\"2014-10-02T15:01:23.045123456Z\"`. |\n| Union field `record_type`. Encapsulate different types of feed (ndjson, proto-based, etc.) `record_type` can be only one of the following: ||\n| `data``Record` | `string (`[bytes](https://developers.google.com/discovery/v1/type-format)` format)` For non-proto based feeds. A base64-encoded string. |\n| `proto``Record` | `object` For proto-based feeds. An object containing fields of an arbitrary type. An additional field `\"@type\"` contains a URI identifying the type. Example: `{ \"id\": 1234, \"@type\": \"types.example.com/standard/id\" }`. |"]]