Hello I am using python API client to associate a contact with a deal
deal_id = de_api_resp["id"]
contact_id = contact_found.id
association = PublicAssociation(
_from=contact_id,
to=deal_id
)
api_client.crm.associations.batch_api.create(
from_object_type="contacts",
to_object_type="deals",
batch_input_public_association=[association]
)
But unfortunately i am taking the below error
HTTP response headers: HTTPHeaderDict({'Date': 'Thu, 02 Nov 2023 09:36:05 GMT', 'Content-Type': 'application/json;charset=utf-8', 'Content-Length': '330', 'Connection': 'keep-alive', 'CF-Ray': '81fb641e6ebf38d5-ATH', 'CF-Cache-Status': 'DYNAMIC', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'Vary': 'origin, Accept-Encoding', 'Access-Control-Allow-Credentials': 'false', 'X-Content-Type-Options': 'nosniff', 'x-envoy-upstream-service-time': '16', 'x-evy-trace-listener': 'listener_https', 'x-evy-trace-route-configuration': 'listener_https/all', 'x-evy-trace-route-service-name': 'envoyset-translator', 'x-evy-trace-served-by-pod': 'iad02/hubapi-td/envoy-proxy-5b5c96c966-pgbpv', 'x-evy-trace-virtual-host': 'all', 'X-HubSpot-Correlation-Id': '2c7c384c-d4f9-48ad-84d8-ceb819ed4ffb', 'X-HubSpot-RateLimit-Daily': '500000', 'X-HubSpot-RateLimit-Daily-Remaining': '499310', 'X-HubSpot-RateLimit-Interval-Milliseconds': '10000', 'X-HubSpot-RateLimit-Max': '150', 'X-HubSpot-RateLimit-Remaining': '122', 'X-HubSpot-RateLimit-Secondly': '15', 'X-HubSpot-RateLimit-Secondly-Remaining': '12', 'x-request-id': '2c7c384c-d4f9-48ad-84d8-ceb819ed4ffb', 'Report-To': '{"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=zcglP91MjfAiz4VcAfYGjETSbDdQQn%2BpmBInt0gKJcrsWcSlQhDF%2FKtDMYH2chtmVil5AeTCaIAZ6Gx1IQ1CtihgJnJHpc6MY6vjcNLbAjip0erqKhmmvLHOQePt9Ess"}],"group":"cf-nel","max_age":604800}', 'NEL': '{"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}', 'Server': 'cloudflare'})
wlserver_local_celeryworker | HTTP response body: {"status":"error","message":"Invalid input JSON on line 1, column 1: Cannot deserialize value of type `com.hubspot.apiutils.core.models.batch.BatchInput$Json<com.hubspot.crmpublic.core.models.associations.PublicAssociation>` from Array value (token `JsonToken.START_ARRAY`)","correlationId":"2c7c384c-d4f9-48ad-84d8-ceb819ed4ffb"}