Closed tirprox closed 3 years ago
Hello! First of all, thanks for your contribution. Yes, RetailCRM API expects tags in form of an array of strings while creating a customer, but for GET methods it will return an array of objects with fields specified in the Tag
structure.
To keep compatibility with this behavior we will implement json.Marshaler
for the Tag
structure in the next update. It will marshal only the name field as a string, which will fix the problem you reported. You'll still need to provide a slice where each element is a whole Tag
structure, but only name
field will be used there.
When attempting to create a customer through client, I'm getting an error:
apiErrs: key = "tags" value = "The following tags are invalid: Array\n"
For example:
This probably means that since updating Customer with Tags in #40 RetailCRM backend still expects just an array of strings instead of an array of objects with name and color