I’m building a Catalog API integration against a sandbox test account and can’t get custom_attribute_values to persist on an ITEM object. The write reports success (200, no errors array) but the value is never present on read-back — not even in the write response itself.
Environment: Sandbox, Square-Version: 2025-02-20, app id sandbox-sq0idb-f-65nNciqV7hMiXosjEfGg.
What I’ve ruled out, each tested independently:
- SDK vs raw REST — reproduced identically calling
fetch()directly againstconnect.squareupsandbox.com/v2/catalog/object, bypassing thesquarenpm SDK entirely, using your own documented example payload from the custom attributes guide (Add Custom Attributes) almost verbatim. -
- SELECTION vs STRING type — same result on both a
SELECTION-type attribute and a fresh, minimalSTRING-type attribute. -
- Map key = definition id vs definition
key— tried both; your docs specify thekeystring should be the map key, tested that exactly. -
- Selection UID — tried both a client-supplied
#-prefixed temp UID and the real server-assigned UID (fetched after the definition was created). -
app_visibility— tried bothAPP_VISIBILITY_HIDDEN(my original attributes) and a brand-new attribute created withAPP_VISIBILITY_READ_WRITE_VALUES, in case the “creating app always has access” guarantee in your docs doesn’t apply as documented. Same result.-
- API version — pinned to
2025-02-20to match your own working doc example exactly (rather than the SDK’s default2026-07-15). -
- Stale version — confirmed I’m always sending the freshly-fetched
versionbefore the write (ruled outVERSION_MISMATCHas a red herring).
- Stale version — confirmed I’m always sending the freshly-fetched
- Minimal repro:
- API version — pinned to
-
- Create a
CUSTOM_ATTRIBUTE_DEFINITION(typeSTRING,allowed_object_types: ["ITEM"], keytest_string). -
- Create/update an
ITEMwith:
- Create/update an
- “custom_attribute_values”: {
- “test_string”: {
-
"key": "test_string", -
"custom_attribute_definition_id": "<the definition id>", -
"type": "STRING", -
"string_value": "hello" - }
- Create a
- }
-
- Response to that very write already omits
custom_attribute_valuesfrom the returned object. -
- A subsequent
RetrieveCatalogObjecton that item also shows nocustom_attribute_values.
- A subsequent
- Is this a known sandbox-specific issue, or is there an undocumented requirement I’m missing? Happy to share the exact request/response bodies if useful.
- Response to that very write already omits
- (Context: this blocks a taxonomy mapping — technique, frame shape, prescription type, brand — for an e-commerce catalog sync. Once resolved, worth re-testing against the production account too, in case it’s sandbox-specific.)
- Selection UID — tried both a client-supplied
- Map key = definition id vs definition
- SELECTION vs STRING type — same result on both a