Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $params = wp_fusion()->crm->get_params(); // Get the authentication headers
- $request = 'https://api.hubapi.com/crm/v3/objects/contacts/search';
- $search = array(
- 'filterGroups' => array(
- array(
- 'filters' => array(
- array(
- 'propertyName' => 'firstname',
- 'operator' => 'EQ',
- 'value' => 'Alice',
- ),
- ),
- ),
- ),
- );
- $params['body'] = json_encode( $search );
- $response = wp_remote_post( $request, $params );
- if ( is_wp_error( $response ) ) {
- // handle error
- }
- $response = json_decode( wp_remote_retrieve_body( $response ) );
- // ^ The object containing the data
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement