Skip to main content

Questions tagged [chaining]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
1 answer
164 views

Best (api4) way to chain save a contact so that the email updates, without creating a new one?

Using civicrm api4, what's the best way to chain save a contact so that the email updates, without creating a new one? For example, I want to update this existing contact: entity: Contact, action: get,...
MikeSteigerwald's user avatar
3 votes
2 answers
78 views

Create Case using API via REST - no "Open Case" activity created

I'm using the REST interface and the create case API to create a new case. The case is created, but no activities. In particular, no "Open Case" activity is created as I would have expected. No entry ...
Jern's user avatar
  • 1,302
1 vote
0 answers
78 views

Chaining Participants creation using REST API

I'm trying to create an event and chain the participants creation using the REST API from python. My attempt goes like this: import requests params = { "key": "key", "api_key": "apikey", "json": ...
JME's user avatar
  • 11
0 votes
2 answers
77 views

condition on count from chained api call

I am trying to use the api to get all contacts without an address with locationtype billing. For this I use the contact get api, and do a chained address get call. Is there a way to put a condition on ...
joost's user avatar
  • 175
6 votes
1 answer
485 views

What is the join logic when using API chaining with action = get?

I read about API chaining and I'm using it with get actions to learn more about how it works. I'm confused by the inconsistent behavior of the following two API calls: CRM.api3('participant', 'get', ...
Sean's user avatar
  • 3,168
0 votes
1 answer
53 views

How to update ContentType Label through API chaining?

I try to relabel Organization as "Entity": $result = civicrm_api3('ContactType', 'create', array( 'label' => "Entity", 'api.ContactType.get' => array('name' => "Organization"), )); ...
ñull's user avatar
  • 1,208
4 votes
1 answer
261 views

Can I chain API calls through drush?

API chaining works well in Javascript and PHP. For example, I can retrieve a contact's email addresses using this code generated by the API Explorer: Php $result = civicrm_api3('Contact', 'getsingle'...
Noah Miller's user avatar
  • 1,057
2 votes
1 answer
150 views

Alias for chained API calls?

I have a query in which I need to chain api.Contact.getsingle twice, given that the entity I'm querying is linked to two different contacts for which I need to fetch the data. The problem is that, ...
AkA84's user avatar
  • 71
2 votes
1 answer
376 views

Chain API call cascade, pass second value as third call argument, "id is not a valid integer"

While making a cascade API call, a roadblock has been hit, here's a code: $result = civicrm_api3('Contact', 'get', array( 'sequential' => 1, 'return' => "id", 'id' => array('IN' => ...
yurg's user avatar
  • 2,186
1 vote
1 answer
76 views

How can I find contacts based on both custom data and address via the API?

For the Electoral API extension, I want to write a scheduled job to look up legislative data for everyone who a) has a geocode, and b) doesn't already have legislative data (which is stored in a multi-...
Jon G - Megaphone Tech's user avatar
4 votes
2 answers
371 views

CiviCRM API with Custom Data mixed with Standard Entities

I'm using CiviCRM 4.6 with the new API editor. I'm attempting to chain a bunch of queries together, which provide cases for a client within a period, along with the linked contact, along with custom ...
Adam's user avatar
  • 479
2 votes
1 answer
146 views

How to debug chained API calls

How can I get back a dump of the full param array when a chained api call fails, so that I can see what values are coming back from the previous call and going into the chained call (and thus better ...
Nicholai's user avatar
  • 2,838
1 vote
1 answer
823 views

How to use API chaining to create a contact and a relationship

I've read all the docs I could find, the code examples, the 4.6 explorer, but I'm not grasping one piece. Below is code to create a new adult contact (via profile submit, to get some extra validation ...
Nicholai's user avatar
  • 2,838