The documentation says that including the version number in an update is optional
-
version
. To enable optimistic concurrency control for an update operation, include this optional field and specify the current version of the custom attribute.
For example, each Customer
object has a version
field. Initially, the version number is 0. For each successful update, Square increases the version number. If you do not specify a version number in an update request, the latest version is assumed.
I am not concerned with concurrency for what I am using this for.
Using the C# SDK if the version is not included in an update I am getting a
{“errors”:[{“code”:“BAD_REQUEST”,“detail”:“Missing required parameter version
”,“field”:“version”,“category”:“INVALID_REQUEST_ERROR”}]}
Is this field actually required an I need to read the custom attribute first, increment the version, and then perform the update to get a webhook to fire?