Below is the info you asked for. All IDs are REDACTED except for the relevant custom attribute key. This is in a Sandbox environment, for what it’s worth. If you do a text compare on the two Upserts you’ll see that the only difference is the omission of “Square:” from the custom attribute key in the Upsert that succeeds. You can also see that “Square:” is present in the custom attribute key in the initially-retrieved item variation.
.NET SDK Version: 45.0.1
square-version: 2026-07-15
FAIL SCENARIO
RETRIEVED VARIATION
{“ItemVariationData”:{“ItemId”:“REDACTED”,“Name”:“Regular”,“Sku”:“Collection- 1.5#”,“PricingType”:{“Value”:“FIXED_PRICING”},“PriceMoney”:{“Amount”:2995,“Currency”:{“Value”:“USD”},“AdditionalProperties”:{}},“LocationOverrides”:[{“LocationId”:“REDACTED”,“TrackInventory”:false,“AdditionalProperties”:{}}],“TrackInventory”:false,“Sellable”:true,“Stockable”:true,“AdditionalProperties”:{}},“Id”:“REDACTED”,“UpdatedAt”:“2026-10-08T18:03:20.138Z”,“Version”:1791482600138,“IsDeleted”:false,“CustomAttributeValues”:{“Square:8dadcd11-6f96-407c-b910-10f40e9d5fe7”:{“Name”:“NO_OP”,“CustomAttributeDefinitionId”:“REDACTED”,“Type”:{“Value”:“NUMBER”},“NumberValue”:“1.0”,“Key”:“Square:8dadcd11-6f96-407c-b910-10f40e9d5fe7”,“AdditionalProperties”:{}},“PresentAtAllLocations”:false,“PresentAtLocationIds”:[“REDACTED”],“AdditionalProperties”:{“type”:{“ValueKind”:“string”},“created_at”:{“ValueKind”:“string”}}
CORRESPONDING UPSERT THAT FAILS
{“IdempotencyKey”:“REDACTED”,“Batches”:[{“Objects”:[{“Type”:“ITEM_VARIATION”,“Value”:{“ItemVariationData”:{“ItemId”:“REDACTED”,“Name”:“Regular”,“Sku”:“Collection- 1.5#”,“PricingType”:{“Value”:“FIXED_PRICING”},“PriceMoney”:{“Amount”:2995,“Currency”:{“Value”:“USD”},“AdditionalProperties”:{}},“LocationOverrides”:[{“LocationId”:“REDACTED”,“TrackInventory”:true,“AdditionalProperties”:{}}],“TrackInventory”:false,“Sellable”:true,“Stockable”:true,“AdditionalProperties”:{}},“Id”:“REDACTED”,“UpdatedAt”:“2026-10-08T18:03:20.138Z”,“Version”:1791482600138,“IsDeleted”:false,“CustomAttributeValues”:{“Square:8dadcd11-6f96-407c-b910-10f40e9d5fe7”:{“Name”:“NO_OP”,“CustomAttributeDefinitionId”:“REDACTED”,“Type”:{“Value”:“NUMBER”},“NumberValue”:“1.0”,“Key”:“Square:8dadcd11-6f96-407c-b910-10f40e9d5fe7”,“AdditionalProperties”:{}},“PresentAtAllLocations”:false,“PresentAtLocationIds”:[“REDACTED”],“AdditionalProperties”:{“type”:{“ValueKind”:“string”},“created_at”:{“ValueKind”:“string”}},“IsItem”:false,“IsImage”:false,“IsCategory”:false,“IsItemVariation”:true,“IsTax”:false,“IsDiscount”:false,“IsModifierList”:false,“IsModifier”:false,“IsPricingRule”:false,“IsProductSet”:false,“IsTimePeriod”:false,“IsMeasurementUnit”:false,“IsSubscriptionPlanVariation”:false,“IsItemOption”:false,“IsItemOptionVal”:false,“IsCustomAttributeDefinition”:false,“IsQuickAmountsSettings”:false,“IsSubscriptionPlan”:false,“IsAvailabilityPeriod”:false}],“AdditionalProperties”:{}}]}
RESPONSE ERROR
Status code: 404
Body: {“errors”:[{“category”:“INVALID_REQUEST_ERROR”,“code”:“NOT_FOUND”,“detail”:“Custom attribute definition with key “Square:8dadcd11-6f96-407c-b910-10f40e9d5fe7” not found”}]}
SUCCESS SCENARIO
RETRIEVED VARIATION
{“ItemVariationData”:{“ItemId”:“REDACTED”,“Name”:“Regular”,“Sku”:“Collection- 1.5#”,“PricingType”:{“Value”:“FIXED_PRICING”},“PriceMoney”:{“Amount”:2995,“Currency”:{“Value”:“USD”},“AdditionalProperties”:{}},“LocationOverrides”:[{“LocationId”:“REDACTED”,“TrackInventory”:false,“AdditionalProperties”:{}}],“TrackInventory”:false,“Sellable”:true,“Stockable”:true,“AdditionalProperties”:{}},“Id”:“REDACTED”,“UpdatedAt”:“2026-10-08T18:03:20.138Z”,“Version”:1791482600138,“IsDeleted”:false,“CustomAttributeValues”:{“Square:8dadcd11-6f96-407c-b910-10f40e9d5fe7”:{“Name”:“NO_OP”,“CustomAttributeDefinitionId”:“REDACTED”,“Type”:{“Value”:“NUMBER”},“NumberValue”:“1.0”,“Key”:“Square:8dadcd11-6f96-407c-b910-10f40e9d5fe7”,“AdditionalProperties”:{}},“PresentAtAllLocations”:false,“PresentAtLocationIds”:[“REDACTED”],“AdditionalProperties”:{“type”:{“ValueKind”:“string”},“created_at”:{“ValueKind”:“string”}}
CORRESPONDING UPSERT THAT SUCCEEDS
{“IdempotencyKey”:“REDACTED”,“Batches”:[{“Objects”:[{“Type”:“ITEM_VARIATION”,“Value”:{“ItemVariationData”:{“ItemId”:“REDACTED”,“Name”:“Regular”,“Sku”:“Collection-1.5#”,“PricingType”:{“Value”:“FIXED_PRICING”},“PriceMoney”:{“Amount”:2995,“Currency”:{“Value”:“USD”},“AdditionalProperties”:{}},“LocationOverrides”:[{“LocationId”:“REDACTED”,“TrackInventory”:true,“AdditionalProperties”:{}}],“TrackInventory”:false,“Sellable”:true,“Stockable”:true,“AdditionalProperties”:{}},“Id”:“REDACTED”,“UpdatedAt”:“2026-10-08T18:03:20.138Z”,“Version”:1791482600138,“IsDeleted”:false,“CustomAttributeValues”:{“8dadcd11-6f96-407c-b910-10f40e9d5fe7”:{“Name”:“NO_OP”,“CustomAttributeDefinitionId”:“REDACTED”,“Type”:{“Value”:“NUMBER”},“NumberValue”:“1.0”,“Key”:“Square:8dadcd11-6f96-407c-b910-10f40e9d5fe7”,“AdditionalProperties”:{}},“PresentAtAllLocations”:false,“PresentAtLocationIds”:[“REDACTED”],“AdditionalProperties”:{“type”:{“ValueKind”:“string”},“created_at”:{“ValueKind”:“string”}},“IsItem”:false,“IsImage”:false,“IsCategory”:false,“IsItemVariation”:true,“IsTax”:false,“IsDiscount”:false,“IsModifierList”:false,“IsModifier”:false,“IsPricingRule”:false,“IsProductSet”:false,“IsTimePeriod”:false,“IsMeasurementUnit”:false,“IsSubscriptionPlanVariation”:false,“IsItemOption”:false,“IsItemOptionVal”:false,“IsCustomAttributeDefinition”:false,“IsQuickAmountsSettings”:false,“IsSubscriptionPlan”:false,“IsAvailabilityPeriod”:false}],“AdditionalProperties”:{}}]}