What the standard guarantees
The reference documents every endpoint. These pages document the rules all of them obey — which is the more useful half, because it lets you predict an endpoint you have not read yet: what its URL looks like, what a write returns, how its list is paged and filtered, what its failures look like, and what it does when the work outlives the call.
They are the platform's own API standard, the normative document its code is reviewed against, transcluded here at build time. Not a summary of it, and not a second copy: the same file, minus the sections that concern only the people implementing it — which is why the numbering below has gaps in it.
The transport is ordinary REST over JSON — no protobuf, no transcoding, nothing a curl
user cannot read. The semantics come from
Google's API Improvement Proposals, which is why an endpoint you
have never seen behaves the way you expect it to. Where this API departs from them it says
so, in the table of deviations below; their labels, D1 to D6, are how the rest of these
pages refer to them.
1. The one sentence
Every endpoint is one of five standard methods or a named custom method
on a resource that has a hierarchical name, requests and responses are
snake_case JSON, lists are paginated with page_size/page_token and
filtered with filter, and every failure is a google.rpc.Status body
with a canonical code.
3. Deliberate deviations from AIP
These are permanent and load-bearing. Everything not listed here follows the AIP as written; when in doubt, the AIP wins.
| # | AIP says | We do | Why |
|---|---|---|---|
| D1 | Collection ids and JSON fields are lowerCamelCase (AIP-122/140, proto3 JSON mapping) | snake_case everywhere — path segments, fields, query params, custom-method verbs | AIP-140 defines field names as lower_snake_case; camelCase is purely an artifact of proto3→JSON transcoding, which we do not do. Our models, our Mongo documents and our existing JSON are already snake_case. One spelling, end to end. |
| D2 | Resource names carry the full ancestry (accounts/a/projects/p/websites/w/cms_pages/c) | Names are rooted at the nearest globally-addressable ancestor: websites/{website}/cms_pages/{cms_page} | Every id is a Mongo ObjectId and therefore globally unique, so the extra ancestry adds no addressing power, only length. website.parent carries the link upward for anyone who needs it. |
| D3 | Fields that reference another resource hold its resource name (AIP-122) | References stay bare ids in <field>_id / <field>_ids fields, each documenting its resource type | 26 distinct reference fields across 33 models, all resolvable within a scope the URL already fixes. |
| D4 | Create returns 200 OK | Create returns 201 Created with a Location header | The transport is REST, not transcoded gRPC. 201 + Location is what REST clients and caches already understand. |
| D5 | Output-only fields sent on a write are silently ignored (AIP-203) | Ignored by default; a resource MAY declare a field IMMUTABLE instead and reject it with INVALID_ARGUMENT | Silent-ignore is the AIP rule and the default. Where the team has already decided a silent drop is a footgun (menu_item.sort_order), IMMUTABLE is the sanctioned escape hatch — it is explicit, not ad-hoc. |
| D6 | error.details entries are Any-typed with @type URLs | details entries are plain objects with a "type" string discriminator from a closed set (§13) | No type registry to publish or resolve. Same information, readable without tooling. |
| D7 | A child resource is made by its own collection's Create (AIP-133), never inside its parent's | A product's Create takes its variants: POST …/catalog_products with variants: [...] — required, the SKUs being the variants' — makes the product with them, all or none, a refused variant named on variants[i]. An Update that sends the field is INVALID_ARGUMENT; afterwards the variants are written only under …/catalog_products/{p}/variants. A Create with variant_options and its default variant alone (option_values {}) starts the product where an Update giving it axes leaves it — for a client that makes the combinations later, by :batch_create with replace_default_variant | Every product has at least one variant. Made apart, a product with options would exist — listed, indexed, on sale — between its Create and its variants' :batch_create, as a lone default variant it is not. One call leaves no such window, and a refused variant leaves no product behind; Shopify's productSet and commercetools' product create do the same. |
| D8 | A batch method's requests may each name their own parent, and the path's parent may be - to span several (AIP-233–235) | A batch acts under the one parent its path names: POST …/catalog_products/{p}/variants:batch_create, POST …/catalog_price_lists/{l}/entries:batch_create take {"requests": [{"<child>": {…}}, …]} — no request carries a parent, and - is not a parent. At most 1000 requests; atomic — every request is checked before any is written, a refused one answers for the whole call on its own fields (requests[2].entry.variant_id), and nothing is written; the answer lists the resources written in the requests' order | What a batch is checked against is its parent: a product's combinations and SKUs, a price list's targets, quantities and cap. One parent a call is what lets the call be checked whole before the first write and answered all or nothing — partial success is not a shape this API returns (§9, :batch_update) — where a call spanning lists would lock and count each list on its own and could half succeed. |
| D9 | A method answers one message; a server stream is a gRPC method kind, and AIP gives a REST/JSON client no shape for reading an answer while it is being made | A streamed answer is a custom method GET {name}:stream answering text/event-stream (§17, «Streamed responses»): named events whose data is a snake_case JSON object with a sequence, a snapshot of the resource first on every connection, a refusal before the first byte as an ordinary Status and after it as an error event, a resume by after_sequence, a keep-alive comment, and the connection closed by the server after the last event | Some work is watched while it runs — an assistant's answer arrives a few words at a time, and polling Get for it would be either slow or a request a second per reader. Server-sent events are what a browser, a proxy and curl already read, one way, over an ordinary GET. The resource stays the record: everything a stream says is what a Get of the resource reads afterwards, so a client that loses the stream loses nothing but latency. |
23. AIP index
Adopted as written: 121 (resource-oriented design), 122 (names, except D2/D3),
126 (enums), 131–135 (standard methods, except D4 and D7), 136 (custom methods), 140
(field names, per D1), 142 (time), 143 (standardized codes), 148 (standard
fields), 151 (operations), 154 (etags), 155 (request ids), 156 (singletons),
157 (partial responses, optional), 158 (pagination), 159 (reading across
collections — List only, where the resource says so, §8), 160 (filtering, subset per
§8), 163 (validate-only), 165 (criteria-based delete: :purge of every child of one
parent, force to delete, answered at once — no filter yet), 180 (compatibility), 185 (versioning), 193 (errors,
except D6), 203 (field behavior, except D5), 216 (states), 231/233/234/235 (batch
methods, except D8).
Not adopted: everything proto/gRPC-specific (191–192 file layout, 213 common
components, google.protobuf wrappers), 127 (HTTP transcoding annotations),
and the Any-typed error details of 193 (see D6).