Some of them have a non-zero SessionCount attribute. When the company is sent again to the API; I get a 400 response saying “bad 'session_count' parameter”. This parameter is ignored when it’s 0 because of the omitemptyhere but is sent if non-zero. It shouldn’t be sent to the API ever, even if non-zero.
Note that I can’t just send updates without looking if the company exists before because if it doesn’t it’ll be created:
Companies are looked up via company_id, if not found via company_id, the new company will be created, if found, that company will be updated.
Hello,
I’m updating the custom attributes of companies with the following code:
Some of them have a non-zero
SessionCount
attribute. When the company is sent again to the API; I get a 400 response saying “bad 'session_count' parameter
”. This parameter is ignored when it’s0
because of theomitempty
here but is sent if non-zero. It shouldn’t be sent to the API ever, even if non-zero.Note that I can’t just send updates without looking if the company exists before because if it doesn’t it’ll be created:
Source: https://doc.intercom.io/api/#create-or-update-company
Thanks.