Authenticate with a Square access token (YOUR_TOKEN) using the `Authorization: Bearer YOUR_TOKEN` header.
Call `POST /v2/catalog/batch-upsert` with a unique `idempotency_key` (a UUID) and a `batches` array; each batch contains an `objects` array of CatalogObject entries.
Use temporary negative integer IDs (e.g., `#item-1`) for new objects within the request body; Square resolves these to permanent IDs on success and returns the mapping in `id_mappings`.
Each batch within a request is processed atomically (all-or-nothing per batch); if one batch fails, others in the same request are not affected.
Store the `idempotency_key` used for each request; if a request times out or errors, re-submitting with the same key is safe and will not create duplicates.
Use `GET /v2/catalog/list` with optional `types` filter to verify created objects; use `GET /v2/catalog/object/{object_id}` for individual object verification.
Known gotchas
The `idempotency_key` is scoped per application — reusing a key for a different payload with the same key returns the original response rather than an error, silently ignoring the new data.
Temporary IDs using the `#` prefix are only valid within a single request; referencing a `#temp-id` from a previous request in a new request will fail.
Square enforces a limit on the number of objects per batch; check the current limit in the official API documentation rather than hardcoding a value, as it can change.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp