1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "before_json": """{\"status\": \"COMPLETE\", \"results\": [{\"from\": {\"id\": \"001\"}, \"to\": [{\"toObjectId\": 7, \"associationTypes\": [{\"category\": \"USER_DEFINED\", \"typeId\": 123, \"label\": \"Client\"}]}]}]}\r
10""",
11 "proposed_json": """{\"status\": \"COMPLETE\", \"results\": [{\"from\": {\"id\": \"001\"}, \"to\": [{\"toObjectId\": 7, \"associationTypes\": [{\"category\": \"USER_DEFINED\", \"typeId\": 123, \"label\": \"Client\"}]}]}]}\r
12""",
13 "policy_json": """{\"from_object_type\": \"contacts\", \"to_object_type\": \"companies\", \"queried_from_ids\": [\"001\"]}\r
14""",
15}
16
17
18run = client.actor("biztoolsus/hubspot-association-pair-delta").call(run_input=run_input)
19
20
21print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
22for item in client.dataset(run.default_dataset_id).iterate_items():
23 print(item)
24
25