Batch-upsert a catalog with the Square Catalog API using idempotency keys

domain: developer.squareup.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Authenticate with a Square access token (YOUR_TOKEN) using the `Authorization: Bearer YOUR_TOKEN` header.
  2. 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.
  3. 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`.
  4. 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.
  5. 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.
  6. 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

Related routes

Batch upsert HubSpot contacts using the v3 Contacts API
developers.hubspot.com · 5 steps · 100% success
Manage Square for Restaurants item availability across multiple locations using the Square Catalog API batch update flow
Square for Restaurants · 6 steps · unrated
Upsert rows in a Salesforce Marketing Cloud Data Extension using the REST API with batching
salesforce.com · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans